The optOut webhook event is triggered whenever a lead opts out of receiving further messages from your Apten assistant. This can be used to update your CRM or other systems about the lead’s communication preferences.

Payload

SMS Example

{
  "event": "optOut",
  "data": {
    "leadId": "a7e92c5d-f301-4b89-ae16-8f35d02cx9z",
    "phone": "+13305551234",
    "channel": "sms",
    "optOutReason": null,
    "isTwilioOptOut": true
  },
  "timestamp": "2024-02-18T09:45:22Z"
}

Email Example

{
  "event": "optOut",
  "data": {
    "leadId": "a7e92c5d-f301-4b89-ae16-8f35d02cx9z",
    "phone": "+13305551234",
    "channel": "email",
    "optOutReason": "UNSUBSCRIBE_LINK",
    "isTwilioOptOut": null
  },
  "timestamp": "2024-02-18T09:45:22Z"
}

Properties

PropertyTypeDescription
eventstringThe webhook event type (optOut).
data.leadIdstringThe unique identifier for the lead who opted out.
data.phonestringThe phone number of the lead who opted out.
data.channelstringThe communication channel for the opt-out. Can be sms or email.
data.optOutReasonstringThe reason for the opt-out. Only set for email opt-outs, null for SMS. Can be MANUAL, COMPLAINT, BOUNCE, or UNSUBSCRIBE_LINK.
data.isTwilioOptOutbooleanIndicates whether the opt-out was processed through Twilio. Will be null for email opt-outs.
timestampstringThe ISO 8601 timestamp when the opt-out occurred.