Events
Append-only activity events attached to contacts. Powers segments, flows, and analytics.
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.
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.
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.
Page size. Default 25, max 100.
25Opaque 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.
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.
-created_at,emailMinor 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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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=.
acc_59fca1e3d2a57d28a10b0442Which 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.
G Test1A page of events.
True if additional records exist beyond this page.
Opaque cursor for the next page. Null on the last page.
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 /v3/events HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
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"
}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.
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.
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.
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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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=.
acc_59fca1e3d2a57d28a10b0442Which 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.
G Test1A 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.
8e3c7a90-7c4d-4f8e-8e3c-7a907c4d4f8eRecord 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.
purchase.completedPattern: ^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$A contact ID. Accepts either the native prefixed id (con_<24-hex>) or an external-ID reference (external_id:<your_id>).
con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$loc_01H8XKG...Pattern: ^loc_[0-9A-HJKMNP-TV-Z]{26}$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.
2026-05-27T14:23:11.482ZEvent recorded.
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.
evt_01H8XKCAR2A9NZ0YV3JW4H1P5KPattern: ^evt_[0-9A-HJKMNP-TV-Z]{26}$Event name in namespace.action form. Lowercase snake_case. No spaces or special chars.
Common namespaces: purchase, class, email, sms, form, page, appointment, membership.
purchase.completedPattern: ^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$A contact ID. Accepts either the native prefixed id (con_<24-hex>) or an external-ID reference (external_id:<your_id>).
con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$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.
loc_01H8XKG...Pattern: ^loc_[0-9A-HJKMNP-TV-Z]{26}$When the event actually occurred (may be backdated).
2026-05-27T14:23:11.482ZWhen the event was recorded in Gleantap (always server-set).
2026-05-27T14:23:11.482ZLegacy 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.
True for visit/checkin/arrival events (any legacy source).
True for sale/purchase/order events.
True for appointment events.
True for loyalty-badge events.
True for rating/review events.
True for class reservation events.
True for loyalty challenge events.
Any additional is_* boolean flags observed on the doc β v3 passes them through as-is so new legacy flags become queryable automatically.
Request could not be parsed or failed validation.
The referenced contact doesn't exist.
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
}Fetch a single event by ID.
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.
evt_01H8XKCAR2A9NZ0YV3JW4H1P5KPattern: ^evt_[0-9A-HJKMNP-TV-Z]{26}$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.
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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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=.
acc_59fca1e3d2a57d28a10b0442Which 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.
G Test1The event.
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.
evt_01H8XKCAR2A9NZ0YV3JW4H1P5KPattern: ^evt_[0-9A-HJKMNP-TV-Z]{26}$Event name in namespace.action form. Lowercase snake_case. No spaces or special chars.
Common namespaces: purchase, class, email, sms, form, page, appointment, membership.
purchase.completedPattern: ^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$A contact ID. Accepts either the native prefixed id (con_<24-hex>) or an external-ID reference (external_id:<your_id>).
con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$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.
loc_01H8XKG...Pattern: ^loc_[0-9A-HJKMNP-TV-Z]{26}$When the event actually occurred (may be backdated).
2026-05-27T14:23:11.482ZWhen the event was recorded in Gleantap (always server-set).
2026-05-27T14:23:11.482ZLegacy 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.
True for visit/checkin/arrival events (any legacy source).
True for sale/purchase/order events.
True for appointment events.
True for loyalty-badge events.
True for rating/review events.
True for class reservation events.
True for loyalty challenge events.
Any additional is_* boolean flags observed on the doc β v3 passes them through as-is so new legacy flags become queryable automatically.
The resource doesn't exist or isn't visible to this caller.
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
}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 legacytypevalues observed with counts, last-seen timestamps, sampledata.*property keys, and theis_*flag(s) each type carries. Legacy dashboard-emitted events usetypeas 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-notationevent_namevalues (purchase.completed,visit.checked_in,form.submitted) with the same metadata. Only populated on events created through v3 API paths.documented_typesanddocumented_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 whichfilter[β¦]to use for common lookups.
Workroom-aware via ?workroom=<name-or-id> or the Gleantap-Workroom header. Without a scope, aggregates across the account.
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.
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.
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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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=.
acc_59fca1e3d2a57d28a10b0442Which 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.
G Test1The event catalog.
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.
wrm_5ace370fd2a57d74d0548fb2Pattern: ^wrm_[0-9a-f]{24}$GET /v3/events/catalog HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
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"
]
}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.
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.
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.
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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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=.
acc_59fca1e3d2a57d28a10b0442Which 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.
G Test1Bulk event insertion. Max 10,000 events per request. Returns a job immediately; large batches are ingested asynchronously.
Job accepted.
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.
job_01H8XLB...Pattern: ^job_[0-9A-HJKMNP-TV-Z]{26}$completed β ran inline to the end (check failed / errors for per-row failures).
Legacy name of the operation, e.g. contacts.upsert. Prefer operation.
RFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZThe operation this job is running (e.g., contacts.bulk_upsert, events.bulk_create).
On success, a short-lived signed URL to the result payload if it's too large to inline.
On partial success, a signed URL to a CSV listing per-row errors.
RFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRequest could not be parsed or failed validation.
Rate limited.
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"
}