Endpoint
Base URL:
https://api.revbridge.ai (production) or https://api-dev.revbridge.ai (development).Request format
Headers
Body
Fields
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 or invalid.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
E-commerce events — the recommended contract
For e-commerce, use this exact shape on every event. Consistency is what makes the optimization engine, product audiences, and the funnel work out of the box. Identifiers — send these four on every request:emailandphone_numbermake the profile reachable — without at least one of them the person can never receive a campaign.first_namepowers personalization in every message; treat it as required.user_idonly if it is your real internal ID — never a fabricated one. No internal ID? Omit it.
Products: send only
product_ids. Always an array of catalog IDs/SKUs — even for a single product. Category, name, price, and image come from your connected catalog (Shopify or product feed), so don’t duplicate them on events; quantity is not used by the optimization engine. IDs that match your catalog are what unlock product- and category-based audiences and product recommendations.
The golden purchase event
The full journey, consistently
The same shape across the whole funnel — same identifiers on every request,product_ids always an array:
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. Same shape as the e-commerce contract — identifiers once, events in chronological order: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:
