Events

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


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

POST/v1/batch/events

Sends events to your site. Events create new users if they do not already exist in your account.

This endpoint takes an array 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

GET/v1/fetch/exports/events

Pages 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.

A team admin needs to turn on Allow Export and Search API in your site's Settings > Security before you can use this endpoint. It's already on for Enterprise sites. See Plans and API access.
One export returns up to 10,000 events. For more, export one created_at window at a time, such as a day or a week. See Large Exports below.
Send the exact same type and created_at filters on every request in an export. A cursor only works with the filters it was created for.
Request the next page within 5 minutes. A cursor expires 5 minutes after the response that returned it.

Required Attributes

  • Name
    site_uuidstring
    Description

    The site to export events from.

  • Name
    typestring
    Description

    The event name to export, like $purchase or signed_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_cursor from 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.
    gt date string - after this time
    gte date string - at or after this time
    lt date string - before this time
    lte date 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, and attributes.

  • 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. null for 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 date if you sent one with Create Events.

  • Name
    data[].attributes.dataobject
    Description

    The event payload, including type and the details sent with the event.

  • Name
    meta.next_cursorstring|null
    Description

    Pass this as cursor to get the next page. null means the export is finished.

  • Name
    meta.limitinteger
    Description

    The page size used for this response.

  • Name
    meta.truncatedboolean
    Description

    true when the export stopped at 10,000 events and more events match. meta.next_cursor is null on 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.

StatusCodeWhat to do
422None. 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.
422missing_typeSend the event name in type.
422invalid_limitSend a limit from 1 to 1000.
422invalid_created_atUse only gt, gte, lt, and lte, with ISO 8601 timestamps that include a time zone.
422invalid_cursorThe cursor is malformed, belongs to another site, or the filters changed. Start the export again without a cursor.
422cursor_expiredMore than 5 minutes passed since the last page. Start the export again without a cursor.
429export_rate_limitedMore than 10 event exports were started for this site in the last minute. Continue existing exports with next_cursor, or wait a minute.
429export_busyMore 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.
503export_unavailableExport is temporarily unavailable. Retry the same request with the same cursor after a short backoff. No events are skipped.