Skip to main content
Track events from your app for segmentation and automations. Events are automatically associated with leads: if the email does not exist, RQE creates a new lead with empty data. To turn these events into an audience that maintains itself, see Segments.

Authentication

Learn more in v1 Public API.

Retries without duplicates

Add the Idempotency-Key header to POST /v1/events` and `POST /v1/events/bulk when you sync from your system. If the request fails on the network and you retry with the same key, you get the original response and nothing is written twice.
  • Use one unique key per operation, up to 100 characters (for example, the order id or a uuid). You can also send it in the body as idempotency_key.
  • The key lasts 24 hours per project. A retry returns the original response with the Idempotency-Replayed: true header.
  • Same key with a different body: 409 with code: "IDEMPOTENCY_CONFLICT". Use a new key for a new operation.
  • 5xx responses are not stored: retrying with the same key processes the request again.

Rate limit

Each API key can make up to 600 requests per minute to each write endpoint. Over that, you get 429 with the Retry-After header (seconds until you can continue):
Wait those seconds and retry with the same Idempotency-Key. To sync a lot of data, use bulk: up to 1,000 items per request. Every response includes RateLimit-Limit (the cap), RateLimit-Remaining (what you have left this minute) and RateLimit-Reset (seconds until the next minute). If RateLimit-Remaining reaches 0, wait RateLimit-Reset before continuing and you will never see the 429.

Endpoints

POST /v1/events

Track an individual event. Body parameters: Request:
Response 201 Created
created_lead: true = the email did not exist and a new lead was created automatically. Errors: Learn more in Leads.

POST /v1/events/bulk

Track up to 1,000 events in a single request. Each event triggers the automations waiting for that event, just like POST /v1/events: the contact enters once per event received. Body parameters: Request:
Response 201 Created
  • total: number of events recorded.
  • created_leads: number of new leads created automatically (unique emails that did not exist).
Errors:

GET /v1/events

Lists events with filters. Ordered by timestamp descending (most recent first). Query parameters: Request:
Response 200 OK
Learn more in Node.js SDK.

Recording sales (stores without Shopify)

For a purchase to add revenue to your campaigns and automations, send it as soon as it is paid:
The sale is attributed like a Shopify order: to the last campaign and the last automation that person opened or clicked within your project’s attribution window. If there is none, it stays in Sales as unattributed. If your project has Shopify connected, these events do not add revenue: orders already come from Shopify. sk_test_ keys do not add revenue either. Refunds are not deducted through this path yet.

Errors

Error format: { "error": "message" }. Codes common to all endpoints: