Track events from your product
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://api.azimea.com/v1/events"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"events\": [ { \"id\": \"evt_7f3c2a\", \"name\": \"user.signed_up\", \"occurredAt\": \"2026-10-05T09:30:00+00:00\", \"contact\": { \"externalId\": \"user_123\", \"email\": \"emma@example.com\" }, \"properties\": { \"plan\": \"trial\", \"source\": \"landing-page\" } } ] }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://api.azimea.com/v1/events';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"events":[{"id":"evt_7f3c2a","name":"user.signed_up","occurredAt":"2026-10-05T09:30:00+00:00","contact":{"externalId":"user_123","email":"emma@example.com"},"properties":{"plan":"trial","source":"landing-page"}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.azimea.com/v1/events \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "events": [ { "id": "evt_7f3c2a", "name": "user.signed_up", "occurredAt": "2026-10-05T09:30:00+00:00", "contact": { "externalId": "user_123", "email": "emma@example.com" }, "properties": { "plan": "trial", "source": "landing-page" } } ] }'Tells Azimea what people did in your product (user.signed_up, trial.ending, kyc.completed). Each event is recorded on the person’s timeline and starts every published flow whose trigger is that event name; the person is found, or created, from contact (the same object POST /contacts takes, with at least id, externalId or email). Send up to 100 events per call; a call counts once for the rate limit. id is your own id, unique in your account: sending it again is counted as a duplicate, so retries are safe. Names use lowercase letters, digits, _ and ., start with a letter, at most 64 characters; the prefixes order., cart., customer., subscriber., contact., email. and azimea. are reserved. occurredAt may be up to 30 days in the past and not in the future; properties is a JSON object of at most 16 KB and 3 levels. Each event is accepted or rejected on its own, with activity.* codes per field. Needs the events:write permission.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The events, up to 100 per call. Each is accepted or rejected on its own.
object
Your own id for this event, unique in your account. Sending it again counts as a duplicate, so retries are safe.
Example
evt_7f3c2aWhat happened: lowercase letters, digits, _ and ., starting with a letter, at most 64 characters. The prefixes order., cart., customer., subscriber., contact., email. and azimea. are reserved.
Example
user.signed_upWhen it happened: at most 30 days in the past, never in the future. Now, when left out.
Example
2026-10-05T09:30:00+00:00Who did it: the same object POST /contacts takes, with at least a user id (externalId) or an email.
Example
{ "externalId": "user_123", "email": "emma@example.com"}Anything about the event, as a JSON object of at most 16 KB and 3 levels deep. Flows can filter on it and emails can show it.
Example
{ "plan": "trial", "source": "landing-page"}Example
[ { "id": "evt_7f3c2a", "name": "user.signed_up", "occurredAt": "2026-10-05T09:30:00+00:00", "contact": { "externalId": "user_123", "email": "emma@example.com" }, "properties": { "plan": "trial", "source": "landing-page" } }]Example
{ "events": [ { "id": "evt_7f3c2a", "name": "user.signed_up", "occurredAt": "2026-10-05T09:30:00+00:00", "contact": { "externalId": "user_123", "email": "emma@example.com" }, "properties": { "plan": "trial", "source": "landing-page" } } ]}Responses
Section titled “Responses”How many events were accepted, were duplicates, or were rejected (with the reasons per event)
object
true when the call worked, false when errors say why it did not.
The answer itself; null when the call failed.
object
How many events were accepted.
How many were ignored because their id was already used.
The events that were refused, each with its position and reasons.
object
The event’s position in your request, starting at 0.
Why it was refused.
object
A stable error code, listed in the error codes catalog.
The event field the problem is about.
The numbers the code refers to (a minimum, a maximum), when there are any.
object
An internal result number. Rely on the HTTP status code instead.
What went wrong, one entry per problem; empty when the call worked.
object
A stable code such as audience.contact_not_found. Branch on this, never on message. Every code is listed in the error codes catalog.
An English sentence for your logs. Do not show it to end users: it can change.
The numbers the message mentions (a minimum, a maximum), when there are any.
object
The same problems grouped by the request field they belong to; null when none is tied to a field.
object
object
A stable code such as audience.contact_not_found. Branch on this, never on message. Every code is listed in the error codes catalog.
An English sentence for your logs. Do not show it to end users: it can change.
The numbers the message mentions (a minimum, a maximum), when there are any.
object
Example
{ "isSuccess": true, "value": { "accepted": 1, "duplicates": 0, "rejected": [] }, "status": 0, "errors": [], "fieldErrors": null}Validation failed: no events, or more than 100 (activity.batch_too_large)
object
true when the call worked, false when errors say why it did not.
The answer itself; null when the call failed.
An internal result number. Rely on the HTTP status code instead.
What went wrong, one entry per problem; empty when the call worked.
object
A stable code such as audience.contact_not_found. Branch on this, never on message. Every code is listed in the error codes catalog.
An English sentence for your logs. Do not show it to end users: it can change.
The numbers the message mentions (a minimum, a maximum), when there are any.
object
The same problems grouped by the request field they belong to; null when none is tied to a field.
object
object
A stable code such as audience.contact_not_found. Branch on this, never on message. Every code is listed in the error codes catalog.
An English sentence for your logs. Do not show it to end users: it can change.
The numbers the message mentions (a minimum, a maximum), when there are any.
object
Example
{ "isSuccess": false, "value": null, "status": 5, "errors": [ { "code": "validation.required", "message": "Fill in this field.", "params": null } ], "fieldErrors": { "email": [ { "code": "validation.required", "message": "Fill in this field.", "params": null } ] }}Missing or invalid API key
The key lacks the events:write permission
Too many requests for this key