Record an event
Records a custom event, optionally attached to a contact. Events drive segment membership and workflow triggers, so a matching enabled workflow starts as a result of this call.
contact_id must already exist in this project — unlike POST /api/track, this endpoint never creates contacts. Omit it for a project-level event.
Reserved system event names (email.*, contact.subscribed/unsubscribed, segment.*.entry/.exit) are rejected with 422: they are written by Sendly's own pipeline and accepting them from a caller would corrupt the series segments read.
This endpoint does NOT require an Idempotency-Key. Events are append-only and the highest-volume write on the surface; a duplicate is a data-quality question for the caller, not a money-path hazard.
Sending-only (pk_*) keys cannot record events — they hold the send capability and nothing else.
Requires the events:write scope — Record custom events for your contacts.
AuthorizationBearer <API Key>API key authentication. Use a sk_* (FULL) or pk_* (SENDING_ONLY) key as the bearer token. Public keys (pk_*) are restricted to the email-send endpoints and the self-serve list subscribe/unsubscribe pair; every other endpoint — event tracking included — answers 403 for them. In scope terms (used by /api/v1/* operations): FULL keys hold every scope; SENDING_ONLY keys hold only emails:send.
application/json- body
Body for POST /api/v1/events.
name*stringEvent name, e.g. user.signup.
1 <= length <= 200contact_id?stringContact the event belongs to. Must already exist in this project — unlike the legacy POST /api/track, this endpoint never creates contacts. Omit for a project-level event.
uuidpayload?Arbitrary event payload.
Event recorded
application/json- response
A recorded custom event.
id*stringuuidname*stringcontact_id*|uuidemail_id*|uuidpayload*|The payload recorded with the event, or null.
created_at*stringdate-timecurl -X POST 'https://api.sendly.now/api/v1/events' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "contact_id": "f245e2a3-e141-4d41-912c-b1c1f5bd5598", "email_id": "8e6bf5ae-e456-4654-87f8-33e2156caffc", "payload": { "property1": null, "property2": null }, "created_at": "2019-08-24T14:15:22Z"}