# Webhooks

Webhooks allow you to receive real-time updates when a specific event occurs, i.e. message is received from a contact. These events are HTTP POST requests being sent to an endpoint of your server. Request body is in JSON format. All events are delivered to a single webhook url (i.e. https://your-server.com/webhook).

When you receive a webhook event, you should always return HTTP response in 2xx class, i.e. 200 OK in shortest time possible. When reply is not 200 OK Smartsupp will try to re-deliver the webhook again later.

Enable Webhooks

Currently we don't have published UI for managing API and webhooks.
To enable webhooks please contact our support with your url and required events to subscribe.

# Content

All webhooks have following body structure:

  "type": "event_callback",
  "event": "<name>",
  "timestamp": "2020-08-08T07:53:18.825Z",
  "account_id": "881987",
  "app_id": "ap40qUkYi",
  "data": {
Property Type Description
type string All events will have always value "event_callback".
event string Name of the event (eg: "conversation.closed").
timestamp string ISO date format of date when event was created.
account_id string Identifies account.
app_id string Identifies specific integration.
data object Event related data.

# Events

# conversation.opened

Conversation was opened.

# conversation.closed

Conversation was closed by agent.

# conversation.rated

Conversation was rated by contact.

# conversation.agent_assigned

Agent was assigned to conversation.

# conversation.agent_unassigned

Agent was unassigned from conversation.

# conversation.agent_joined

Agent joined to conversation.

# conversation.agent_left

Agent left from conversation.

# conversation.agent_replied

Agent replied to conversation.

# conversation.contact_replied

Contact replied to conversation.

# conversation.message_delivered

Message was delivered to contact.

# conversation.message_delivery_failed

Message was not delivered to contact.

# conversation.visitor_closed

Message marked as closed by visitor.