curl --request POST \
--url https://pub-api.conversion.ai/api/v2/events \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"email": "jane@example.com",
"event": "log_in",
"data": {
"device": "mobile",
"location": "US"
}
}
'{
"data": {
"cnvEventId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"cnvContactId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}Events
Track Event
Record a custom event for a contact.
POST
/
v2
/
events
curl --request POST \
--url https://pub-api.conversion.ai/api/v2/events \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"email": "jane@example.com",
"event": "log_in",
"data": {
"device": "mobile",
"location": "US"
}
}
'{
"data": {
"cnvEventId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"cnvContactId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}Authorizations
apiKeyapiKeyQuery
Body
application/json
An external user identifier for the contact. At least one of userId or email is required. If userId matches a contact, that contact is used. If not, falls back to email. If the email matches a contact that has a different userId, a conflicting_identifier error is returned.
Example:
"user_12345"
An optional client-generated identifier for the event. Use stable identifiers (like order IDs) to make retries idempotent: if an event with this ID already exists, the duplicate is ignored, the existing event is left unchanged, and the response reports success with duplicate: true and the original event's cnvEventId. If omitted, a new event is always created.
Example:
"evt_abc123"
Was this page helpful?