Events
Events are the core signal system in Bento. They capture meaningful user actions with detailed context so you can understand behavior, build better segments, and trigger automations. Use events to power workflows and reporting with accurate, real-time data.
Before you start sending events, map names and follow-ups in the free Event Tracking Plan spreadsheet.
Available Endpoints
- POST
/batch/eventsCreate Events
Track user activity, update profile fields, and trigger automations.
- GET
/fetch/exports/eventsExport Events
Page through every event of one type, oldest first.
The Events Model
The events model requires you to pass an event type and email. User fields, details, and the date are optional fields for recording metadata about the event or the visitor.
Properties
- Name
typestring- Description
The name of the event
- Name
emailstring- Description
Email of the event user
- Name
fieldsobject- Description
An object of key/value pairs written to the subscriber's profile fields. Must not be nested.
- Name
detailsobject- Description
An object of key/value pairs stored as event metadata. Can be nested.
- Name
datedatetime- Description
Optional timestamp for when the event happened. Omit it to use the time Bento receives the request.
Create Events
/v1/batch/eventsSends events to your site. Events create new users if they do not already exist in your account.
events that can contain 1 to 1000 events made up of the following keys. Required Attributes
- Name
typestring- Description
The name of the event
- Name
emailstring- Description
Email of the event user
Optional Attributes
- Name
fieldsobject- Description
An object of key/value pairs written to the subscriber's profile fields. Must not be nested.
- Name
detailsobject- Description
An object of key/value pairs stored as event metadata. Can be nested.
- Name
datedatetime- Description
Optional timestamp for when the event happened. Use an ISO 8601 value.
Response
Returns the count of events recorded.
- Name
resultsinteger- Description
Number of events accepted and queued for processing.
- Name
failedinteger- Description
Number of events Bento rejected from the request.
Export Events
/v1/fetch/exports/eventsPages through every event of one type on a site, oldest first. Use it to pull event history into a warehouse, a spreadsheet, or another tool. Filter by when Bento recorded the event with created_at, and pass the cursor from each response to get the next page.
Events from anonymous visitors are included, with email set to null.
created_at window at a time, such as a day or a week. See Large Exports below.type and created_at filters on every request in an export. A cursor only works with the filters it was created for.Required Attributes
- Name
site_uuidstring- Description
The site to export events from.
- Name
typestring- Description
The event name to export, like
$purchaseorsigned_up. Must match exactly, including case.
Optional Attributes
- Name
limitinteger- Description
Events per page, from 1 to 1000. Defaults to 500.
- Name
cursorstring- Description
Leave this out on the first request. On later requests, pass
meta.next_cursorfrom the previous response.
- Name
created_atobject- Description
When Bento recorded the event. Use ISO 8601 timestamps with a time zone, like
2026-10-21T13:00:00Z. URL-encode a+offset as%2B.
gtdate string - after this time
gtedate string - at or after this time
ltdate string - before this time
ltedate string - at or before this time
Response
Returns one page of events and the cursor for the next page.
- Name
dataarray- Description
JSON:API-style event records. Each item contains
id,type, andattributes.
- Name
data[].attributes.uuidstring- Description
Bento UUID for the event.
- Name
data[].attributes.typestring- Description
The event name.
- Name
data[].attributes.emailstring|null- Description
Email of the subscriber who triggered the event.
nullfor anonymous visitors.
- Name
data[].attributes.visitor_uuidstring|null- Description
Bento UUID for the visitor who triggered the event.
- Name
data[].attributes.created_atdatetime- Description
When Bento recorded the event. Exports are ordered and filtered by this time.
- Name
data[].attributes.happened_atdatetime- Description
When the event happened. Matches
dateif you sent one with Create Events.
- Name
data[].attributes.dataobject- Description
The event payload, including
typeand thedetailssent with the event.
- Name
meta.next_cursorstring|null- Description
Pass this as
cursorto get the next page.nullmeans the export is finished.
- Name
meta.limitinteger- Description
The page size used for this response.
- Name
meta.truncatedboolean- Description
truewhen the export stopped at 10,000 events and more events match.meta.next_cursorisnullon that page.
Large Exports
Each export stops at 10,000 events. When meta.truncated is true, start a new export without a cursor for the rest of the range. Either split the created_at range into smaller windows, or set created_at[gte] to the created_at of the last event you received and skip any uuid you already have.
Errors
Errors return a JSON body with an error message and, for export-specific errors, a code.
| Status | Code | What to do |
|---|---|---|
422 | None. Error is Turn on "Allow Export and Search API" in your site's Security settings to use this endpoint. | Ask a team admin to turn it on in Settings > Security. |
422 | missing_type | Send the event name in type. |
422 | invalid_limit | Send a limit from 1 to 1000. |
422 | invalid_created_at | Use only gt, gte, lt, and lte, with ISO 8601 timestamps that include a time zone. |
422 | invalid_cursor | The cursor is malformed, belongs to another site, or the filters changed. Start the export again without a cursor. |
422 | cursor_expired | More than 5 minutes passed since the last page. Start the export again without a cursor. |
429 | export_rate_limited | More than 10 event exports were started for this site in the last minute. Continue existing exports with next_cursor, or wait a minute. |
429 | export_busy | More than 2 export requests are running at once for this site, counting subscriber exports too. Request pages one at a time and retry after a short wait. |
503 | export_unavailable | Export is temporarily unavailable. Retry the same request with the same cursor after a short backoff. No events are skipped. |