Track a custom event for a contact
Record a custom event, creating or updating the contact by email as a side effect. Requires a FULL (sk_*) key — SENDING_ONLY (pk_*) keys answer 403, since recording events is not sending mail. Reserved system event names (email.*, contact.subscribed/unsubscribed, segment.*.entry/.exit) are rejected.
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/track — record a custom event for a contact.
event*string1 <= lengthemail*stringemailsubscribed?booleandata?Arbitrary JSON value (string, number, boolean, null, array, or object).
Event tracked
application/json- response
Response from POST /api/track.
success*truetruedata*curl -X POST 'https://api.sendly.now/api/track' \ -H 'Content-Type: application/json' \ -d '{ "event": "string", "email": "user@example.com"}'{ "success": true, "data": { "contact": "ad596931-5d7c-4d2b-907e-5b64c9432eb4", "event": "1a4a8620-0119-4336-af71-a3b3e24f5ebc", "timestamp": "2019-08-24T14:15:22Z" }}