Endpoint
Base URL:
https://api.revbridge.ai (production) or https://api-dev.revbridge.ai (development).Request format
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <API_KEY> |
x-customer-id | Yes | Your RevBridge customer ID |
Content-Type | Yes | application/json |
Body
Fields
| Field | Type | Required | Description |
|---|---|---|---|
users | array | Yes | Array of user objects (1–1,000 per request) |
users[].identifiers | object | Yes | At least one identifier: user_id, email, phone_number, or anon_id. Can also include profile fields. See User Identification. |
users[].user_properties | object | No | Key-value pairs that are accumulated on the user profile over time. The latest value for each key wins. See User Properties. |
users[].events | array | Yes | At least one event per user |
users[].events[].event_name | string | Yes | Name of the event (e.g., purchase, page_view) |
users[].events[].timestamp | string | No | ISO 8601 timestamp. Defaults to the current time if omitted. |
users[].events[].revenue | number | No | Revenue amount associated with the event |
users[].events[].event_value | number | No | Numeric value for the event |
users[].events[].{custom} | any | No | Any additional key-value pairs are stored as event properties |
Response format
202 — Accepted
Returned when at least one user passes validation. The response includes counts and any per-user errors.400 — Bad Request
Returned when the payload is invalid or all users fail validation.401 — Unauthorized
Returned when the API key is missing, invalid, or thex-customer-id header is absent.
413 — Payload Too Large
Returned when the request body exceeds 10 MB.503 — Service Unavailable
Returned when the service is temporarily unable to process requests. Retry with exponential backoff.Partial acceptance
The Events API uses partial acceptance: valid users are processed even if other users in the same request fail validation. This means a single request can return202 Accepted with both users_accepted > 0 and users_rejected > 0.
Always check the
users_rejected field in the response. If it is greater than zero, inspect the errors array to understand which users failed and why.Trace ID
Every response includes atrace_id. This unique identifier can be used to:
- Correlate requests with RevBridge support for debugging
- Log and track requests in your own systems
- Match accepted events to their downstream effects
Examples
Simple event
Send a single purchase event for one user.cURL
cURL
JavaScript (fetch)
JavaScript (fetch)
Python (requests)
Python (requests)
Batch request — multiple users
Send events for multiple users in a single request for better performance.Multiple events per user
A single user can have multiple events in one request. This is useful for sending a batch of historical events.Custom event properties
Any key-value pairs beyond the standard fields are stored as custom event properties.User properties
Useuser_properties to accumulate profile attributes over time. Unlike identifiers (which are set once), user properties are merged across events — the latest value for each key always wins.
This is useful for tracking attributes that change over time and can arrive sparsely across different events.
User properties are accumulated over time using a last-write-wins strategy. If you send
loyalty_tier: "gold" in one event and loyalty_tier: "platinum" in a later event, the profile will show "platinum". Properties not included in a request are left unchanged.identifiers, user_properties, and event properties:
identifiers | user_properties | Event {custom} | |
|---|---|---|---|
| Scope | User profile (identity) | User profile (attributes) | Single event |
| Used for | Matching and merging profiles | Segmentation and personalization | Event-level analytics |
| Persistence | Permanent (linked to identity graph) | Last-write-wins across events | Stored per event |
| Example | email, phone_number, first_name | loyalty_tier, lifetime_value | product_id, cart_total |
