Contacts
The central person record. Includes CRUD, merge, opt-in/opt-out, sub-resource listing, bulk upsert, and count.
Paginated list of contacts, most recent first. Common filters: ?filter[email]=, ?filter[phone]=, ?filter[external_id]=, ?filter[tags]=vip,trial, ?filter[created_at][gte]=..., ?filter[consent.email.status]=opted_in, ?filter[deleted]=true (soft-deleted excluded by default). For known-ID lookups use GET /v3/contacts/{id}; for audience DSL use POST /v3/segments/preview. Supports backward paging via ?before=<prev_cursor>. 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.
Opaque cursor from a prior response's prev_cursor, to fetch the PREVIOUS page. Supported on listContacts and listSegmentContacts only. If both before and cursor are sent, before wins.
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,emailSparse fieldset β comma-separated list of fields to include in the response. Reduces payload size on high-volume reads. Nested field access is not supported; request the parent object.
id,email,phone,tagsMinor 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 contacts.
Missing or invalid credentials.
Authenticated but not authorized (scope, role, or feature-flag mismatch).
Rate limited.
GET /v3/contacts HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "text",
"data": [
{
"id": "con_6a7eaec3505bea795709f897",
"object": "text",
"external_id": "user_12345",
"email": "[email protected]",
"phone": "+15558675309",
"first_name": "text",
"last_name": "text",
"date_of_birth": "1990-04-12",
"locale": "en-IN",
"timezone": "America/New_York",
"tags": [
"vip",
"trial"
],
"custom_fields": {
"favorite_color": "teal",
"lead_score": 87
},
"memberships": [
{
"id": "7da31914-6ef9-4a5d-b218-b8bdcfbe2954",
"name": "text",
"type": "text",
"status": "text",
"member_status": "text",
"member_status_date": "2026-01-01T00:00:00.000Z",
"price": 1,
"total_sessions": 1,
"sessions_remaining": 1,
"location_id": "text",
"start_date": "2026-01-01T00:00:00.000Z",
"begin_date": "2026-01-01T00:00:00.000Z",
"renewal_date": "2026-01-01T00:00:00.000Z",
"next_billing_date": "2026-01-01T00:00:00.000Z",
"end_date": "2026-01-01T00:00:00.000Z",
"expiration_date": "2026-01-01T00:00:00.000Z",
"renewal_type": "text",
"invoice_ids": [
"text"
],
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"consent": {
"sms": {
"status": "opted_in",
"source": "form_submission",
"timestamp": "2026-04-01T10:14:00Z"
},
"email": {
"status": "opted_in",
"source": "form_submission",
"timestamp": "2026-04-01T10:14:00Z"
}
},
"primary_location_id": "loc_01H8XKG...",
"location": "text",
"location_id": "text",
"member_status": "text",
"owner_user_id": "usr_01H8XL7...",
"segments": [
"seg_01H8XKE..."
],
"pipelines": [
{
"pipeline_id": "text",
"stage_id": "text",
"stage_name": "text",
"status": "text",
"added_at": "2026-05-27T14:23:11.482Z",
"last_updated_at": "2026-05-27T14:23:11.482Z"
}
],
"lifecycle_stage": "member",
"last_seen_at": "2026-05-27T14:23:11.482Z",
"created_at": "2026-05-27T14:23:11.482Z",
"updated_at": "2026-05-27T14:23:11.482Z",
"deleted_at": "2026-05-27T14:23:11.482Z",
"metadata": {
"our_crm_id": "cust_884321",
"sync_batch": "2026-05-imports"
}
}
],
"has_more": true,
"next_cursor": "text",
"prev_cursor": "text"
}Upsert by default β if an existing contact matches on match_on (default email), it's updated; otherwise a new record is created. Set match_on: "none" to force create and 409 on match. If you already have the ID use PATCH /v3/contacts/{id}; for 5k+ records use POST /v3/contacts/bulk. Provide consent.sms / consent.email with source and timestamp if the contact will receive marketing sends β otherwise sends return 422 compliance_block. Rate limit bucket: write.
Structured domain data (memberships, purchases, visits) has first-class handling and does not belong in custom_fields:
Memberships / plans β pass
memberships[](array ofContactMembershipobjects) on this endpoint. Segment engine readsmemberships.status,memberships.type,memberships.renewal_date, etc. directly off the contact.Purchases β record via
POST /v3/eventswithname: "purchase.completed"(or.refunded, etc.) andproperties.product_name+properties.amount. The events model auto-updates the contact'spurchases.*summary counters and secondaryobject product master.Visits / class check-ins β
POST /v3/eventswithname: "visit.checked_in"andproperties.class_name. Setsis_visit=1and populates thevisits.*category for segments.
Use custom_fields only for genuinely account-specific attributes with no built-in category (see GET /v3/segments/schema for the current category list).
Requires at least an email or phone. 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-7a907c4d4f8eBody for creating or upserting a contact.
- If you pass an
email,phone, orexternal_idthat matches an existing contact in this account, the existing record is updated (upsert). - Provide
match_onin the request to control which field is used for matching (default:emailif provided, elsephone, elseexternal_id). consentis optional but recommended for any contact that may receive marketing messages β sending to a contact without opted-in consent returns 422compliance_block.
An existing contact was matched and updated.
A person record. Central to almost every other resource in Gleantap.
Contacts have an internal id (con_<24-hex>) and optionally an external ID (external_id) you set from your own system. Both can be used to look up the record.
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:[^/]+$Your system's ID for this contact. Unique within the account. For contacts synced by an integration this is the member id the integration stores in user_id (returned when external_id itself is unset and user_id is not just the email/phone). filter[external_id] and GET /v3/contacts/external_id:<x> match either field, as string or integer.
user_12345[email protected]Stored the way every Gleantap writer stores it (formatPhone) β a + number is kept, a national number gets the account's country code (US/CA +1, GB +44, AU +61 with the trunk 0 dropped, NL, DK, LB, AE). Writes accept either form.
+15558675309Pattern: ^\+[1-9]\d{1,14}$Stored as personalinfo.dob (date) + personalinfo.birthday (day of year), the pair birthday segments, campaigns and loyalty birthday rewards match on; data.dob is kept in step.
1990-04-12BCP 47 locale tag.
en-INIANA timezone name.
America/New_YorkAll tags currently applied to this contact (sales.tags, the list the dashboard shows).
["vip","trial"]Not populated yet (no Location resource). Use location / location_id.
loc_01H8XKG...Pattern: ^loc_[0-9A-HJKMNP-TV-Z]{26}$The contact's location/club name as the integration or CSV import recorded it (accountinfo.location, else data.location / data.location_name). Numeric on some accounts; always returned as a string. Same value filter[location] matches.
The integration's location id (accountinfo.location_id, else data.location_id).
Membership/account status as synced (accountinfo.status), e.g. active, inactive, cancelled. Vocabulary is the integration's.
usr_01H8XL7...Pattern: ^usr_[0-9A-HJKMNP-TV-Z]{26}$Segment IDs this contact is currently a member of. Eventually consistent (up to minutes of lag from an underlying data change).
Stage label stored in accountinfo.type. The values in real data are member, prospect, past and non-member, plus raw labels integrations pass through in their own case (Kid, Parent, Individual, β¦). Not enforced; filter[lifecycle_stage] matches case-insensitively. Writing member (or customer) also sets accountinfo.member: 1; anything other than member/former sets accountinfo.prospect: 1.
memberRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZLast change by any writer β the later of v3's own stamp and the last_updated_on the integrations and dashboard maintain. sort=updated_at orders by last_updated_on.
2026-05-27T14:23:11.482ZSet if this contact was soft-deleted. Soft-deleted contacts are hidden from all list endpoints, the dashboard and every send by default; include ?filter[deleted]=true to see them. Merged-away contacts also carry it.
2026-05-27T14:23:11.482ZA new contact was created.
Request could not be parsed or failed validation.
Missing or invalid credentials.
Authenticated but not authorized (scope, role, or feature-flag mismatch).
Idempotency conflict, version conflict (If-Match), or state conflict.
Semantic validation failed β the request is well-formed but references an object in the wrong state (e.g., sending to an opted-out contact).
Rate limited.
POST /v3/contacts HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 303
{
"email": "[email protected]",
"phone": "+15558675309",
"first_name": "Alice",
"tags": [
"trial"
],
"consent": {
"email": {
"status": "opted_in",
"source": "form_submission",
"timestamp": "2026-05-27T14:00:00Z"
},
"sms": {
"status": "opted_in",
"source": "form_submission",
"timestamp": "2026-05-27T14:00:00Z"
}
},
"match_on": "email"
}{
"id": "con_6a7eaec3505bea795709f897",
"object": "text",
"external_id": "user_12345",
"email": "[email protected]",
"phone": "+15558675309",
"first_name": "text",
"last_name": "text",
"date_of_birth": "1990-04-12",
"locale": "en-IN",
"timezone": "America/New_York",
"tags": [
"vip",
"trial"
],
"custom_fields": {
"favorite_color": "teal",
"lead_score": 87
},
"memberships": [
{
"id": "7da31914-6ef9-4a5d-b218-b8bdcfbe2954",
"name": "text",
"type": "text",
"status": "text",
"member_status": "text",
"member_status_date": "2026-01-01T00:00:00.000Z",
"price": 1,
"total_sessions": 1,
"sessions_remaining": 1,
"location_id": "text",
"start_date": "2026-01-01T00:00:00.000Z",
"begin_date": "2026-01-01T00:00:00.000Z",
"renewal_date": "2026-01-01T00:00:00.000Z",
"next_billing_date": "2026-01-01T00:00:00.000Z",
"end_date": "2026-01-01T00:00:00.000Z",
"expiration_date": "2026-01-01T00:00:00.000Z",
"renewal_type": "text",
"invoice_ids": [
"text"
],
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"consent": {
"sms": {
"status": "opted_in",
"source": "form_submission",
"timestamp": "2026-04-01T10:14:00Z"
},
"email": {
"status": "opted_in",
"source": "form_submission",
"timestamp": "2026-04-01T10:14:00Z"
}
},
"primary_location_id": "loc_01H8XKG...",
"location": "text",
"location_id": "text",
"member_status": "text",
"owner_user_id": "usr_01H8XL7...",
"segments": [
"seg_01H8XKE..."
],
"pipelines": [
{
"pipeline_id": "text",
"stage_id": "text",
"stage_name": "text",
"status": "text",
"added_at": "2026-05-27T14:23:11.482Z",
"last_updated_at": "2026-05-27T14:23:11.482Z"
}
],
"lifecycle_stage": "member",
"last_seen_at": "2026-05-27T14:23:11.482Z",
"created_at": "2026-05-27T14:23:11.482Z",
"updated_at": "2026-05-27T14:23:11.482Z",
"deleted_at": "2026-05-27T14:23:11.482Z",
"metadata": {
"our_crm_id": "cust_884321",
"sync_batch": "2026-05-imports"
}
}How large the audience is, how much of it is reachable, and how many contacts arrived in a window. Answers "how many SMS subscribers do we have in Boston" and "how many contacts did we add last month" without listing anyone.
Pass group_by=location for a per-location breakdown, or group_by=day for arrivals over time.
Stock and flow are kept apart deliberately. Contact and subscriber counts are current state and do NOT change with the window β only new_contacts does. The response says which is which in window.applies_to. The exception is group_by=day, where the whole view is scoped to contacts added in the window, so each bucket describes that day's cohort.
Email unsubscribes can be placed in time; SMS opt-outs cannot. The unsubscribe webhook records optout_email_on alongside the flag, so unsubscribed_in_window is a real windowed figure. The SMS STOP handler records only the flag, so those opt-outs are counted in sms_unsubscribed_undateable and deliberately left out of the windowed figure rather than dated by guesswork.
A contact with no phone number has not declined SMS, so unsubscribe rates are computed against the contacts that hold the channel, not the whole audience.
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.
Start of the window, inclusive. Defaults to midnight 30 days before until. A bare date is 00:00:00 of that day in the workroom's timezone (as dashboard reports draw it); a date-time without an offset is read in that zone too.
End of the window, inclusive. Defaults to the end of today. A bare date is 23:59:59 of that day in the workroom's timezone, so until=2026-06-30 includes the 30th.
Exact match, case-insensitive. Matches numeric locations too.
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 Test1Audience figures, or a breakdown when group_by was passed.
Semantic validation failed β the request is well-formed but references an object in the wrong state (e.g., sending to an opted-out contact).
GET /v3/contacts/report HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "contact_report",
"window": {
"since": "2026-01-01T00:00:00.000Z",
"until": "2026-01-01T00:00:00.000Z",
"timezone": "text",
"applies_to": "text"
},
"summary": {
"contacts": 1,
"with_email": 1,
"with_phone": 1,
"email_subscribers": 1,
"sms_subscribers": 1,
"email_suppressed": 1,
"sms_suppressed": 1,
"email_reachable": 1,
"sms_reachable": 1,
"email_unsubscribed": 1,
"unsubscribed_in_window": 1,
"sms_unsubscribed_undateable": 1,
"sms_unsubscribed": 1,
"reachable": 1,
"new_contacts": 1,
"reachable_rate": 1,
"email_reachable_rate": 1,
"sms_reachable_rate": 1,
"email_unsubscribe_rate": 1,
"sms_unsubscribe_rate": 1
}
}Get the full contact record by id or external_id:<x>. A soft-deleted contact returns 410 unless ?include_deleted=true. For event history use GET /v3/contacts/{id}/events.
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.
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:[^/]+$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.
Sparse fieldset β comma-separated list of fields to include in the response. Reduces payload size on high-volume reads. Nested field access is not supported; request the parent object.
id,email,phone,tagsMinor 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 contact.
A person record. Central to almost every other resource in Gleantap.
Contacts have an internal id (con_<24-hex>) and optionally an external ID (external_id) you set from your own system. Both can be used to look up the record.
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:[^/]+$Your system's ID for this contact. Unique within the account. For contacts synced by an integration this is the member id the integration stores in user_id (returned when external_id itself is unset and user_id is not just the email/phone). filter[external_id] and GET /v3/contacts/external_id:<x> match either field, as string or integer.
user_12345[email protected]Stored the way every Gleantap writer stores it (formatPhone) β a + number is kept, a national number gets the account's country code (US/CA +1, GB +44, AU +61 with the trunk 0 dropped, NL, DK, LB, AE). Writes accept either form.
+15558675309Pattern: ^\+[1-9]\d{1,14}$Stored as personalinfo.dob (date) + personalinfo.birthday (day of year), the pair birthday segments, campaigns and loyalty birthday rewards match on; data.dob is kept in step.
1990-04-12BCP 47 locale tag.
en-INIANA timezone name.
America/New_YorkAll tags currently applied to this contact (sales.tags, the list the dashboard shows).
["vip","trial"]Not populated yet (no Location resource). Use location / location_id.
loc_01H8XKG...Pattern: ^loc_[0-9A-HJKMNP-TV-Z]{26}$The contact's location/club name as the integration or CSV import recorded it (accountinfo.location, else data.location / data.location_name). Numeric on some accounts; always returned as a string. Same value filter[location] matches.
The integration's location id (accountinfo.location_id, else data.location_id).
Membership/account status as synced (accountinfo.status), e.g. active, inactive, cancelled. Vocabulary is the integration's.
usr_01H8XL7...Pattern: ^usr_[0-9A-HJKMNP-TV-Z]{26}$Segment IDs this contact is currently a member of. Eventually consistent (up to minutes of lag from an underlying data change).
Stage label stored in accountinfo.type. The values in real data are member, prospect, past and non-member, plus raw labels integrations pass through in their own case (Kid, Parent, Individual, β¦). Not enforced; filter[lifecycle_stage] matches case-insensitively. Writing member (or customer) also sets accountinfo.member: 1; anything other than member/former sets accountinfo.prospect: 1.
memberRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZLast change by any writer β the later of v3's own stamp and the last_updated_on the integrations and dashboard maintain. sort=updated_at orders by last_updated_on.
2026-05-27T14:23:11.482ZSet if this contact was soft-deleted. Soft-deleted contacts are hidden from all list endpoints, the dashboard and every send by default; include ?filter[deleted]=true to see them. Merged-away contacts also carry it.
2026-05-27T14:23:11.482ZMissing or invalid credentials.
Authenticated but not authorized (scope, role, or feature-flag mismatch).
The resource doesn't exist or isn't visible to this caller.
GET /v3/contacts/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "con_6a7eaec3505bea795709f897",
"object": "text",
"external_id": "user_12345",
"email": "[email protected]",
"phone": "+15558675309",
"first_name": "text",
"last_name": "text",
"date_of_birth": "1990-04-12",
"locale": "en-IN",
"timezone": "America/New_York",
"tags": [
"vip",
"trial"
],
"custom_fields": {
"favorite_color": "teal",
"lead_score": 87
},
"memberships": [
{
"id": "7da31914-6ef9-4a5d-b218-b8bdcfbe2954",
"name": "text",
"type": "text",
"status": "text",
"member_status": "text",
"member_status_date": "2026-01-01T00:00:00.000Z",
"price": 1,
"total_sessions": 1,
"sessions_remaining": 1,
"location_id": "text",
"start_date": "2026-01-01T00:00:00.000Z",
"begin_date": "2026-01-01T00:00:00.000Z",
"renewal_date": "2026-01-01T00:00:00.000Z",
"next_billing_date": "2026-01-01T00:00:00.000Z",
"end_date": "2026-01-01T00:00:00.000Z",
"expiration_date": "2026-01-01T00:00:00.000Z",
"renewal_type": "text",
"invoice_ids": [
"text"
],
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"consent": {
"sms": {
"status": "opted_in",
"source": "form_submission",
"timestamp": "2026-04-01T10:14:00Z"
},
"email": {
"status": "opted_in",
"source": "form_submission",
"timestamp": "2026-04-01T10:14:00Z"
}
},
"primary_location_id": "loc_01H8XKG...",
"location": "text",
"location_id": "text",
"member_status": "text",
"owner_user_id": "usr_01H8XL7...",
"segments": [
"seg_01H8XKE..."
],
"pipelines": [
{
"pipeline_id": "text",
"stage_id": "text",
"stage_name": "text",
"status": "text",
"added_at": "2026-05-27T14:23:11.482Z",
"last_updated_at": "2026-05-27T14:23:11.482Z"
}
],
"lifecycle_stage": "member",
"last_seen_at": "2026-05-27T14:23:11.482Z",
"created_at": "2026-05-27T14:23:11.482Z",
"updated_at": "2026-05-27T14:23:11.482Z",
"deleted_at": "2026-05-27T14:23:11.482Z",
"metadata": {
"our_crm_id": "cust_884321",
"sync_batch": "2026-05-imports"
}
}Partial update. Omitting a field means "don't change it"; null clears it. tags replaces the full tag set; add_tags/remove_tags mutate without touching others (mixing tags with add_tags/remove_tags returns 400 conflicting_fields). custom_fields is object-merge β send {"field_x": null} to clear one, {} to no-op. For merges use POST /v3/contacts/{id}/merge; for opt-out use POST /v3/contacts/{id}/opt_out (auditable).
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.
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:[^/]+$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 Test1PATCH semantics: omitting a field means "don't change it"; sending null means "clear it".
Cannot change id or object. To change external_id, use PATCH with the new value β it must remain unique within the account.
[email protected]E.164 international phone format.
+15558675309Pattern: ^\+[1-9]\d{1,14}$Calendar date (no time), ISO 8601 YYYY-MM-DD.
1990-04-12BCP 47 locale tag.
en-INIANA timezone name.
America/New_YorkReplaces the entire tag set. To add/remove individual tags without touching others, use PATCH with add_tags / remove_tags fields instead of tags.
Tags to add without touching others.
Tags to remove without touching others.
loc_01H8XKG...Pattern: ^loc_[0-9A-HJKMNP-TV-Z]{26}$usr_01H8XL7...Pattern: ^usr_[0-9A-HJKMNP-TV-Z]{26}$Updated.
A person record. Central to almost every other resource in Gleantap.
Contacts have an internal id (con_<24-hex>) and optionally an external ID (external_id) you set from your own system. Both can be used to look up the record.
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:[^/]+$Your system's ID for this contact. Unique within the account. For contacts synced by an integration this is the member id the integration stores in user_id (returned when external_id itself is unset and user_id is not just the email/phone). filter[external_id] and GET /v3/contacts/external_id:<x> match either field, as string or integer.
user_12345[email protected]Stored the way every Gleantap writer stores it (formatPhone) β a + number is kept, a national number gets the account's country code (US/CA +1, GB +44, AU +61 with the trunk 0 dropped, NL, DK, LB, AE). Writes accept either form.
+15558675309Pattern: ^\+[1-9]\d{1,14}$Stored as personalinfo.dob (date) + personalinfo.birthday (day of year), the pair birthday segments, campaigns and loyalty birthday rewards match on; data.dob is kept in step.
1990-04-12BCP 47 locale tag.
en-INIANA timezone name.
America/New_YorkAll tags currently applied to this contact (sales.tags, the list the dashboard shows).
["vip","trial"]Not populated yet (no Location resource). Use location / location_id.
loc_01H8XKG...Pattern: ^loc_[0-9A-HJKMNP-TV-Z]{26}$The contact's location/club name as the integration or CSV import recorded it (accountinfo.location, else data.location / data.location_name). Numeric on some accounts; always returned as a string. Same value filter[location] matches.
The integration's location id (accountinfo.location_id, else data.location_id).
Membership/account status as synced (accountinfo.status), e.g. active, inactive, cancelled. Vocabulary is the integration's.
usr_01H8XL7...Pattern: ^usr_[0-9A-HJKMNP-TV-Z]{26}$Segment IDs this contact is currently a member of. Eventually consistent (up to minutes of lag from an underlying data change).
Stage label stored in accountinfo.type. The values in real data are member, prospect, past and non-member, plus raw labels integrations pass through in their own case (Kid, Parent, Individual, β¦). Not enforced; filter[lifecycle_stage] matches case-insensitively. Writing member (or customer) also sets accountinfo.member: 1; anything other than member/former sets accountinfo.prospect: 1.
memberRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZLast change by any writer β the later of v3's own stamp and the last_updated_on the integrations and dashboard maintain. sort=updated_at orders by last_updated_on.
2026-05-27T14:23:11.482ZSet if this contact was soft-deleted. Soft-deleted contacts are hidden from all list endpoints, the dashboard and every send by default; include ?filter[deleted]=true to see them. Merged-away contacts also carry it.
2026-05-27T14:23:11.482ZRequest could not be parsed or failed validation.
Missing or invalid credentials.
Authenticated but not authorized (scope, role, or feature-flag mismatch).
The resource doesn't exist or isn't visible to this caller.
Idempotency conflict, version conflict (If-Match), or state conflict.
Semantic validation failed β the request is well-formed but references an object in the wrong state (e.g., sending to an opted-out contact).
PATCH /v3/contacts/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1245
{
"external_id": "text",
"email": "[email protected]",
"phone": "+15558675309",
"first_name": "text",
"last_name": "text",
"date_of_birth": "1990-04-12",
"locale": "en-IN",
"timezone": "America/New_York",
"tags": [
"vip"
],
"add_tags": [
"vip"
],
"remove_tags": [
"vip"
],
"custom_fields": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"memberships": [
{
"id": "7da31914-6ef9-4a5d-b218-b8bdcfbe2954",
"name": "text",
"type": "text",
"status": "text",
"member_status": "text",
"member_status_date": "2026-01-01T00:00:00.000Z",
"price": 1,
"total_sessions": 1,
"sessions_remaining": 1,
"location_id": "text",
"start_date": "2026-01-01T00:00:00.000Z",
"begin_date": "2026-01-01T00:00:00.000Z",
"renewal_date": "2026-01-01T00:00:00.000Z",
"next_billing_date": "2026-01-01T00:00:00.000Z",
"end_date": "2026-01-01T00:00:00.000Z",
"expiration_date": "2026-01-01T00:00:00.000Z",
"renewal_type": "text",
"invoice_ids": [
"text"
],
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"consent": {
"sms": {
"status": "opted_in",
"source": "form_submission",
"timestamp": "2026-04-01T10:14:00Z"
},
"email": {
"status": "opted_in",
"source": "form_submission",
"timestamp": "2026-04-01T10:14:00Z"
}
},
"primary_location_id": "loc_01H8XKG...",
"owner_user_id": "usr_01H8XL7...",
"lifecycle_stage": "text",
"metadata": {
"our_crm_id": "cust_884321",
"sync_batch": "2026-05-imports"
}
}{
"id": "con_6a7eaec3505bea795709f897",
"object": "text",
"external_id": "user_12345",
"email": "[email protected]",
"phone": "+15558675309",
"first_name": "text",
"last_name": "text",
"date_of_birth": "1990-04-12",
"locale": "en-IN",
"timezone": "America/New_York",
"tags": [
"vip",
"trial"
],
"custom_fields": {
"favorite_color": "teal",
"lead_score": 87
},
"memberships": [
{
"id": "7da31914-6ef9-4a5d-b218-b8bdcfbe2954",
"name": "text",
"type": "text",
"status": "text",
"member_status": "text",
"member_status_date": "2026-01-01T00:00:00.000Z",
"price": 1,
"total_sessions": 1,
"sessions_remaining": 1,
"location_id": "text",
"start_date": "2026-01-01T00:00:00.000Z",
"begin_date": "2026-01-01T00:00:00.000Z",
"renewal_date": "2026-01-01T00:00:00.000Z",
"next_billing_date": "2026-01-01T00:00:00.000Z",
"end_date": "2026-01-01T00:00:00.000Z",
"expiration_date": "2026-01-01T00:00:00.000Z",
"renewal_type": "text",
"invoice_ids": [
"text"
],
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"consent": {
"sms": {
"status": "opted_in",
"source": "form_submission",
"timestamp": "2026-04-01T10:14:00Z"
},
"email": {
"status": "opted_in",
"source": "form_submission",
"timestamp": "2026-04-01T10:14:00Z"
}
},
"primary_location_id": "loc_01H8XKG...",
"location": "text",
"location_id": "text",
"member_status": "text",
"owner_user_id": "usr_01H8XL7...",
"segments": [
"seg_01H8XKE..."
],
"pipelines": [
{
"pipeline_id": "text",
"stage_id": "text",
"stage_name": "text",
"status": "text",
"added_at": "2026-05-27T14:23:11.482Z",
"last_updated_at": "2026-05-27T14:23:11.482Z"
}
],
"lifecycle_stage": "member",
"last_seen_at": "2026-05-27T14:23:11.482Z",
"created_at": "2026-05-27T14:23:11.482Z",
"updated_at": "2026-05-27T14:23:11.482Z",
"deleted_at": "2026-05-27T14:23:11.482Z",
"metadata": {
"our_crm_id": "cust_884321",
"sync_batch": "2026-05-imports"
}
}Soft delete by default β the contact leaves its workroom the way the integrations retire contacts (it stops appearing in the dashboard, segments and every send), and is restorable via PATCH with deleted_at: null. Pass ?hard=true for permanent delete (requires contacts:delete_hard scope, irreversible) β use for GDPR/CCPA erasure; the contact's tasks and appointments are deleted with it, as the dashboard's delete does. To stop marketing sends without losing history, use POST /v3/contacts/{id}/opt_out with channel: "all" instead.
?hard=true is permanent. There is no undo and no trash to restore from. Anything that references the deleted record is affected too.
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.
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:[^/]+$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.
If true, permanently delete instead of soft-delete. Requires contacts:delete_hard scope. Irreversible.
falseMinor 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 Test1Deleted.
No content
Missing or invalid credentials.
Authenticated but not authorized (scope, role, or feature-flag mismatch).
The resource doesn't exist or isn't visible to this caller.
DELETE /v3/contacts/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Merge source_id into the URL contact β the same merge the dashboard and integrations use. URL contact survives; source_id is retired (it leaves the workroom, carries merged_to_user_id, and the destination records it in mergehistory). Profile fields the destination lacks are filled from the source; tags, CRM tasks/appointments/pipelines/notes, memberships, segment membership, form submissions, flow and campaign history and purchase/visit summaries are unioned. The source's messages, conversations, calls, notes, flow enrolments, campaign sends, tasks, appointments and events are re-pointed to the destination (a campaign/flow the destination already has is left on the source, so nobody is messaged twice). By default (prefer_destination) the destination's non-empty values are kept; prefer_source / most_recent let the source's identity and profile fields (email, phone, name, external_id, custom fields, date of birth, lifecycle) win. Both contacts must be in the same workroom (422 otherwise). Returns 422 compliance_block_merge if conflicting opt-out states would be silently overridden β resolve consent explicitly first.
Irreversible. Merging folds one contact's history into another and the source cannot be restored.
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.
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:[^/]+$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-7a907c4d4f8eThe contact to merge INTO the current one. source_id's data is folded into the URL contact; then source_id is retired the way the legacy merge retires it (not restorable). Must be in the same workroom.
con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$Which record wins on field conflicts:
prefer_destination(default): URL-referenced contact wins.prefer_source:source_id's value wins where non-null.most_recent: the value from whichever record has the laterupdated_at. Tags, events, memberships, appointments, opportunities, notes, and conversations are always unioned regardless of strategy.
prefer_destinationPossible values: Merge complete. Returns the destination contact with unioned data.
A person record. Central to almost every other resource in Gleantap.
Contacts have an internal id (con_<24-hex>) and optionally an external ID (external_id) you set from your own system. Both can be used to look up the record.
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:[^/]+$Your system's ID for this contact. Unique within the account. For contacts synced by an integration this is the member id the integration stores in user_id (returned when external_id itself is unset and user_id is not just the email/phone). filter[external_id] and GET /v3/contacts/external_id:<x> match either field, as string or integer.
user_12345[email protected]Stored the way every Gleantap writer stores it (formatPhone) β a + number is kept, a national number gets the account's country code (US/CA +1, GB +44, AU +61 with the trunk 0 dropped, NL, DK, LB, AE). Writes accept either form.
+15558675309Pattern: ^\+[1-9]\d{1,14}$Stored as personalinfo.dob (date) + personalinfo.birthday (day of year), the pair birthday segments, campaigns and loyalty birthday rewards match on; data.dob is kept in step.
1990-04-12BCP 47 locale tag.
en-INIANA timezone name.
America/New_YorkAll tags currently applied to this contact (sales.tags, the list the dashboard shows).
["vip","trial"]Not populated yet (no Location resource). Use location / location_id.
loc_01H8XKG...Pattern: ^loc_[0-9A-HJKMNP-TV-Z]{26}$The contact's location/club name as the integration or CSV import recorded it (accountinfo.location, else data.location / data.location_name). Numeric on some accounts; always returned as a string. Same value filter[location] matches.
The integration's location id (accountinfo.location_id, else data.location_id).
Membership/account status as synced (accountinfo.status), e.g. active, inactive, cancelled. Vocabulary is the integration's.
usr_01H8XL7...Pattern: ^usr_[0-9A-HJKMNP-TV-Z]{26}$Segment IDs this contact is currently a member of. Eventually consistent (up to minutes of lag from an underlying data change).
Stage label stored in accountinfo.type. The values in real data are member, prospect, past and non-member, plus raw labels integrations pass through in their own case (Kid, Parent, Individual, β¦). Not enforced; filter[lifecycle_stage] matches case-insensitively. Writing member (or customer) also sets accountinfo.member: 1; anything other than member/former sets accountinfo.prospect: 1.
memberRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZLast change by any writer β the later of v3's own stamp and the last_updated_on the integrations and dashboard maintain. sort=updated_at orders by last_updated_on.
2026-05-27T14:23:11.482ZSet if this contact was soft-deleted. Soft-deleted contacts are hidden from all list endpoints, the dashboard and every send by default; include ?filter[deleted]=true to see them. Merged-away contacts also carry it.
2026-05-27T14:23:11.482ZRequest could not be parsed or failed validation.
The resource doesn't exist or isn't visible to this caller.
Idempotency conflict, version conflict (If-Match), or state conflict.
Semantic validation failed β the request is well-formed but references an object in the wrong state (e.g., sending to an opted-out contact).
POST /v3/contacts/{id}/merge HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 85
{
"source_id": "con_6a7eaec3505bea795709f897",
"conflict_strategy": "prefer_destination"
}{
"id": "con_6a7eaec3505bea795709f897",
"object": "text",
"external_id": "user_12345",
"email": "[email protected]",
"phone": "+15558675309",
"first_name": "text",
"last_name": "text",
"date_of_birth": "1990-04-12",
"locale": "en-IN",
"timezone": "America/New_York",
"tags": [
"vip",
"trial"
],
"custom_fields": {
"favorite_color": "teal",
"lead_score": 87
},
"memberships": [
{
"id": "7da31914-6ef9-4a5d-b218-b8bdcfbe2954",
"name": "text",
"type": "text",
"status": "text",
"member_status": "text",
"member_status_date": "2026-01-01T00:00:00.000Z",
"price": 1,
"total_sessions": 1,
"sessions_remaining": 1,
"location_id": "text",
"start_date": "2026-01-01T00:00:00.000Z",
"begin_date": "2026-01-01T00:00:00.000Z",
"renewal_date": "2026-01-01T00:00:00.000Z",
"next_billing_date": "2026-01-01T00:00:00.000Z",
"end_date": "2026-01-01T00:00:00.000Z",
"expiration_date": "2026-01-01T00:00:00.000Z",
"renewal_type": "text",
"invoice_ids": [
"text"
],
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"consent": {
"sms": {
"status": "opted_in",
"source": "form_submission",
"timestamp": "2026-04-01T10:14:00Z"
},
"email": {
"status": "opted_in",
"source": "form_submission",
"timestamp": "2026-04-01T10:14:00Z"
}
},
"primary_location_id": "loc_01H8XKG...",
"location": "text",
"location_id": "text",
"member_status": "text",
"owner_user_id": "usr_01H8XL7...",
"segments": [
"seg_01H8XKE..."
],
"pipelines": [
{
"pipeline_id": "text",
"stage_id": "text",
"stage_name": "text",
"status": "text",
"added_at": "2026-05-27T14:23:11.482Z",
"last_updated_at": "2026-05-27T14:23:11.482Z"
}
],
"lifecycle_stage": "member",
"last_seen_at": "2026-05-27T14:23:11.482Z",
"created_at": "2026-05-27T14:23:11.482Z",
"updated_at": "2026-05-27T14:23:11.482Z",
"deleted_at": "2026-05-27T14:23:11.482Z",
"metadata": {
"our_crm_id": "cust_884321",
"sync_batch": "2026-05-imports"
}
}Compliance-of-record for marketing opt-in. Provide source and timestamp β the platform stores them on the contact's consent record and may need them for regulatory review. Transactional sends respect opted_out but do not require opted_in, so transactional intent alone is not a reason to opt someone in.
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.
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:[^/]+$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 Test1Record affirmative consent for a marketing channel.
Providing source and timestamp is strongly recommended for compliance evidence β the platform stores these on the ConsentRecord and shows them on the contact profile.
Where the consent came from. Examples: form_submission, import_verified_source, api, admin_ui, double_opt_in_confirmed.
When the consent was given. Defaults to server time if omitted.
2026-05-27T14:23:11.482ZConsent recorded.
A person record. Central to almost every other resource in Gleantap.
Contacts have an internal id (con_<24-hex>) and optionally an external ID (external_id) you set from your own system. Both can be used to look up the record.
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:[^/]+$Your system's ID for this contact. Unique within the account. For contacts synced by an integration this is the member id the integration stores in user_id (returned when external_id itself is unset and user_id is not just the email/phone). filter[external_id] and GET /v3/contacts/external_id:<x> match either field, as string or integer.
user_12345[email protected]Stored the way every Gleantap writer stores it (formatPhone) β a + number is kept, a national number gets the account's country code (US/CA +1, GB +44, AU +61 with the trunk 0 dropped, NL, DK, LB, AE). Writes accept either form.
+15558675309Pattern: ^\+[1-9]\d{1,14}$Stored as personalinfo.dob (date) + personalinfo.birthday (day of year), the pair birthday segments, campaigns and loyalty birthday rewards match on; data.dob is kept in step.
1990-04-12BCP 47 locale tag.
en-INIANA timezone name.
America/New_YorkAll tags currently applied to this contact (sales.tags, the list the dashboard shows).
["vip","trial"]Not populated yet (no Location resource). Use location / location_id.
loc_01H8XKG...Pattern: ^loc_[0-9A-HJKMNP-TV-Z]{26}$The contact's location/club name as the integration or CSV import recorded it (accountinfo.location, else data.location / data.location_name). Numeric on some accounts; always returned as a string. Same value filter[location] matches.
The integration's location id (accountinfo.location_id, else data.location_id).
Membership/account status as synced (accountinfo.status), e.g. active, inactive, cancelled. Vocabulary is the integration's.
usr_01H8XL7...Pattern: ^usr_[0-9A-HJKMNP-TV-Z]{26}$Segment IDs this contact is currently a member of. Eventually consistent (up to minutes of lag from an underlying data change).
Stage label stored in accountinfo.type. The values in real data are member, prospect, past and non-member, plus raw labels integrations pass through in their own case (Kid, Parent, Individual, β¦). Not enforced; filter[lifecycle_stage] matches case-insensitively. Writing member (or customer) also sets accountinfo.member: 1; anything other than member/former sets accountinfo.prospect: 1.
memberRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZLast change by any writer β the later of v3's own stamp and the last_updated_on the integrations and dashboard maintain. sort=updated_at orders by last_updated_on.
2026-05-27T14:23:11.482ZSet if this contact was soft-deleted. Soft-deleted contacts are hidden from all list endpoints, the dashboard and every send by default; include ?filter[deleted]=true to see them. Merged-away contacts also carry it.
2026-05-27T14:23:11.482ZThe resource doesn't exist or isn't visible to this caller.
POST /v3/contacts/{id}/opt_in HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 118
{
"channel": "sms",
"source": "text",
"timestamp": "2026-05-27T14:23:11.482Z",
"source_ip": "text",
"source_user_agent": "text"
}{
"id": "con_6a7eaec3505bea795709f897",
"object": "text",
"external_id": "user_12345",
"email": "[email protected]",
"phone": "+15558675309",
"first_name": "text",
"last_name": "text",
"date_of_birth": "1990-04-12",
"locale": "en-IN",
"timezone": "America/New_York",
"tags": [
"vip",
"trial"
],
"custom_fields": {
"favorite_color": "teal",
"lead_score": 87
},
"memberships": [
{
"id": "7da31914-6ef9-4a5d-b218-b8bdcfbe2954",
"name": "text",
"type": "text",
"status": "text",
"member_status": "text",
"member_status_date": "2026-01-01T00:00:00.000Z",
"price": 1,
"total_sessions": 1,
"sessions_remaining": 1,
"location_id": "text",
"start_date": "2026-01-01T00:00:00.000Z",
"begin_date": "2026-01-01T00:00:00.000Z",
"renewal_date": "2026-01-01T00:00:00.000Z",
"next_billing_date": "2026-01-01T00:00:00.000Z",
"end_date": "2026-01-01T00:00:00.000Z",
"expiration_date": "2026-01-01T00:00:00.000Z",
"renewal_type": "text",
"invoice_ids": [
"text"
],
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"consent": {
"sms": {
"status": "opted_in",
"source": "form_submission",
"timestamp": "2026-04-01T10:14:00Z"
},
"email": {
"status": "opted_in",
"source": "form_submission",
"timestamp": "2026-04-01T10:14:00Z"
}
},
"primary_location_id": "loc_01H8XKG...",
"location": "text",
"location_id": "text",
"member_status": "text",
"owner_user_id": "usr_01H8XL7...",
"segments": [
"seg_01H8XKE..."
],
"pipelines": [
{
"pipeline_id": "text",
"stage_id": "text",
"stage_name": "text",
"status": "text",
"added_at": "2026-05-27T14:23:11.482Z",
"last_updated_at": "2026-05-27T14:23:11.482Z"
}
],
"lifecycle_stage": "member",
"last_seen_at": "2026-05-27T14:23:11.482Z",
"created_at": "2026-05-27T14:23:11.482Z",
"updated_at": "2026-05-27T14:23:11.482Z",
"deleted_at": "2026-05-27T14:23:11.482Z",
"metadata": {
"our_crm_id": "cust_884321",
"sync_batch": "2026-05-imports"
}
}Idempotent. channel: "all" opts out of SMS and email at once. Subsequent POST /notifications/* sends on an opted-out channel return 422 compliance_block whatever their category, as in the dashboard. Active flows do NOT un-enroll β they skip send-message nodes on opted-out channels. Inbound STOP replies are auto-recorded; call this only for external channels.
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.
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:[^/]+$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 Test1Record opt-out from a channel. Idempotent β repeated calls are no-ops.
Use channel: "all" to opt out of all marketing channels simultaneously (transactional messages continue to send).
Free-form reason. Not shown to the contact.
RFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZOpt-out recorded.
A person record. Central to almost every other resource in Gleantap.
Contacts have an internal id (con_<24-hex>) and optionally an external ID (external_id) you set from your own system. Both can be used to look up the record.
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:[^/]+$Your system's ID for this contact. Unique within the account. For contacts synced by an integration this is the member id the integration stores in user_id (returned when external_id itself is unset and user_id is not just the email/phone). filter[external_id] and GET /v3/contacts/external_id:<x> match either field, as string or integer.
user_12345[email protected]Stored the way every Gleantap writer stores it (formatPhone) β a + number is kept, a national number gets the account's country code (US/CA +1, GB +44, AU +61 with the trunk 0 dropped, NL, DK, LB, AE). Writes accept either form.
+15558675309Pattern: ^\+[1-9]\d{1,14}$Stored as personalinfo.dob (date) + personalinfo.birthday (day of year), the pair birthday segments, campaigns and loyalty birthday rewards match on; data.dob is kept in step.
1990-04-12BCP 47 locale tag.
en-INIANA timezone name.
America/New_YorkAll tags currently applied to this contact (sales.tags, the list the dashboard shows).
["vip","trial"]Not populated yet (no Location resource). Use location / location_id.
loc_01H8XKG...Pattern: ^loc_[0-9A-HJKMNP-TV-Z]{26}$The contact's location/club name as the integration or CSV import recorded it (accountinfo.location, else data.location / data.location_name). Numeric on some accounts; always returned as a string. Same value filter[location] matches.
The integration's location id (accountinfo.location_id, else data.location_id).
Membership/account status as synced (accountinfo.status), e.g. active, inactive, cancelled. Vocabulary is the integration's.
usr_01H8XL7...Pattern: ^usr_[0-9A-HJKMNP-TV-Z]{26}$Segment IDs this contact is currently a member of. Eventually consistent (up to minutes of lag from an underlying data change).
Stage label stored in accountinfo.type. The values in real data are member, prospect, past and non-member, plus raw labels integrations pass through in their own case (Kid, Parent, Individual, β¦). Not enforced; filter[lifecycle_stage] matches case-insensitively. Writing member (or customer) also sets accountinfo.member: 1; anything other than member/former sets accountinfo.prospect: 1.
memberRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZLast change by any writer β the later of v3's own stamp and the last_updated_on the integrations and dashboard maintain. sort=updated_at orders by last_updated_on.
2026-05-27T14:23:11.482ZSet if this contact was soft-deleted. Soft-deleted contacts are hidden from all list endpoints, the dashboard and every send by default; include ?filter[deleted]=true to see them. Merged-away contacts also carry it.
2026-05-27T14:23:11.482ZThe resource doesn't exist or isn't visible to this caller.
POST /v3/contacts/{id}/opt_out HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 72
{
"channel": "sms",
"reason": "text",
"timestamp": "2026-05-27T14:23:11.482Z"
}{
"id": "con_6a7eaec3505bea795709f897",
"object": "text",
"external_id": "user_12345",
"email": "[email protected]",
"phone": "+15558675309",
"first_name": "text",
"last_name": "text",
"date_of_birth": "1990-04-12",
"locale": "en-IN",
"timezone": "America/New_York",
"tags": [
"vip",
"trial"
],
"custom_fields": {
"favorite_color": "teal",
"lead_score": 87
},
"memberships": [
{
"id": "7da31914-6ef9-4a5d-b218-b8bdcfbe2954",
"name": "text",
"type": "text",
"status": "text",
"member_status": "text",
"member_status_date": "2026-01-01T00:00:00.000Z",
"price": 1,
"total_sessions": 1,
"sessions_remaining": 1,
"location_id": "text",
"start_date": "2026-01-01T00:00:00.000Z",
"begin_date": "2026-01-01T00:00:00.000Z",
"renewal_date": "2026-01-01T00:00:00.000Z",
"next_billing_date": "2026-01-01T00:00:00.000Z",
"end_date": "2026-01-01T00:00:00.000Z",
"expiration_date": "2026-01-01T00:00:00.000Z",
"renewal_type": "text",
"invoice_ids": [
"text"
],
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"consent": {
"sms": {
"status": "opted_in",
"source": "form_submission",
"timestamp": "2026-04-01T10:14:00Z"
},
"email": {
"status": "opted_in",
"source": "form_submission",
"timestamp": "2026-04-01T10:14:00Z"
}
},
"primary_location_id": "loc_01H8XKG...",
"location": "text",
"location_id": "text",
"member_status": "text",
"owner_user_id": "usr_01H8XL7...",
"segments": [
"seg_01H8XKE..."
],
"pipelines": [
{
"pipeline_id": "text",
"stage_id": "text",
"stage_name": "text",
"status": "text",
"added_at": "2026-05-27T14:23:11.482Z",
"last_updated_at": "2026-05-27T14:23:11.482Z"
}
],
"lifecycle_stage": "member",
"last_seen_at": "2026-05-27T14:23:11.482Z",
"created_at": "2026-05-27T14:23:11.482Z",
"updated_at": "2026-05-27T14:23:11.482Z",
"deleted_at": "2026-05-27T14:23:11.482Z",
"metadata": {
"our_crm_id": "cust_884321",
"sync_batch": "2026-05-imports"
}
}Paginated events for one contact, most recent first by occurred_at. Equivalent to GET /v3/events?filter[contact_id]=... but cheaper (no join). Common filters: ?filter[name]=purchase.completed, ?filter[occurred_at][gte]=....
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.
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:[^/]+$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.
The resource doesn't exist or isn't visible to this caller.
GET /v3/contacts/{id}/events HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"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"
}Time-DESC merge across externalevents, inboundtext, inboundemails, pushmessagessms, pushmessagesemail, phonecalls, appointments, and tasks β filtered by this contact. Use this when you want a chronological narrative for a contact ("what has happened with X?") rather than one specific dimension. filter[type] narrows to one or more of event, message, appointment, task (comma-separated). filter[since] and filter[until] are ISO datetimes. No cursor β the merge is bounded by limit (default 50, max 500); if you need more, narrow by type or since.
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.
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:[^/]+$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.
25Minor 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 Test1Merged activity items, most recent first.
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.
The resource doesn't exist or isn't visible to this caller.
GET /v3/contacts/{id}/activity HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "text",
"data": [
{
"id": "text",
"object": "activity",
"type": "event",
"title": "text",
"detail": "text",
"timestamp": "2026-05-27T14:23:11.482Z",
"channel": "sms",
"direction": "inbound",
"status": "text",
"reference": {
"id": "text",
"type": "event",
"url": "text"
},
"source_collection": "text"
}
],
"has_more": true,
"next_cursor": "text",
"prev_cursor": "text"
}Up to 10,000 contacts per request. Runs inline and returns the finished job (status completed; per-row failures in errors). For <50 records use POST /v3/contacts; for CSV imports with per-row error visibility use POST /v3/imports. Idempotency-Key is required. Rate limit bucket: bulk (10 req/min default).
Can delete in bulk. With operation: "delete" this removes every matched contact permanently.
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 contact operation. Max 10,000 records per request. Runs inline: the returned job is already completed, with per-row errors. There is no job-status endpoint to poll.
upsert: create if not found, update if found (seematch_on).create: always create; error on duplicate match.update: only update; skip records that don't match.delete: soft-delete records that match.
Field to use for finding existing records.
emailPossible values: 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/contacts/bulk HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Idempotency-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 55
{
"operation": "upsert",
"match_on": "email",
"data": [
null
]
}{
"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"
}Total count for the given filters. Accepts the same ?filter[...] params as GET /v3/contacts. For segment-scoped counts, GET /v3/segments/{id} returns size inline. 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.
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 count.
The filter set the count was computed against (for debugging).
GET /v3/contacts/count HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
The count.
{
"object": "text",
"count": 1,
"filter_snapshot": {}
}Notes are stored on userdetails.salesactivity[] with action='noteadded' β the same feed the dashboard's activity tab reads. Ordered most-recent first.
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.
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:[^/]+$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 Test1List of notes (all-in-one; no pagination).
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.
The resource doesn't exist or isn't visible to this caller.
GET /v3/contacts/{id}/notes HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "text",
"data": [
{
"object": "text",
"body": "text",
"added_by": "text",
"added_by_email": "text",
"created_at": "2026-01-01T00:00:00.000Z"
}
],
"has_more": true,
"next_cursor": "text",
"prev_cursor": "text"
}Writes to userdetails.salesactivity[]. added_by is derived from the auth context β OAuth tokens carry a user_id; API-key writes are tagged added_by='api_key' so the dashboard's activity feed can distinguish human vs machine notes.
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.
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:[^/]+$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-7a907c4d4f8eThe note text. (The legacy field name body is still accepted but deprecated β avoid it, as a request-body property literally named body collides with the HTTP request body in some generators.)
Note created.
Staff ID (usr_...) or the literal api_key when created by an API-key call.
The resource doesn't exist or isn't visible to this caller.
Semantic validation failed β the request is well-formed but references an object in the wrong state (e.g., sending to an opted-out contact).
POST /v3/contacts/{id}/notes HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"note": "text"
}{
"object": "text",
"body": "text",
"added_by": "text",
"added_by_email": "text",
"created_at": "2026-01-01T00:00:00.000Z"
}Backed by userdetails.sales.responsible[]. Also exposed as owner_user_ids[] on the Contact resource.
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.
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:[^/]+$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 Test1Assigned staff.
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.
The resource doesn't exist or isn't visible to this caller.
GET /v3/contacts/{id}/responsible HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "text",
"data": [
{
"object": "text",
"user_id": "text",
"email": "text"
}
],
"has_more": true,
"next_cursor": "text",
"prev_cursor": "text"
}Idempotent β assigning an already-assigned user returns 200 with the same shape (no salesactivity entry emitted). New assignments push a responsible_added entry to salesactivity for the dashboard's activity feed.
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.
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:[^/]+$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 staff user (from the legacy users collection). Used for owner_id, responsible_id, created_by, assigned_to, etc.
^usr_[0-9a-f]{24}$Assignment created (or already existed).
A staff user (from the legacy users collection). Used for owner_id, responsible_id, created_by, assigned_to, etc.
^usr_[0-9a-f]{24}$The resource doesn't exist or isn't visible to this caller.
Semantic validation failed β the request is well-formed but references an object in the wrong state (e.g., sending to an opted-out contact).
POST /v3/contacts/{id}/responsible HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 18
{
"user_id": "text"
}{
"object": "text",
"user_id": "text",
"email": "text"
}Idempotent β removing an unassigned user returns 204 without side effects. Removal logs a responsible_removed salesactivity entry.
Permanent. There is no undo and no trash to restore from. Anything that references the deleted record is affected too.
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.
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:[^/]+$A staff user (from the legacy users collection). Used for owner_id, responsible_id, created_by, assigned_to, etc.
^usr_[0-9a-f]{24}$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 Test1Removed (or was already unassigned).
No content
The resource doesn't exist or isn't visible to this caller.
DELETE /v3/contacts/{id}/responsible/{user_id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Static segments only. Dynamic segments derive membership from their query β 422 wrong_segment_type is returned if the segment is dynamic. Mirror of POST /segments/{seg_id}/contacts scoped to one contact.
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.
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:[^/]+$seg_01H8XKE...Pattern: ^seg_[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 Test1Segment (updated size).
A named collection of contacts. Either static (hand-managed list) or dynamic (query-defined). Discriminated by the type field, which is immutable after creation.
seg_01H8XKE...Pattern: ^seg_[0-9A-HJKMNP-TV-Z]{26}$The workroom that owns this segment. A flow can only be triggered by segments in its own workroom β compare against Flow.workroom_id.
wrm_5ace370fd2a57d74d0548fb2Pattern: ^wrm_[0-9a-f]{24}$static β hand-managed member list. Contacts are added/removed explicitly.
dynamic β query-defined membership. Auto-evaluated; membership changes as contact data changes.
Immutable after creation.
Current member count. Eventually consistent β up to minutes of lag on dynamic segments.
Members with a non-empty, non-invalid email.
Members with a non-empty, non-invalid phone.
When this dynamic segment was last recomputed. Null on static.
2026-05-27T14:23:11.482ZThe segment folder this segment currently belongs to, or null if unfoldered.
sfd_66b3a91d0e5b7c1a4d8e2f1aPattern: ^sfd_[0-9a-fA-F]{24}$AI-generated narrative summary of the segment's criteria. Populated on demand via POST /v3/segments/{id}/summary.
RFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZThe resource doesn't exist or isn't visible to this caller.
Semantic validation failed β the request is well-formed but references an object in the wrong state (e.g., sending to an opted-out contact).
POST /v3/contacts/{id}/segments/{seg_id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "seg_01H8XKE...",
"object": "segment",
"type": "dynamic",
"name": "Active VIPs in Mumbai",
"description": "VIP-tagged members who checked in or purchased recently",
"query": {
"segment_users": [
{
"segment": "Tags",
"operator": "Contains",
"value": [
"vip"
]
},
{
"segment": "City",
"operator": "=",
"value": [
"Mumbai"
]
}
]
},
"size": 1247,
"email_count": 1188,
"phone_count": 1201,
"last_evaluated_at": "2026-05-27T14:00:00Z",
"created_at": "2026-04-01T09:00:00Z",
"updated_at": "2026-05-27T14:00:00Z"
}Static segments only. For dynamic segments, edit the query. Marks membership as value: 0 to preserve "was in" history for Is Not In Segment queries.
Permanent. There is no undo and no trash to restore from. Anything that references the deleted record is affected too.
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.
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:[^/]+$seg_01H8XKE...Pattern: ^seg_[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 Test1Removed.
No content
The resource doesn't exist or isn't visible to this caller.
Semantic validation failed β the request is well-formed but references an object in the wrong state (e.g., sending to an opted-out contact).
DELETE /v3/contacts/{id}/segments/{seg_id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content