Webhooks

Subscribe to events with POST /v1/webhook-subscriptions. SmartChat then sends a signed POST to your address for each event. Any 2xx answer confirms the delivery.

The technical reference below is in English, exactly as the names and fields appear in the API and in Claude.

curl -X POST https://api.smartchat.marketing/v1/webhook-subscriptions \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/hook", "events": ["contact.created"]}'

contact.created

A contact was created

FieldTypeRequiredDescription
idstringnoUnique event id, e.g. "message.received:<uuid>". Equals X-SmartChat-Delivery.
eventstring ("contact.created", "message.received", "conversation.created")no
created_atstringno
format date-time
dataobjectno
data.idstringno
format uuid
data.namestringno
data.emailstringnoEmpty string "" if none.
data.phonestringnoE.164; empty string "" if none.
data.optin_whatsappstring ("none", "pending", "confirmed", "opted_out")no
data.optin_emailstring ("none", "pending", "confirmed", "opted_out")no
data.tagsarray of stringno
data.languagestringno
data.sourcestringno
data.created_atstringnoThere is no updated_at on contacts.
format date-time

message.received

An inbound message was received

FieldTypeRequiredDescription
idstringnoUnique event id, e.g. "message.received:<uuid>". Equals X-SmartChat-Delivery.
eventstring ("contact.created", "message.received", "conversation.created")no
created_atstringno
format date-time
dataobjectnoItem of GET /messages; also the data of the message.received webhook event.
data.idstringno
format uuid
data.conversation_idstringno
format uuid
data.contact_idstringno
format uuid
data.channelstringnowhatsapp, email, ...
data.directionstring ("inbound", "outbound")no
data.typestringnotext, or a media type: image, video, audio, document, sticker, ...
data.textstringno
data.media_urlstringno
data.media_mimestringno
data.created_atstringno
format date-time

conversation.created

A conversation was created

FieldTypeRequiredDescription
idstringnoUnique event id, e.g. "message.received:<uuid>". Equals X-SmartChat-Delivery.
eventstring ("contact.created", "message.received", "conversation.created")no
created_atstringno
format date-time
dataobjectno
data.idstringno
format uuid
data.contact_idstringno
format uuid
data.channelstringno
data.created_atstringno
format date-time

Questions?

Email us at support@smartchat.marketing