Events › Report events in bulk
Events
Report events in bulk
POST/api/{ORG}/eventsPermalink
Up to 100 events: each row { name, link?, click?, … } as one event's body, the link and click named in the row. Each row is recorded or refused by itself, and the answer lists each in order: { status, event?, error? } (201 recorded, 200 a repeat, else the refusal's status and its envelope). Send an id with each so a retry records nothing twice.
- Permission
- Integrations · create
- Plan
- Plans that include the API: Pricing
- Retry
- Safe with an
Idempotency-Key
Example request
curl -X POST "https://console.brevily.com/api/NORTHWIND/events" \ -H "x-api-key: brv_ak_7Fq2Lw9xK3" \ -H "x-api-secret: $BREVILY_SECRET" \ -H "Idempotency-Key: 4f9c1e2a-autumn" \ -H "Content-Type: application/json" \ -d '[ { "name": "example", "link": "example", "click": "example", "customer": "example", "amount": 1, "currency": "example", "id": "01JC6Y8QH2M4ZK7T9VRW3XNB5D", "occurredAt": "2026-11-05T09:41:00Z", "properties": "example" } ]'const res = await fetch("https://console.brevily.com/api/NORTHWIND/events", { method: "POST", headers: { "x-api-key": "brv_ak_7Fq2Lw9xK3", "x-api-secret": process.env.BREVILY_SECRET, "Idempotency-Key": "4f9c1e2a-autumn", "Content-Type": "application/json", }, body: JSON.stringify([ { "name": "example", "link": "example", "click": "example", "customer": "example", "amount": 1, "currency": "example", "id": "01JC6Y8QH2M4ZK7T9VRW3XNB5D", "occurredAt": "2026-11-05T09:41:00Z", "properties": "example" } ]),});const answer = await res.json();Example answer
[ { "status": 1, "event": "example", "error": "example" }]{ "code": "VALIDATION_FAILED", "message": "Check the form. name: Not a value this field takes.", "details": { "fields": { "name": "Not a value this field takes." } }, "requestId": "18188559082372202519"}Made-up values. Send your own Idempotency-Key, one per change.
PathPermalink
| Name | Type | Required | Description | Allowed values |
|---|---|---|---|---|
ORG | string | required | Your organisation’s code. | 3 to 20 characters |
BodyPermalink
JSON. An unknown field is refused with a 400 naming it.
| Name | Type | Required | Description | Allowed values |
|---|---|---|---|---|
name | string | required | The event’s name: sale, install, lead or your own. | — |
link | string | optional | The link it is against. | — |
click | string | optional | The click it is bound to (the id in brv_click), with its link. | — |
customer | string | optional | Your id for the person. | — |
amount | integer | optional | The amount in minor units; needs currency. | — |
currency | string | optional | The amount’s ISO 4217 currency. | — |
id | string | optional | Your own id for it; a repeat is recorded once. | — |
occurredAt | date-time | optional | When it happened, ISO 8601. | — |
properties | any | optional | Its properties, as for one event. | — |
AnswerPermalink
A list of EventOutcome, one page at a time: paging.
| Name | Type | Description | Allowed values |
|---|---|---|---|
status | integer | 201 recorded, 200 a repeat, else the refusal’s status. | — |
event | any | The event recorded, as a single report answers it. | — |
error | any | The refusal: its code, message and details. | — |
ErrorsPermalink
| Status | Code | When |
|---|---|---|
| 400 | VALIDATION_FAILED |
A field, a parameter or the body is wrong; details.fields says which. |
| 400 | IDEMPOTENCY_KEY_INVALID |
The Idempotency-Key is longer than 255 characters. |
| 401 | UNAUTHENTICATED |
No key, a key that does not match, or one expired or revoked. |
| 403 | ACCESS_DENIED |
The key lacks Integrations · create, or the organisation’s plan does not include it. |
| 404 | NOT_FOUND |
No organisation with that code for this key, or no such record in it. |
| 409 | CONFLICT |
|
| 409 | IDEMPOTENCY_IN_FLIGHT |
The first call with this Idempotency-Key is still running. |
| 413 | PAYLOAD_TOO_LARGE |
|
| 415 | UNSUPPORTED_MEDIA |
|
| 422 | IDEMPOTENCY_MISMATCH |
The same Idempotency-Key was sent with a different request. |
| 429 | RATE_LIMITED |
Too many calls: wait Retry-After seconds. |
Rate limitsPermalink
Counted with every other call of the organisation, by plan: Pricing. The answer carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset; more on rate limits.