Skip to main content
The optIn webhook event fires when a lead re-subscribes to a channel they had previously opted out of. It is the mirror of the optOut event, and can be used to re-enable messaging for the lead in your CRM or other systems. Like optOut, this event fires per channel: if a lead re-subscribes to more than one channel at once, you receive one event per channel.

Payload

SMS Example

A lead texts START to re-subscribe to SMS.
{
  "event": "optIn",
  "data": {
    "leadId": "a7e92c5d-f301-4b89-ae16-8f35d02cx9z",
    "externalLeadId": "003XX000004DHPY",
    "channel": "sms",
    "phone": "+13305551234",
    "email": null,
    "optInMessage": "START",
    "triggeredBy": "keyword"
  },
  "timestamp": "2024-02-18T09:45:22Z"
}

API Example

A lead is re-subscribed through the POST /leads/{leadId}/resubscribe endpoint.
{
  "event": "optIn",
  "data": {
    "leadId": "a7e92c5d-f301-4b89-ae16-8f35d02cx9z",
    "externalLeadId": "003XX000004DHPY",
    "channel": "email",
    "phone": "+13305551234",
    "email": "lead@example.com",
    "triggeredBy": "manual"
  },
  "timestamp": "2024-02-18T09:45:22Z"
}

Properties

PropertyTypeDescription
eventstringThe webhook event type (optIn).
data.leadIdstringThe unique identifier for the lead who opted back in.
data.externalLeadIdstringThe CRM lead ID (Salesforce, HubSpot, or Close CRM). Omitted when the lead has no linked CRM record.
data.channelstringThe channel the lead re-subscribed to. One of sms, email, or call.
data.phonestringThe phone number of the lead. null when no phone is on file.
data.emailstringThe email address of the lead. null when no email is on file.
data.optInMessagestringThe message text that triggered the opt-in (e.g. START). Included only when the lead sent a message; omitted for API-initiated and coupled opt-ins.
data.triggeredBystringWhat caused the opt-in. keyword — the lead sent a re-subscribe message. manual — the lead was re-subscribed through the API. coupling — the channel was re-subscribed alongside a coupled channel.
timestampstringThe ISO 8601 timestamp when the opt-in occurred.
Coupled channels. When SMS and voice are coupled for your organization, re-subscribing one re-subscribes the other. The channel the lead acted on carries triggeredBy: "keyword" or "manual"; the coupled channel emits its own event with triggeredBy: "coupling".
This event fires only when a channel actually transitions from opted-out to opted-in. A channel that was never opted out produces no event. Because the event is delivered at least once, your endpoint should handle occasional duplicates idempotently.
Opting back in on any channel also clears an active do-not-contact flag for the lead. There is no separate event for this — treat any optIn as also clearing do-not-contact.