For the complete documentation index, see llms.txt. This page is also available as Markdown.

Events

Append-only activity events attached to contacts. Powers segments, flows, and analytics.

List events across all contacts.

get

Paginated event firehose, most recent first by occurred_at. Common filters: ?filter[name]=purchase.completed, ?filter[contact_id]=, ?filter[location_id]=, ?filter[occurred_at][gte]=..., ?filter[occurred_at][lt]=.... For a single contact use GET /v3/contacts/{id}/events. For aggregates use POST /v3/reports/{id}/run or build a segment. Rate limit bucket: read.

Authorizations
AuthorizationstringRequired

The API Secret from the Gleantap dashboard under Settings β†’ API (Generate New Key if none exists). Send it bare (40 hex characters) or prefixed as gltp_sk_live_<40-hex>. There is no sandbox: every key acts on the live account.

Keys are account-scoped and carry all permissions on that account (no per-key scope selection). Cross-workroom reads are unrestricted by default β€” narrow with ?workroom= / Gleantap-Workroom on each request. Revoke via the dashboard.

For per-user consent, per-workroom scoping, and short-lived tokens, use OAuth 2.1 instead.

Query parameters
workroomstringOptional

Same semantics as the Gleantap-Workroom header, including that a write should never be sent without a workroom the user actually chose, and that an omitted workroom scopes a read to the account default rather than spanning the account. Prefer this on GETs so proxies and caches can key on it. Accepts name, prefixed ID, raw hex, or all.

limitinteger Β· min: 1 Β· max: 100Optional

Page size. Default 25, max 100.

Default: 25
cursorstringOptional

Opaque cursor from a prior response's next_cursor, to fetch the NEXT page (alias - after). On listContacts and listSegmentContacts, use before with a prev_cursor to page backward; other list endpoints are forward-only.

sortstringOptional

Comma-separated list of fields to sort by. Leading - reverses. Default -created_at. Sortable fields vary per resource; unsortable fields return 400 invalid_sort_field.

Example: -created_at,email
Header parameters
Gleantap-VersionstringOptional

Minor version to run the request under (date-based). Older dates remain supported for at least 24 months. If omitted, the account's default pinned version is used.

Example: 2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$
Gleantap-AccountstringOptional

Target customer account, as acc_<24-hex> or a bare 24-hex ID. Only for Gleantap staff (CSM) tokens, which authenticate against the internal staff directory and are bound to no account; for a normal customer token the account is fixed by the token and this header is ignored.

A staff token MUST name an account on every request β€” there is no default, and omitting it returns 400 admin_account_required rather than falling back to some first account. Switching accounts is just a different value here; no re-authorization. Account names are rejected (400 admin_account_invalid) because they are neither unique nor stable β€” list IDs with GET /v3/accounts.

Every impersonated response carries an impersonation block naming the account actually acted on, so an account switch mid-session is always visible. Also settable via ?account=.

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

Which workroom to act in. Accepts a workroom name (case-insensitive), a prefixed ID (wrm_<hex>), a raw 24-hex ID, or the literal all.

On any write, ask the user which workroom β€” do not omit this. Optional here means the server has a fallback, not that the fallback is what anyone wanted: an omitted workroom sends the write to the account's default workroom, and accounts routinely have dozens. Creating a contact, flow, campaign or segment in the wrong workroom puts it where nobody is looking, and moving it afterwards is manual.

The one case where you need not ask: the account has exactly one workroom. Call listWorkrooms to find out β€” if it returns a single row, use it; if it returns several, ask which one before writing.

Reads are scoped too. Omitting a workroom on a read does not span the account β€” it narrows to the same default workroom a write would go to, and the response carries a workroom_defaulted warning saying so. So a count, a list or a segment preview describes one workroom unless you said otherwise. Pass all to deliberately span every workroom; that is the only way to get account-wide figures, and it is never the default. listWorkrooms itself is never narrowed, since it is how you discover what to ask for.

Also settable via ?workroom= or a workroom body field (POST/PATCH only) β€” query wins over header wins over body.

Example: G Test1
Responses
200

A page of events.

application/json
objectconst: listRequired
has_morebooleanRequired

True if additional records exist beyond this page.

next_cursorstring Β· nullableRequired

Opaque cursor for the next page. Null on the last page.

prev_cursorstring Β· nullableRequired

Cursor for the previous page. Supported on listContacts and listSegmentContacts: pass it back as ?before=... to page backward; null on the first page. On every other list endpoint paging is forward-only and this is always null.

get/events
GET /v3/events HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

A page of events.

{
  "object": "text",
  "data": [
    {
      "id": "evt_01H8XKCAR2A9NZ0YV3JW4H1P5K",
      "object": "text",
      "name": "purchase.completed",
      "contact_id": "con_6a7eaec3505bea795709f897",
      "location_id": "loc_01H8XKG...",
      "properties": {
        "amount": 99,
        "currency": "USD",
        "sku": "membership_annual"
      },
      "occurred_at": "2026-05-27T14:23:11.482Z",
      "created_at": "2026-05-27T14:23:11.482Z",
      "type": "text",
      "is_visit": true,
      "is_purchase": true,
      "is_appointment": true,
      "is_badge": true,
      "is_rating": true,
      "is_reservation": true,
      "is_challenge": true,
      "ANY_ADDITIONAL_PROPERTY": true
    }
  ],
  "has_more": true,
  "next_cursor": "text",
  "prev_cursor": "text"
}

Record an event.

post

Append-only β€” no update or delete. Use namespace.action snake_case naming. The server derives type, is_visit, is_purchase, and the display name from the namespace + your properties. Common patterns:

Purchases (purchase.*) β€” is_purchase: 1, type: sale. Pass an items[] array of product-name strings you purchased. If items is omitted the server synthesizes from properties.product_name (or products[], product_names[], sku). With none of those present it falls back to the event_name string, which shows up as "purchase.completed" in the UI. Include amount (total order value) and currency. The dashboard's event card displays items[0] as the headline.

Visits (visit.* or legacy class.checked_in) β€” is_visit: 1, type: visit. Pass properties.class_name (or service_name, visit_name) β€” that becomes the event's name displayed in the UI. Add location / location_id when known. Also updates the contact's visits.last_visit_* / visits.first_visit_* summary (pass properties.status; Cancelled visits are ignored for first-visit). Re-posting the same external_id replaces the earlier event instead of adding a second one.

Appointments (appointment.completed) β€” is_visit: 1, type: appointment. Pass properties.appointment_name or service_name.

State changes on first-class resources (opportunity moved, membership canceled, appointment rescheduled) are emitted automatically by the platform; recording them here as well produces duplicates that skew segments. Idempotency-Key is strongly recommended. Rate limit bucket: write.

Requires the event name and which contact it belongs to. Optional fields fall back to a server-side default when omitted. That includes the workroom: an omitted workroom resolves to the account default, and a record created in the wrong workroom is invisible where it was expected. Half-specified records are created successfully and then have to be hunted down and fixed by hand.

Authorizations
AuthorizationstringRequired

The API Secret from the Gleantap dashboard under Settings β†’ API (Generate New Key if none exists). Send it bare (40 hex characters) or prefixed as gltp_sk_live_<40-hex>. There is no sandbox: every key acts on the live account.

Keys are account-scoped and carry all permissions on that account (no per-key scope selection). Cross-workroom reads are unrestricted by default β€” narrow with ?workroom= / Gleantap-Workroom on each request. Revoke via the dashboard.

For per-user consent, per-workroom scoping, and short-lived tokens, use OAuth 2.1 instead.

Query parameters
workroomstringOptional

Same semantics as the Gleantap-Workroom header, including that a write should never be sent without a workroom the user actually chose, and that an omitted workroom scopes a read to the account default rather than spanning the account. Prefer this on GETs so proxies and caches can key on it. Accepts name, prefixed ID, raw hex, or all.

Header parameters
Gleantap-VersionstringOptional

Minor version to run the request under (date-based). Older dates remain supported for at least 24 months. If omitted, the account's default pinned version is used.

Example: 2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$
Gleantap-AccountstringOptional

Target customer account, as acc_<24-hex> or a bare 24-hex ID. Only for Gleantap staff (CSM) tokens, which authenticate against the internal staff directory and are bound to no account; for a normal customer token the account is fixed by the token and this header is ignored.

A staff token MUST name an account on every request β€” there is no default, and omitting it returns 400 admin_account_required rather than falling back to some first account. Switching accounts is just a different value here; no re-authorization. Account names are rejected (400 admin_account_invalid) because they are neither unique nor stable β€” list IDs with GET /v3/accounts.

Every impersonated response carries an impersonation block naming the account actually acted on, so an account switch mid-session is always visible. Also settable via ?account=.

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

Which workroom to act in. Accepts a workroom name (case-insensitive), a prefixed ID (wrm_<hex>), a raw 24-hex ID, or the literal all.

On any write, ask the user which workroom β€” do not omit this. Optional here means the server has a fallback, not that the fallback is what anyone wanted: an omitted workroom sends the write to the account's default workroom, and accounts routinely have dozens. Creating a contact, flow, campaign or segment in the wrong workroom puts it where nobody is looking, and moving it afterwards is manual.

The one case where you need not ask: the account has exactly one workroom. Call listWorkrooms to find out β€” if it returns a single row, use it; if it returns several, ask which one before writing.

Reads are scoped too. Omitting a workroom on a read does not span the account β€” it narrows to the same default workroom a write would go to, and the response carries a workroom_defaulted warning saying so. So a count, a list or a segment preview describes one workroom unless you said otherwise. Pass all to deliberately span every workroom; that is the only way to get account-wide figures, and it is never the default. listWorkrooms itself is never narrowed, since it is how you discover what to ask for.

Also settable via ?workroom= or a workroom body field (POST/PATCH only) β€” query wins over header wins over body.

Example: G Test1
Idempotency-Keystring Β· max: 255Optional

A unique key (≀255 chars) chosen by the client. Replays with the same key + same body return the cached response. Replays with the same key + different body return 409 idempotency_conflict. Required on messaging sends and bulk operations; recommended elsewhere.

Example: 8e3c7a90-7c4d-4f8e-8e3c-7a907c4d4f8e
Body

Record a new event. Idempotency via Idempotency-Key is strongly recommended if the caller may retry β€” without it, network retries create duplicate events that skew counts in segments and reports.

namestringRequiredExample: purchase.completedPattern: ^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$
contact_idstringRequired

A contact ID. Accepts either the native prefixed id (con_<24-hex>) or an external-ID reference (external_id:<your_id>).

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
location_idstringOptionalExample: loc_01H8XKG...Pattern: ^loc_[0-9A-HJKMNP-TV-Z]{26}$
occurred_atstring Β· date-timeRequired

When the event occurred. A timestamp without a UTC offset (e.g. 2026-05-01 18:00) is read in the account's timezone; include Z or an offset to be explicit.

Example: 2026-05-27T14:23:11.482Z
Responses
201

Event recorded.

application/json

A single activity event attached to a contact. Events are append-only β€” there is no update or delete endpoint. Event names use dot notation (namespace.action), e.g. purchase.completed, class.checked_in, form.submitted, email.opened.

idstringRequiredExample: evt_01H8XKCAR2A9NZ0YV3JW4H1P5KPattern: ^evt_[0-9A-HJKMNP-TV-Z]{26}$
objectconst: eventRequired
namestringRequired

Event name in namespace.action form. Lowercase snake_case. No spaces or special chars. Common namespaces: purchase, class, email, sms, form, page, appointment, membership.

Example: purchase.completedPattern: ^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$
contact_idstringRequired

A contact ID. Accepts either the native prefixed id (con_<24-hex>) or an external-ID reference (external_id:<your_id>).

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
location_idstring Β· nullableOptional

Location the event happened at. Integration-synced events store it as club (ABC), data.club (ClubReady) or data.location_id (ClubAutomation, uploads); this field reads whichever is set, and filter[location_id] matches any of them.

Example: loc_01H8XKG...Pattern: ^loc_[0-9A-HJKMNP-TV-Z]{26}$
occurred_atstring Β· date-timeRequired

When the event actually occurred (may be backdated).

Example: 2026-05-27T14:23:11.482Z
created_atstring Β· date-timeRequired

When the event was recorded in Gleantap (always server-set).

Example: 2026-05-27T14:23:11.482Z
typestring Β· nullableOptional

Legacy discriminator field. Every externalevents row has this. Common values: appointment, badge, sale, checkin, visit, reservation, order, purchase, class, rating, form, challenge, club, membership, email, sms. v3-emitted events derive type from the dot-notation name (e.g. purchase.completed β†’ sale). Use filter[type]=appointment to fetch all appointment events regardless of whether they were emitted through v3 or the legacy dashboard.

is_visitbooleanOptional

True for visit/checkin/arrival events (any legacy source).

is_purchasebooleanOptional

True for sale/purchase/order events.

is_appointmentbooleanOptional

True for appointment events.

is_badgebooleanOptional

True for loyalty-badge events.

is_ratingbooleanOptional

True for rating/review events.

is_reservationbooleanOptional

True for class reservation events.

is_challengebooleanOptional

True for loyalty challenge events.

Other propertiesbooleanOptional

Any additional is_* boolean flags observed on the doc β€” v3 passes them through as-is so new legacy flags become queryable automatically.

post/events
POST /v3/events HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 211

{
  "name": "purchase.completed",
  "contact_id": "con_6a7eaec3505bea795709f897",
  "location_id": "loc_01H8XKG...",
  "properties": {
    "amount": 99,
    "currency": "USD",
    "sku": "membership_annual"
  },
  "occurred_at": "2026-05-27T14:00:00Z"
}
{
  "id": "evt_01H8XKCAR2A9NZ0YV3JW4H1P5K",
  "object": "text",
  "name": "purchase.completed",
  "contact_id": "con_6a7eaec3505bea795709f897",
  "location_id": "loc_01H8XKG...",
  "properties": {
    "amount": 99,
    "currency": "USD",
    "sku": "membership_annual"
  },
  "occurred_at": "2026-05-27T14:23:11.482Z",
  "created_at": "2026-05-27T14:23:11.482Z",
  "type": "text",
  "is_visit": true,
  "is_purchase": true,
  "is_appointment": true,
  "is_badge": true,
  "is_rating": true,
  "is_reservation": true,
  "is_challenge": true,
  "ANY_ADDITIONAL_PROPERTY": true
}

Retrieve an event.

get

Fetch a single event by ID.

Authorizations
AuthorizationstringRequired

The API Secret from the Gleantap dashboard under Settings β†’ API (Generate New Key if none exists). Send it bare (40 hex characters) or prefixed as gltp_sk_live_<40-hex>. There is no sandbox: every key acts on the live account.

Keys are account-scoped and carry all permissions on that account (no per-key scope selection). Cross-workroom reads are unrestricted by default β€” narrow with ?workroom= / Gleantap-Workroom on each request. Revoke via the dashboard.

For per-user consent, per-workroom scoping, and short-lived tokens, use OAuth 2.1 instead.

Path parameters
idstringRequiredExample: evt_01H8XKCAR2A9NZ0YV3JW4H1P5KPattern: ^evt_[0-9A-HJKMNP-TV-Z]{26}$
Query parameters
workroomstringOptional

Same semantics as the Gleantap-Workroom header, including that a write should never be sent without a workroom the user actually chose, and that an omitted workroom scopes a read to the account default rather than spanning the account. Prefer this on GETs so proxies and caches can key on it. Accepts name, prefixed ID, raw hex, or all.

Header parameters
Gleantap-VersionstringOptional

Minor version to run the request under (date-based). Older dates remain supported for at least 24 months. If omitted, the account's default pinned version is used.

Example: 2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$
Gleantap-AccountstringOptional

Target customer account, as acc_<24-hex> or a bare 24-hex ID. Only for Gleantap staff (CSM) tokens, which authenticate against the internal staff directory and are bound to no account; for a normal customer token the account is fixed by the token and this header is ignored.

A staff token MUST name an account on every request β€” there is no default, and omitting it returns 400 admin_account_required rather than falling back to some first account. Switching accounts is just a different value here; no re-authorization. Account names are rejected (400 admin_account_invalid) because they are neither unique nor stable β€” list IDs with GET /v3/accounts.

Every impersonated response carries an impersonation block naming the account actually acted on, so an account switch mid-session is always visible. Also settable via ?account=.

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

Which workroom to act in. Accepts a workroom name (case-insensitive), a prefixed ID (wrm_<hex>), a raw 24-hex ID, or the literal all.

On any write, ask the user which workroom β€” do not omit this. Optional here means the server has a fallback, not that the fallback is what anyone wanted: an omitted workroom sends the write to the account's default workroom, and accounts routinely have dozens. Creating a contact, flow, campaign or segment in the wrong workroom puts it where nobody is looking, and moving it afterwards is manual.

The one case where you need not ask: the account has exactly one workroom. Call listWorkrooms to find out β€” if it returns a single row, use it; if it returns several, ask which one before writing.

Reads are scoped too. Omitting a workroom on a read does not span the account β€” it narrows to the same default workroom a write would go to, and the response carries a workroom_defaulted warning saying so. So a count, a list or a segment preview describes one workroom unless you said otherwise. Pass all to deliberately span every workroom; that is the only way to get account-wide figures, and it is never the default. listWorkrooms itself is never narrowed, since it is how you discover what to ask for.

Also settable via ?workroom= or a workroom body field (POST/PATCH only) β€” query wins over header wins over body.

Example: G Test1
Responses
200

The event.

application/json

A single activity event attached to a contact. Events are append-only β€” there is no update or delete endpoint. Event names use dot notation (namespace.action), e.g. purchase.completed, class.checked_in, form.submitted, email.opened.

idstringRequiredExample: evt_01H8XKCAR2A9NZ0YV3JW4H1P5KPattern: ^evt_[0-9A-HJKMNP-TV-Z]{26}$
objectconst: eventRequired
namestringRequired

Event name in namespace.action form. Lowercase snake_case. No spaces or special chars. Common namespaces: purchase, class, email, sms, form, page, appointment, membership.

Example: purchase.completedPattern: ^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$
contact_idstringRequired

A contact ID. Accepts either the native prefixed id (con_<24-hex>) or an external-ID reference (external_id:<your_id>).

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
location_idstring Β· nullableOptional

Location the event happened at. Integration-synced events store it as club (ABC), data.club (ClubReady) or data.location_id (ClubAutomation, uploads); this field reads whichever is set, and filter[location_id] matches any of them.

Example: loc_01H8XKG...Pattern: ^loc_[0-9A-HJKMNP-TV-Z]{26}$
occurred_atstring Β· date-timeRequired

When the event actually occurred (may be backdated).

Example: 2026-05-27T14:23:11.482Z
created_atstring Β· date-timeRequired

When the event was recorded in Gleantap (always server-set).

Example: 2026-05-27T14:23:11.482Z
typestring Β· nullableOptional

Legacy discriminator field. Every externalevents row has this. Common values: appointment, badge, sale, checkin, visit, reservation, order, purchase, class, rating, form, challenge, club, membership, email, sms. v3-emitted events derive type from the dot-notation name (e.g. purchase.completed β†’ sale). Use filter[type]=appointment to fetch all appointment events regardless of whether they were emitted through v3 or the legacy dashboard.

is_visitbooleanOptional

True for visit/checkin/arrival events (any legacy source).

is_purchasebooleanOptional

True for sale/purchase/order events.

is_appointmentbooleanOptional

True for appointment events.

is_badgebooleanOptional

True for loyalty-badge events.

is_ratingbooleanOptional

True for rating/review events.

is_reservationbooleanOptional

True for class reservation events.

is_challengebooleanOptional

True for loyalty challenge events.

Other propertiesbooleanOptional

Any additional is_* boolean flags observed on the doc β€” v3 passes them through as-is so new legacy flags become queryable automatically.

get/events/{id}
GET /v3/events/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "evt_01H8XKCAR2A9NZ0YV3JW4H1P5K",
  "object": "text",
  "name": "purchase.completed",
  "contact_id": "con_6a7eaec3505bea795709f897",
  "location_id": "loc_01H8XKG...",
  "properties": {
    "amount": 99,
    "currency": "USD",
    "sku": "membership_annual"
  },
  "occurred_at": "2026-05-27T14:23:11.482Z",
  "created_at": "2026-05-27T14:23:11.482Z",
  "type": "text",
  "is_visit": true,
  "is_purchase": true,
  "is_appointment": true,
  "is_badge": true,
  "is_rating": true,
  "is_reservation": true,
  "is_challenge": true,
  "ANY_ADDITIONAL_PROPERTY": true
}

Enumerate available event names, types, and flags for this workroom.

get

Catalog for authoring a flow trigger or a segment condition that keys on an event. Returns the union of every event vocabulary currently active on the workroom's externalevents collection:

  • types β€” distinct legacy type values observed with counts, last-seen timestamps, sample data.* property keys, and the is_* flag(s) each type carries. Legacy dashboard-emitted events use type as the primary discriminator (type: "appointment", type: "badge", type: "sale", etc.) with no dot-notation event_name. This is the dimension you'll most often use for flow triggers.

  • event_names β€” distinct v3-native dot-notation event_name values (purchase.completed, visit.checked_in, form.submitted) with the same metadata. Only populated on events created through v3 API paths.

  • documented_types and documented_names β€” hardcoded guidance covering common conventions even when the workroom has no rows of that type yet, including which segment-DSL category to use for flow triggers.

  • filter_guidance β€” plain-English hints on which filter[…] to use for common lookups.

Workroom-aware via ?workroom=<name-or-id> or the Gleantap-Workroom header. Without a scope, aggregates across the account.

Authorizations
AuthorizationstringRequired

The API Secret from the Gleantap dashboard under Settings β†’ API (Generate New Key if none exists). Send it bare (40 hex characters) or prefixed as gltp_sk_live_<40-hex>. There is no sandbox: every key acts on the live account.

Keys are account-scoped and carry all permissions on that account (no per-key scope selection). Cross-workroom reads are unrestricted by default β€” narrow with ?workroom= / Gleantap-Workroom on each request. Revoke via the dashboard.

For per-user consent, per-workroom scoping, and short-lived tokens, use OAuth 2.1 instead.

Query parameters
workroomstringOptional

Same semantics as the Gleantap-Workroom header, including that a write should never be sent without a workroom the user actually chose, and that an omitted workroom scopes a read to the account default rather than spanning the account. Prefer this on GETs so proxies and caches can key on it. Accepts name, prefixed ID, raw hex, or all.

Header parameters
Gleantap-VersionstringOptional

Minor version to run the request under (date-based). Older dates remain supported for at least 24 months. If omitted, the account's default pinned version is used.

Example: 2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$
Gleantap-AccountstringOptional

Target customer account, as acc_<24-hex> or a bare 24-hex ID. Only for Gleantap staff (CSM) tokens, which authenticate against the internal staff directory and are bound to no account; for a normal customer token the account is fixed by the token and this header is ignored.

A staff token MUST name an account on every request β€” there is no default, and omitting it returns 400 admin_account_required rather than falling back to some first account. Switching accounts is just a different value here; no re-authorization. Account names are rejected (400 admin_account_invalid) because they are neither unique nor stable β€” list IDs with GET /v3/accounts.

Every impersonated response carries an impersonation block naming the account actually acted on, so an account switch mid-session is always visible. Also settable via ?account=.

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

Which workroom to act in. Accepts a workroom name (case-insensitive), a prefixed ID (wrm_<hex>), a raw 24-hex ID, or the literal all.

On any write, ask the user which workroom β€” do not omit this. Optional here means the server has a fallback, not that the fallback is what anyone wanted: an omitted workroom sends the write to the account's default workroom, and accounts routinely have dozens. Creating a contact, flow, campaign or segment in the wrong workroom puts it where nobody is looking, and moving it afterwards is manual.

The one case where you need not ask: the account has exactly one workroom. Call listWorkrooms to find out β€” if it returns a single row, use it; if it returns several, ask which one before writing.

Reads are scoped too. Omitting a workroom on a read does not span the account β€” it narrows to the same default workroom a write would go to, and the response carries a workroom_defaulted warning saying so. So a count, a list or a segment preview describes one workroom unless you said otherwise. Pass all to deliberately span every workroom; that is the only way to get account-wide figures, and it is never the default. listWorkrooms itself is never narrowed, since it is how you discover what to ask for.

Also settable via ?workroom= or a workroom body field (POST/PATCH only) β€” query wins over header wins over body.

Example: G Test1
Responses
200

The event catalog.

application/json

Machine-readable event vocabulary for the account/workroom. Combines the legacy type-based dimension (dashboard-emitted events) with the v3-native event_name dimension (v3-emitted events), plus documented conventions for both.

objectstring Β· enumOptionalPossible values:
workroom_idstring Β· nullableOptionalExample: wrm_5ace370fd2a57d74d0548fb2Pattern: ^wrm_[0-9a-f]{24}$
filter_guidancestring[]Optional
get/events/catalog
GET /v3/events/catalog HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

The event catalog.

{
  "object": "event_catalog",
  "workroom_id": "wrm_5ace370fd2a57d74d0548fb2",
  "types": [
    {
      "value": "text",
      "count": 1,
      "last_seen_at": "2026-05-27T14:23:11.482Z",
      "is_flags": [
        "text"
      ],
      "sample_property_keys": [
        "text"
      ],
      "sample_event_id": "evt_01H8XKCAR2A9NZ0YV3JW4H1P5K"
    }
  ],
  "event_names": [
    {
      "value": "text",
      "count": 1,
      "last_seen_at": "2026-05-27T14:23:11.482Z",
      "derived_type": "text",
      "sample_property_keys": [
        "text"
      ],
      "sample_event_id": "evt_01H8XKCAR2A9NZ0YV3JW4H1P5K"
    }
  ],
  "documented_types": [
    {
      "value": "text",
      "description": "text",
      "is_flag": "text",
      "flow_trigger": "text"
    }
  ],
  "documented_names": [
    {
      "value": "text",
      "description": "text",
      "derived_type": "text",
      "is_flags": [
        "text"
      ]
    }
  ],
  "filter_guidance": [
    "text"
  ]
}

Bulk-create events.

post

Up to 10,000 events per request. Returns a job immediately; ingestion is async. Bulk sends still trigger flows and segment recompute, but with minutes of lag, so downstream triggers are not synchronously acknowledged. Idempotency-Key is required. Rate limit bucket: bulk.

Authorizations
AuthorizationstringRequired

The API Secret from the Gleantap dashboard under Settings β†’ API (Generate New Key if none exists). Send it bare (40 hex characters) or prefixed as gltp_sk_live_<40-hex>. There is no sandbox: every key acts on the live account.

Keys are account-scoped and carry all permissions on that account (no per-key scope selection). Cross-workroom reads are unrestricted by default β€” narrow with ?workroom= / Gleantap-Workroom on each request. Revoke via the dashboard.

For per-user consent, per-workroom scoping, and short-lived tokens, use OAuth 2.1 instead.

Query parameters
workroomstringOptional

Same semantics as the Gleantap-Workroom header, including that a write should never be sent without a workroom the user actually chose, and that an omitted workroom scopes a read to the account default rather than spanning the account. Prefer this on GETs so proxies and caches can key on it. Accepts name, prefixed ID, raw hex, or all.

Header parameters
Gleantap-VersionstringOptional

Minor version to run the request under (date-based). Older dates remain supported for at least 24 months. If omitted, the account's default pinned version is used.

Example: 2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$
Gleantap-AccountstringOptional

Target customer account, as acc_<24-hex> or a bare 24-hex ID. Only for Gleantap staff (CSM) tokens, which authenticate against the internal staff directory and are bound to no account; for a normal customer token the account is fixed by the token and this header is ignored.

A staff token MUST name an account on every request β€” there is no default, and omitting it returns 400 admin_account_required rather than falling back to some first account. Switching accounts is just a different value here; no re-authorization. Account names are rejected (400 admin_account_invalid) because they are neither unique nor stable β€” list IDs with GET /v3/accounts.

Every impersonated response carries an impersonation block naming the account actually acted on, so an account switch mid-session is always visible. Also settable via ?account=.

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

Which workroom to act in. Accepts a workroom name (case-insensitive), a prefixed ID (wrm_<hex>), a raw 24-hex ID, or the literal all.

On any write, ask the user which workroom β€” do not omit this. Optional here means the server has a fallback, not that the fallback is what anyone wanted: an omitted workroom sends the write to the account's default workroom, and accounts routinely have dozens. Creating a contact, flow, campaign or segment in the wrong workroom puts it where nobody is looking, and moving it afterwards is manual.

The one case where you need not ask: the account has exactly one workroom. Call listWorkrooms to find out β€” if it returns a single row, use it; if it returns several, ask which one before writing.

Reads are scoped too. Omitting a workroom on a read does not span the account β€” it narrows to the same default workroom a write would go to, and the response carries a workroom_defaulted warning saying so. So a count, a list or a segment preview describes one workroom unless you said otherwise. Pass all to deliberately span every workroom; that is the only way to get account-wide figures, and it is never the default. listWorkrooms itself is never narrowed, since it is how you discover what to ask for.

Also settable via ?workroom= or a workroom body field (POST/PATCH only) β€” query wins over header wins over body.

Example: G Test1
Idempotency-Keystring Β· max: 255Required
Body

Bulk event insertion. Max 10,000 events per request. Returns a job immediately; large batches are ingested asynchronously.

Responses
202

Job accepted.

application/json

Job record. Bulk work runs inline, so a job is finished by the time its POST returns: contacts bulk answers completed (with kind/progress/errors/result alongside the summary counts), events bulk answers succeeded or failed (with per-row errors). The id addresses the job afterwards β€” GET /v3/jobs/{id} returns this same body, so a caller that lost the response can read it back instead of re-running the batch.

idstringRequiredExample: job_01H8XLB...Pattern: ^job_[0-9A-HJKMNP-TV-Z]{26}$
objectconst: jobRequired
statusstring Β· enumRequired

completed β€” ran inline to the end (check failed / errors for per-row failures).

Possible values:
kindstringOptional

Legacy name of the operation, e.g. contacts.upsert. Prefer operation.

completed_atstring Β· date-time Β· nullableOptional

RFC 3339 timestamp, always UTC, millisecond precision.

Example: 2026-05-27T14:23:11.482Z
operationstringRequired

The operation this job is running (e.g., contacts.bulk_upsert, events.bulk_create).

totalintegerOptional
succeededintegerOptional
failedintegerOptional
result_urlstring Β· nullableOptional

On success, a short-lived signed URL to the result payload if it's too large to inline.

errors_urlstring Β· nullableOptional

On partial success, a signed URL to a CSV listing per-row errors.

created_atstring Β· date-timeRequired

RFC 3339 timestamp, always UTC, millisecond precision.

Example: 2026-05-27T14:23:11.482Z
started_atstring Β· date-time Β· nullableOptional

RFC 3339 timestamp, always UTC, millisecond precision.

Example: 2026-05-27T14:23:11.482Z
finished_atstring Β· date-time Β· nullableOptional

RFC 3339 timestamp, always UTC, millisecond precision.

Example: 2026-05-27T14:23:11.482Z
post/events/bulk
POST /v3/events/bulk HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Idempotency-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 208

{
  "data": [
    {
      "name": "purchase.completed",
      "contact_id": "con_6a7eaec3505bea795709f897",
      "location_id": "loc_01H8XKG...",
      "properties": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "occurred_at": "2026-05-27T14:23:11.482Z"
    }
  ]
}
{
  "id": "job_01H8XLB...",
  "object": "text",
  "status": "queued",
  "kind": "text",
  "progress": {
    "total": 1,
    "processed": 1,
    "succeeded": 1,
    "failed": 1,
    "created": 1,
    "updated": 1,
    "deleted": 1
  },
  "result": {
    "contact_ids": [
      "con_6a7eaec3505bea795709f897"
    ]
  },
  "completed_at": "2026-05-27T14:23:11.482Z",
  "operation": "text",
  "total": 1,
  "succeeded": 1,
  "failed": 1,
  "result_url": "text",
  "errors_url": "text",
  "errors": [
    {
      "index": 1,
      "code": "text",
      "message": "text"
    }
  ],
  "created_at": "2026-05-27T14:23:11.482Z",
  "started_at": "2026-05-27T14:23:11.482Z",
  "finished_at": "2026-05-27T14:23:11.482Z"
}