Webhooks
Overview
From the Webhooks (opens in a new tab) page you can set up webhooks to be notified when certain events occur in Aidbase.
You can use webhooks to integrate Aidbase with other systems, such as your own database or a third-party service.
Webhooks are sent to the specified endpoint as HTTP POST
requests with a JSON payload.
Ticket
ticket.created
This event is triggered when a new ticket is created.
Example payload
{
"id": "evt_1Hc2X2JZ6qsJ5XQ",
"webhook_id": "b44d118b-9648-41d9-abce-78ced777bb0e",
"object": "webhook_event",
"created": "2023-10-31T17:36:56.491Z",
"type": "ticket.created",
"changes": {},
"data": {
"id": "a36306fa-0cc4-4497-8c2a-c7798cfdc720",
"ticket_form_id": "I2o6Ii_4U6m48bmKTTMoR",
"hosted_ticket_form_url": "https://hosted.aidbase.ai/tickets/I2o6Ii_4U6m48bmKTTMoR",
"hosted_ticket_url": "https://hosted.aidbase.ai/ticket/I2o6Ii_4U6m48bmKTTMoR?ticket_id=a36306fa-0cc4-4497-8c2a-c7798cfdc720",
"status": "OPEN",
"priority": "MEDIUM",
"created": "2023-10-31T17:36:56.491Z",
"session_data": {
"id": "f76c35921970",
"username": "johndoe",
"email": "john@doe.com",
"profile_image_url": "https://cdn.example.com/profile.jpg",
"reference_id": "1234567890"
},
"field_values": [
{
"id": "uv9xA",
"name": "Your name",
"type": "TEXT",
"value": "John Doe"
},
{
"id": "xa2-P",
"name": "Your title",
"type": "SELECT",
"value": [{ "value": "ceo", "label": "CEO" }]
},
...
],
"comments": [{
"id": "a3eb3199-c79e-40fd-b6f5-8fe3d5c70e58",
"type": "USER",
"created": "2023-10-31T17:36:56.491Z",
"comment": "Hello, I have a question about...",
"files": ["https://cdn.example.com/file1.jpg", "https://cdn.example.com/file2.jpg"],
"session_data": {
"id": "f76c35921970",
"username": "johndoe",
"email": "john@doe.com",
"profile_image_url": "https://cdn.example.com/profile.jpg",
"reference_id": "1234567890"
}
}]
}
}
ticket.status.changed
This event is triggered when a ticket's status is changed.
Example payload
{
"id": "evt_1Hc2X2JZ6qsJ5XQ",
"webhook_id": "b44d118b-9648-41d9-abce-78ced777bb0e",
"object": "webhook_event",
"created": "2023-10-31T17:36:56.491Z",
"type": "ticket.status.changed",
"changes": {
"status": {
"previous": "ASSIGNED",
"new": "RESOLVED"
}
},
"data": {
"id": "a36306fa-0cc4-4497-8c2a-c7798cfdc720",
"ticket_form_id": "I2o6Ii_4U6m48bmKTTMoR",
"hosted_ticket_form_url": "https://hosted.aidbase.ai/tickets/I2o6Ii_4U6m48bmKTTMoR",
"hosted_ticket_url": "https://hosted.aidbase.ai/ticket/I2o6Ii_4U6m48bmKTTMoR?ticket_id=a36306fa-0cc4-4497-8c2a-c7798cfdc720",
"status": "OPEN",
"priority": "MEDIUM",
"created": "2023-10-31T17:36:56.491Z",
"session_data": {
"id": "f76c35921970",
"username": "johndoe",
"email": "john@doe.com",
"profile_image_url": "https://cdn.example.com/profile.jpg",
"reference_id": "1234567890"
},
"field_values": [
{
"id": "uv9xA",
"name": "Your name",
"type": "TEXT",
"value": "John Doe"
},
{
"id": "xa2-P",
"name": "Your title",
"type": "SELECT",
"value": [{ "value": "ceo", "label": "CEO" }]
},
...
],
"comments": [{
"id": "a3eb3199-c79e-40fd-b6f5-8fe3d5c70e58",
"type": "USER",
"created": "2023-10-31T17:36:56.491Z",
"comment": "Hello, I have a question about...",
"files": ["https://cdn.example.com/file1.jpg", "https://cdn.example.com/file2.jpg"],
"session_data": {
"id": "f76c35921970",
"username": "johndoe",
"email": "john@doe.com",
"profile_image_url": "https://cdn.example.com/profile.jpg",
"reference_id": "1234567890"
}
}]
}
}
ticket.priority.changed
This event is triggered when a ticket's priority is changed.
Example payload
{
"id": "evt_1Hc2X2JZ6qsJ5XQ",
"webhook_id": "b44d118b-9648-41d9-abce-78ced777bb0e",
"object": "webhook_event",
"created": "2023-10-31T17:36:56.491Z",
"type": "ticket.priority.changed",
"changes": {
"priority": {
"previous": "MEDIUM",
"new": "HIGH"
}
},
"data": {
"id": "a36306fa-0cc4-4497-8c2a-c7798cfdc720",
"ticket_form_id": "I2o6Ii_4U6m48bmKTTMoR",
"hosted_ticket_form_url": "https://hosted.aidbase.ai/tickets/I2o6Ii_4U6m48bmKTTMoR",
"hosted_ticket_url": "https://hosted.aidbase.ai/ticket/I2o6Ii_4U6m48bmKTTMoR?ticket_id=a36306fa-0cc4-4497-8c2a-c7798cfdc720",
"status": "OPEN",
"priority": "MEDIUM",
"created": "2023-10-31T17:36:56.491Z",
"session_data": {
"id": "f76c35921970",
"username": "johndoe",
"email": "john@doe.com",
"profile_image_url": "https://cdn.example.com/profile.jpg",
"reference_id": "1234567890"
},
"field_values": [
{
"id": "uv9xA",
"name": "Your name",
"type": "TEXT",
"value": "John Doe"
},
{
"id": "xa2-P",
"name": "Your title",
"type": "SELECT",
"value": [{ "value": "ceo", "label": "CEO" }]
},
...
],
"comments": [{
"id": "a3eb3199-c79e-40fd-b6f5-8fe3d5c70e58",
"type": "USER",
"created": "2023-10-31T17:36:56.491Z",
"comment": "Hello, I have a question about...",
"files": ["https://cdn.example.com/file1.jpg", "https://cdn.example.com/file2.jpg"],
"session_data": {
"id": "f76c35921970",
"username": "johndoe",
"email": "john@doe.com",
"profile_image_url": "https://cdn.example.com/profile.jpg",
"reference_id": "1234567890"
}
}]
}
}
ticket.new.comment
This event is triggered when a new comment is added to a ticket.
Example payload
{
"id": "evt_1Hc2X2JZ6qsJ5XQ",
"webhook_id": "b44d118b-9648-41d9-abce-78ced777bb0e",
"object": "webhook_event",
"created": "2023-10-31T17:36:56.491Z",
"type": "ticket.new.comment",
"changes": {
"comment": {
"id": "443968de-64d8-4018-9185-ffb9afb4751d",
"type": "AGENT",
"created": "2023-10-31T17:42:58.491Z",
"comment": "Great question! Here is the answer...",
"session_data": {
"id": "2b06ada3f5bb",
"username": "jamesdoe",
"email": "james@doe.com",
"profile_image_url": "https://cdn.example.com/profile.jpg",
"reference_id": "1234567890"
}
}
},
"data": {
"id": "a36306fa-0cc4-4497-8c2a-c7798cfdc720",
"ticket_form_id": "I2o6Ii_4U6m48bmKTTMoR",
"hosted_ticket_form_url": "https://hosted.aidbase.ai/tickets/I2o6Ii_4U6m48bmKTTMoR",
"hosted_ticket_url": "https://hosted.aidbase.ai/ticket/I2o6Ii_4U6m48bmKTTMoR?ticket_id=a36306fa-0cc4-4497-8c2a-c7798cfdc720",
"status": "OPEN",
"priority": "MEDIUM",
"created": "2023-10-31T17:36:56.491Z",
"session_data": {
"id": "f76c35921970",
"username": "johndoe",
"email": "john@doe.com",
"profile_image_url": "https://cdn.example.com/profile.jpg",
"reference_id": "1234567890"
},
"field_values": [
{
"id": "uv9xA",
"name": "Your name",
"type": "TEXT",
"value": "John Doe"
},
{
"id": "xa2-P",
"name": "Your title",
"type": "SELECT",
"value": [{ "value": "ceo", "label": "CEO" }]
},
...
],
"comments": [
{
"id": "a3eb3199-c79e-40fd-b6f5-8fe3d5c70e58",
"type": "USER",
"created": "2023-10-31T17:36:56.491Z",
"comment": "Hello, I have a question about...",
"files": ["https://cdn.example.com/file1.jpg", "https://cdn.example.com/file2.jpg"],
"session_data": {
"id": "f76c35921970",
"username": "johndoe",
"email": "john@doe.com",
"profile_image_url": "https://cdn.example.com/profile.jpg",
"reference_id": "1234567890"
}
},
{
"id": "443968de-64d8-4018-9185-ffb9afb4751d",
"type": "AGENT",
"created": "2023-10-31T17:42:58.491Z",
"comment": "Great question! Here is the answer...",
"session_data": {
"id": "2b06ada3f5bb",
"username": "jamesdoe",
"email": "james@doe.com",
"profile_image_url": "https://cdn.example.com/profile.jpg",
"reference_id": "1234567890"
}
}
]
}
}
email.sent
This event is triggered when a new email is sent from Aidbase.
Example payload
{
"id": "evt_1Hc2a8f36qsa23e",
"webhook_id": "c1042e89-fea5-415c-8bd2-e557abf25307",
"object": "webhook_event",
"created": "2023-10-31T17:36:56.491Z",
"type": "email.sent",
"changes": {
"message": {
"id": "00bcde85-2b4d-4682-ac8b-b280dc819559",
"type": "AGENT",
"created": "2023-10-31T17:39:56.491Z",
"message": "Hi John, than you for your message...",
"message_html": "<p>Hi John, than you for your message...</p>",
"files": [],
"errors": [],
"session_data": {
"id": "2b06ada3f5bb",
"username": "jamesdoe",
"email": "james@doe.com",
"profile_image_url": "https://cdn.example.com/profile.jpg",
"reference_id": "1234567890"
}
}
},
"data": {
"id": "7c3c5609-b838-4643-8e8c-2a2da0a14c4a",
"email_inbox_id": "286d123e-5961-457c-8fd5-56f192ec315d",
"status": "OPEN",
"priority": "MEDIUM",
"topic": "Question about something",
"created": "2023-10-31T17:36:56.491Z",
"session_data": {
"username": "John Doe",
"email": "john@doe.com"
},
"messages": [
{
"id": "4d2e74b1-b645-4beb-801c-9502c3ddaca8",
"type": "USER",
"created": "2023-10-31T17:36:56.491Z",
"message": "Hello, I have a question about...",
"message_html": "<p>Hello, I have a question about...</p>",
"files": ["https://cdn.aidbase.ai/286d123e-5961-457c-8fd5-56f192ec315d/some-file.jpg"],
"errors": [],
"session_data": {
"username": "John Doe",
"email": "john@doe.com"
}
},
{
"id": "00bcde85-2b4d-4682-ac8b-b280dc819559",
"type": "AGENT",
"created": "2023-10-31T17:39:56.491Z",
"message": "Hi John, than you for your message...",
"message_html": "<p>Hi John, than you for your message...</p>",
"files": [],
"errors": [],
"session_data": {
"id": "2b06ada3f5bb",
"username": "jamesdoe",
"email": "james@doe.com",
"profile_image_url": "https://cdn.example.com/profile.jpg",
"reference_id": "1234567890"
}
}
]
}
}
email.received
This event is triggered when a new email is received in Aidbase.
Example payload
{
"id": "evt_1Hc2a8f36qsa23e",
"webhook_id": "c1042e89-fea5-415c-8bd2-e557abf25307",
"object": "webhook_event",
"created": "2023-10-31T17:36:56.491Z",
"type": "email.received",
"changes": {
"message": {
"id": "9195f339-a6be-4d91-99ac-0c103fe0f089",
"type": "USER",
"created": "2023-10-31T17:42:56.491Z",
"message": "Thank you, I really appreciate your reply...",
"message_html": "<p>Thank you, I really appreciate your reply...</p>",
"files": ["https://cdn.aidbase.ai/286d123e-5961-457c-8fd5-56f192ec315d/some-file.jpg"],
"errors": [],
"session_data": {
"username": "John Doe",
"email": "john@doe.com"
}
}
},
"data": {
"id": "7c3c5609-b838-4643-8e8c-2a2da0a14c4a",
"email_inbox_id": "286d123e-5961-457c-8fd5-56f192ec315d",
"status": "OPEN",
"priority": "MEDIUM",
"topic": "Question about something",
"created": "2023-10-31T17:36:56.491Z",
"session_data": {
"username": "John Doe",
"email": "john@doe.com"
},
"messages": [
{
"id": "4d2e74b1-b645-4beb-801c-9502c3ddaca8",
"type": "USER",
"created": "2023-10-31T17:36:56.491Z",
"message": "Hello, I have a question about...",
"message_html": "<p>Hello, I have a question about...</p>",
"files": ["https://cdn.aidbase.ai/286d123e-5961-457c-8fd5-56f192ec315d/some-file.jpg"],
"errors": [],
"session_data": {
"username": "John Doe",
"email": "john@doe.com"
}
},
{
"id": "00bcde85-2b4d-4682-ac8b-b280dc819559",
"type": "AGENT",
"created": "2023-10-31T17:39:56.491Z",
"message": "Hi John, than you for your message...",
"message_html": "<p>Hi John, than you for your message...</p>",
"files": [],
"errors": [],
"session_data": {
"id": "2b06ada3f5bb",
"username": "jamesdoe",
"email": "james@doe.com",
"profile_image_url": "https://cdn.example.com/profile.jpg",
"reference_id": "1234567890"
}
},
{
"id": "9195f339-a6be-4d91-99ac-0c103fe0f089",
"type": "USER",
"created": "2023-10-31T17:42:56.491Z",
"message": "Thank you, I really appreciate your reply...",
"message_html": "<p>Thank you, I really appreciate your reply...</p>",
"files": ["https://cdn.aidbase.ai/286d123e-5961-457c-8fd5-56f192ec315d/some-file.jpg"],
"errors": [],
"session_data": {
"username": "John Doe",
"email": "john@doe.com"
}
}
]
}
}
email.status.changed
This event is triggered when an email's status is changed.
{
"id": "evt_1Hc2a8f36qsa23e",
"webhook_id": "c1042e89-fea5-415c-8bd2-e557abf25307",
"object": "webhook_event",
"created": "2023-10-31T17:36:56.491Z",
"type": "email.status.changed",
"changes": {
"status": {
"previous": "ASSIGNED",
"new": "RESOLVED"
}
},
"data": {
"id": "7c3c5609-b838-4643-8e8c-2a2da0a14c4a",
"email_inbox_id": "286d123e-5961-457c-8fd5-56f192ec315d",
"status": "OPEN",
"priority": "MEDIUM",
"topic": "Question about something",
"created": "2023-10-31T17:36:56.491Z",
"session_data": {
"username": "John Doe",
"email": "john@doe.com"
},
"messages": [
{
"id": "4d2e74b1-b645-4beb-801c-9502c3ddaca8",
"type": "USER",
"created": "2023-10-31T17:36:56.491Z",
"message": "Hello, I have a question about...",
"message_html": "<p>Hello, I have a question about...</p>",
"files": ["https://cdn.aidbase.ai/286d123e-5961-457c-8fd5-56f192ec315d/some-file.jpg"],
"errors": [],
"session_data": {
"username": "John Doe",
"email": "john@doe.com"
}
},
{
"id": "00bcde85-2b4d-4682-ac8b-b280dc819559",
"type": "AGENT",
"created": "2023-10-31T17:39:56.491Z",
"message": "Hi John, than you for your message...",
"message_html": "<p>Hi John, than you for your message...</p>",
"files": [],
"errors": [],
"session_data": {
"id": "2b06ada3f5bb",
"username": "jamesdoe",
"email": "james@doe.com",
"profile_image_url": "https://cdn.example.com/profile.jpg",
"reference_id": "1234567890"
}
},
...
]
}
}
email.priority.changed
This event is triggered when an email's priority is changed.
{
"id": "evt_1Hc2a8f36qsa23e",
"webhook_id": "c1042e89-fea5-415c-8bd2-e557abf25307",
"object": "webhook_event",
"created": "2023-10-31T17:36:56.491Z",
"type": "email.priority.changed",
"changes": {
"priority": {
"previous": "MEDIUM",
"new": "HIGH"
}
},
"data": {
"id": "7c3c5609-b838-4643-8e8c-2a2da0a14c4a",
"email_inbox_id": "286d123e-5961-457c-8fd5-56f192ec315d",
"status": "OPEN",
"priority": "MEDIUM",
"topic": "Question about something",
"created": "2023-10-31T17:36:56.491Z",
"session_data": {
"username": "John Doe",
"email": "john@doe.com"
},
"messages": [
{
"id": "4d2e74b1-b645-4beb-801c-9502c3ddaca8",
"type": "USER",
"created": "2023-10-31T17:36:56.491Z",
"message": "Hello, I have a question about...",
"message_html": "<p>Hello, I have a question about...</p>",
"files": ["https://cdn.aidbase.ai/286d123e-5961-457c-8fd5-56f192ec315d/some-file.jpg"],
"errors": [],
"session_data": {
"username": "John Doe",
"email": "john@doe.com"
}
},
{
"id": "00bcde85-2b4d-4682-ac8b-b280dc819559",
"type": "AGENT",
"created": "2023-10-31T17:39:56.491Z",
"message": "Hi John, than you for your message...",
"message_html": "<p>Hi John, than you for your message...</p>",
"files": [],
"errors": [],
"session_data": {
"id": "2b06ada3f5bb",
"username": "jamesdoe",
"email": "james@doe.com",
"profile_image_url": "https://cdn.example.com/profile.jpg",
"reference_id": "1234567890"
}
},
...
]
}
}
Chatbot
chatbot.userdata.collected
This event is triggered when a chatbot collects user data.
{
"id": "evt_1Hc2a8f36qsa23e",
"webhook_id": "c1042e89-fea5-415c-8bd2-e557abf25307",
"object": "webhook_event",
"created": "2024-04-31T17:36:56.491Z",
"type": "chatbot.userdata.collected",
"data": {
"session_id": "on65q",
"chatbot_id": "53M6x58RY34Dp_13AYVg9",
"session_data": {
"username": "John Doe",
"email": "johndoe@gmail.com"
}
}
}