Contact events
List the events of a contact
The events you reported for the contact with POST /v2/contact-events, newest first, each with what it sent or why it did not. The cases of the contact are in GET /v2/cases?contactId=.
Required scope: triggers:read.
path Parameters
id^ctc_[0-9A-Za-z]{22}… · requiredThe id of the contact (ctc_…).
query Parameters
limitcursorThe nextCursor of the previous page, with the same filters.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
List the events of a contact › Responses
objecthasMorenextCursorReport a contact event
Something happened to a contact in your system. The triggers that listen to this type send their template. Answers 201 with what was sent, or 202 with a reason: no_trigger, opted_out, no_phone, template_not_approved, human_in_control or cooldown. If the contact answers, the agent continues with the data of the event and the instructions in context. onReply.instructions replaces the fixed instructions of the trigger for this event. A trigger with onEvent also opens or moves the case right away, reported in caseActions. A trigger with cadence sends its first attempt now and the rest later, each one reported by the trigger.attempted webhook event; reporting the same event again while the cadence runs answers 202 cadence_active. Use it when something happened to a contact; do not use it to send a one-off message (use POST /v2/whatsapp/messages). Send an Idempotency-Key so a retry of the same request does not report the event twice. Use dryRun=true first: it runs the same checks (contact, onReply, triggers that match, template, variables, allowlist, opt-out, cooldown, cadence, case actions) and answers 200 with what would be sent or why not, without creating the contact, the event, cases or messages; ids in it are not saved.
Required scope: events:write.
query Parameters
dryRunWhen true, the request goes through the same validation as the real one and is answered with what would happen (always 200), and nothing is saved, sent or charged. The answer has the same shape as the real one plus dryRun: true; an id in it is not saved. It does not use the Idempotency-Key.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Report a contact event › Request Body
typeYour own name for the fact.
Values the triggers can map to template variables.
For this event only. onReply.instructions replaces the fixed instructions of the trigger.
Report a contact event › Responses
dryRun=true: what the event would do; nothing is sent or saved.
objectidtypecontactIdresultWhat each matching trigger with onEvent did to the case of the contact: opened a new case, moved the open one, left it where it was (unchanged), or found no open case to move (none). Empty when no trigger has onEvent.
reasonWhy nothing was sent: null when the matching triggers only act on the case and have no message, no_trigger, opted_out, no_phone, template_not_approved, human_in_control, cooldown, no_whatsapp_number, not_allowed or missing_variable. Cadence triggers add cadence_active (the contact is already in this cadence) and outside_window (the first attempt waits for the next window). Email triggers add no_email, recipient_not_allowed, no_verified_domain and open_case_elsewhere.
createdAtdryRunPresent and true when the request had dryRun=true.
Retrieve a contact event
Which triggers matched, what was sent, or why nothing was.
Required scope: triggers:read.
path Parameters
id^cev_[0-9A-Za-z]{22}… · requiredThe id of the contact event (cev_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Retrieve a contact event › Responses
objectidtypecontactIdresultWhat each matching trigger with onEvent did to the case of the contact: opened a new case, moved the open one, left it where it was (unchanged), or found no open case to move (none). Empty when no trigger has onEvent.
reasonWhy nothing was sent: null when the matching triggers only act on the case and have no message, no_trigger, opted_out, no_phone, template_not_approved, human_in_control, cooldown, no_whatsapp_number, not_allowed or missing_variable. Cadence triggers add cadence_active (the contact is already in this cadence) and outside_window (the first attempt waits for the next window). Email triggers add no_email, recipient_not_allowed, no_verified_domain and open_case_elsewhere.
createdAt