Webhooks

Server event

An event that occurred server side that is related to a conversation between an agent and a user.

postWebhookserverEvent

Headers

X-Vibes-Eventclassunknown required

An HTTP header that indicates what type of event class the callback is. Options are ServerEvent, UserEvent, or UserMessage.

X-Vibes-Signatureunknown required

An HTTP header that contains a BASE64 encoded HMAC SHA512 signature.

Payload

agentIdstring

The agent's unique identifier.

sendTimestring Timestamp

Timestamp (RFC 3339) at which the webhook event was sent.

phoneNumberstring

Recipient device phone number in E.164 format.

messageIdstring

Identifier of the agent message this event relates to.

eventType'EVENT_TYPE_UNSPECIFIED' | 'TTL_EXPIRATION_REVOKED' | 'TTL_EXPIRATION_REVOKE_FAILED' | 'SENT' | 'FAILED'

The type of server event.

eventIdstring

Unique identifier of the event.

eventOrigin'VIBES' | 'CARRIER'

Source from which the event originated. Set only for custom SENT or FAILED events.

errorCodestring

Error code, present when the event indicates a failure.

errorMessagestring

Human-readable error description, present when the event indicates a failure.

totalPayloadSizeBytesinteger

Total payload size of the related message in bytes.

Example payload

{
  "sendTime": "2014-10-02T15:01:23Z",
  "phoneNumber": "+15555555555"
}

Response

Return 200 to acknowledge receipt of the webhook.

Changes

Webhooks have no change history: a webhook is keyed by its event name rather than a path and method, so no recorded change can name it.