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

Contacts

The central person record. Includes CRUD, merge, opt-in/opt-out, sub-resource listing, bulk upsert, and count.

List contacts.

get

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.

Authorizations
AuthorizationstringRequired

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

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

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

Query parameters
workroomstringOptional

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

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

Page size. Default 25, max 100.

Default: 25
cursorstringOptional

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

beforestringOptional

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.

sortstringOptional

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

Example: -created_at,email
fieldsstringOptional

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.

Example: id,email,phone,tags
Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
200

A page of contacts.

application/json
get/contacts
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"
}

Create or upsert a contact.

post

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 of ContactMembership objects) on this endpoint. Segment engine reads memberships.status, memberships.type, memberships.renewal_date, etc. directly off the contact.

  • Purchases β†’ record via POST /v3/events with name: "purchase.completed" (or .refunded, etc.) and properties.product_name + properties.amount. The events model auto-updates the contact's purchases.* summary counters and secondaryobject product master.

  • Visits / class check-ins β†’ POST /v3/events with name: "visit.checked_in" and properties.class_name. Sets is_visit=1 and populates the visits.* 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.

Authorizations
AuthorizationstringRequired

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

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

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

Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

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

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

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

Body for creating or upserting a contact.

  • If you pass an email, phone, or external_id that matches an existing contact in this account, the existing record is updated (upsert).
  • Provide match_on in the request to control which field is used for matching (default: email if provided, else phone, else external_id).
  • consent is optional but recommended for any contact that may receive marketing messages β€” sending to a contact without opted-in consent returns 422 compliance_block.
anyOptional
or
anyOptional
or
anyOptional
or
anyOptional
Responses
200

An existing contact was matched and updated.

application/json

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.

idstringRequired

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

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

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.

Example: user_12345
emailstring Β· email Β· nullableOptionalExample: [email protected]
phonestring Β· nullableOptional

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.

Example: +15558675309Pattern: ^\+[1-9]\d{1,14}$
first_namestring Β· max: 100 Β· nullableOptional
last_namestring Β· max: 100 Β· nullableOptional
date_of_birthstring Β· date Β· nullableOptional

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.

Example: 1990-04-12
localestring Β· nullableOptional

BCP 47 locale tag.

Example: en-IN
timezonestring Β· nullableOptional

IANA timezone name.

Example: America/New_York
tagsstring[]Optional

All tags currently applied to this contact (sales.tags, the list the dashboard shows).

Example: ["vip","trial"]
primary_location_idstring Β· nullableOptional

Not populated yet (no Location resource). Use location / location_id.

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

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.

location_idstring Β· nullableOptional

The integration's location id (accountinfo.location_id, else data.location_id).

member_statusstring Β· nullableOptional

Membership/account status as synced (accountinfo.status), e.g. active, inactive, cancelled. Vocabulary is the integration's.

owner_user_idstring Β· nullableOptionalExample: usr_01H8XL7...Pattern: ^usr_[0-9A-HJKMNP-TV-Z]{26}$
segmentsstring[]Optional

Segment IDs this contact is currently a member of. Eventually consistent (up to minutes of lag from an underlying data change).

lifecycle_stagestring Β· nullableOptional

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.

Example: member
last_seen_atstring Β· date-time Β· nullableOptional

RFC 3339 timestamp, always UTC, millisecond precision.

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

RFC 3339 timestamp, always UTC, millisecond precision.

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

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

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

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

Example: 2026-05-27T14:23:11.482Z
post/contacts
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"
  }
}

Audience size and subscriber growth.

get

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.

Authorizations
AuthorizationstringRequired

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

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

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

Query parameters
workroomstringOptional

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

group_bystring Β· enumOptionalPossible values:
sincestringOptional

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.

untilstringOptional

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.

locationstringOptional

Exact match, case-insensitive. Matches numeric locations too.

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
200

Audience figures, or a breakdown when group_by was passed.

application/json
or
get/contacts/report
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
  }
}

Retrieve a contact.

get

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.

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
Query parameters
workroomstringOptional

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

fieldsstringOptional

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.

Example: id,email,phone,tags
Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
200

The contact.

application/json

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.

idstringRequired

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

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

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.

Example: user_12345
emailstring Β· email Β· nullableOptionalExample: [email protected]
phonestring Β· nullableOptional

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.

Example: +15558675309Pattern: ^\+[1-9]\d{1,14}$
first_namestring Β· max: 100 Β· nullableOptional
last_namestring Β· max: 100 Β· nullableOptional
date_of_birthstring Β· date Β· nullableOptional

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.

Example: 1990-04-12
localestring Β· nullableOptional

BCP 47 locale tag.

Example: en-IN
timezonestring Β· nullableOptional

IANA timezone name.

Example: America/New_York
tagsstring[]Optional

All tags currently applied to this contact (sales.tags, the list the dashboard shows).

Example: ["vip","trial"]
primary_location_idstring Β· nullableOptional

Not populated yet (no Location resource). Use location / location_id.

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

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.

location_idstring Β· nullableOptional

The integration's location id (accountinfo.location_id, else data.location_id).

member_statusstring Β· nullableOptional

Membership/account status as synced (accountinfo.status), e.g. active, inactive, cancelled. Vocabulary is the integration's.

owner_user_idstring Β· nullableOptionalExample: usr_01H8XL7...Pattern: ^usr_[0-9A-HJKMNP-TV-Z]{26}$
segmentsstring[]Optional

Segment IDs this contact is currently a member of. Eventually consistent (up to minutes of lag from an underlying data change).

lifecycle_stagestring Β· nullableOptional

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.

Example: member
last_seen_atstring Β· date-time Β· nullableOptional

RFC 3339 timestamp, always UTC, millisecond precision.

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

RFC 3339 timestamp, always UTC, millisecond precision.

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

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

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

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

Example: 2026-05-27T14:23:11.482Z
get/contacts/{id}
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"
  }
}

Update a contact.

patch

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

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Body

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

external_idstring Β· max: 200 Β· nullableOptional
emailstring Β· email Β· nullableOptionalExample: [email protected]
phonestring Β· nullableOptional

E.164 international phone format.

Example: +15558675309Pattern: ^\+[1-9]\d{1,14}$
first_namestring Β· max: 100 Β· nullableOptional
last_namestring Β· max: 100 Β· nullableOptional
date_of_birthstring Β· date Β· nullableOptional

Calendar date (no time), ISO 8601 YYYY-MM-DD.

Example: 1990-04-12
localestring Β· nullableOptional

BCP 47 locale tag.

Example: en-IN
timezonestring Β· nullableOptional

IANA timezone name.

Example: America/New_York
tagsstring[]Optional

Replaces the entire tag set. To add/remove individual tags without touching others, use PATCH with add_tags / remove_tags fields instead of tags.

add_tagsstring[]Optional

Tags to add without touching others.

remove_tagsstring[]Optional

Tags to remove without touching others.

primary_location_idstring Β· nullableOptionalExample: loc_01H8XKG...Pattern: ^loc_[0-9A-HJKMNP-TV-Z]{26}$
owner_user_idstring Β· nullableOptionalExample: usr_01H8XL7...Pattern: ^usr_[0-9A-HJKMNP-TV-Z]{26}$
lifecycle_stagestring Β· max: 50 Β· nullableOptional
Responses
200

Updated.

application/json

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.

idstringRequired

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

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

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.

Example: user_12345
emailstring Β· email Β· nullableOptionalExample: [email protected]
phonestring Β· nullableOptional

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.

Example: +15558675309Pattern: ^\+[1-9]\d{1,14}$
first_namestring Β· max: 100 Β· nullableOptional
last_namestring Β· max: 100 Β· nullableOptional
date_of_birthstring Β· date Β· nullableOptional

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.

Example: 1990-04-12
localestring Β· nullableOptional

BCP 47 locale tag.

Example: en-IN
timezonestring Β· nullableOptional

IANA timezone name.

Example: America/New_York
tagsstring[]Optional

All tags currently applied to this contact (sales.tags, the list the dashboard shows).

Example: ["vip","trial"]
primary_location_idstring Β· nullableOptional

Not populated yet (no Location resource). Use location / location_id.

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

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.

location_idstring Β· nullableOptional

The integration's location id (accountinfo.location_id, else data.location_id).

member_statusstring Β· nullableOptional

Membership/account status as synced (accountinfo.status), e.g. active, inactive, cancelled. Vocabulary is the integration's.

owner_user_idstring Β· nullableOptionalExample: usr_01H8XL7...Pattern: ^usr_[0-9A-HJKMNP-TV-Z]{26}$
segmentsstring[]Optional

Segment IDs this contact is currently a member of. Eventually consistent (up to minutes of lag from an underlying data change).

lifecycle_stagestring Β· nullableOptional

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.

Example: member
last_seen_atstring Β· date-time Β· nullableOptional

RFC 3339 timestamp, always UTC, millisecond precision.

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

RFC 3339 timestamp, always UTC, millisecond precision.

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

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

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

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

Example: 2026-05-27T14:23:11.482Z
patch/contacts/{id}
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"
  }
}

Delete a contact (soft by default).

delete

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.

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
Query parameters
workroomstringOptional

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

hardbooleanOptional

If true, permanently delete instead of soft-delete. Requires contacts:delete_hard scope. Irreversible.

Default: false
Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
204

Deleted.

No content

delete/contacts/{id}
DELETE /v3/contacts/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Merge another contact into this one.

post

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.

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

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

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

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

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

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

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 later updated_at. Tags, events, memberships, appointments, opportunities, notes, and conversations are always unioned regardless of strategy.
Default: prefer_destinationPossible values:
Responses
200

Merge complete. Returns the destination contact with unioned data.

application/json

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.

idstringRequired

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

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

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.

Example: user_12345
emailstring Β· email Β· nullableOptionalExample: [email protected]
phonestring Β· nullableOptional

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.

Example: +15558675309Pattern: ^\+[1-9]\d{1,14}$
first_namestring Β· max: 100 Β· nullableOptional
last_namestring Β· max: 100 Β· nullableOptional
date_of_birthstring Β· date Β· nullableOptional

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.

Example: 1990-04-12
localestring Β· nullableOptional

BCP 47 locale tag.

Example: en-IN
timezonestring Β· nullableOptional

IANA timezone name.

Example: America/New_York
tagsstring[]Optional

All tags currently applied to this contact (sales.tags, the list the dashboard shows).

Example: ["vip","trial"]
primary_location_idstring Β· nullableOptional

Not populated yet (no Location resource). Use location / location_id.

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

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.

location_idstring Β· nullableOptional

The integration's location id (accountinfo.location_id, else data.location_id).

member_statusstring Β· nullableOptional

Membership/account status as synced (accountinfo.status), e.g. active, inactive, cancelled. Vocabulary is the integration's.

owner_user_idstring Β· nullableOptionalExample: usr_01H8XL7...Pattern: ^usr_[0-9A-HJKMNP-TV-Z]{26}$
segmentsstring[]Optional

Segment IDs this contact is currently a member of. Eventually consistent (up to minutes of lag from an underlying data change).

lifecycle_stagestring Β· nullableOptional

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.

Example: member
last_seen_atstring Β· date-time Β· nullableOptional

RFC 3339 timestamp, always UTC, millisecond precision.

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

RFC 3339 timestamp, always UTC, millisecond precision.

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

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

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

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

Example: 2026-05-27T14:23:11.482Z
post/contacts/{id}/merge
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"
  }
}

Record affirmative consent for a channel.

post

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.

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Body

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

channelstring Β· enumRequiredPossible values:
sourcestringOptional

Where the consent came from. Examples: form_submission, import_verified_source, api, admin_ui, double_opt_in_confirmed.

timestampstring Β· date-timeOptional

When the consent was given. Defaults to server time if omitted.

Example: 2026-05-27T14:23:11.482Z
source_ipstringOptional
source_user_agentstringOptional
Responses
200

Consent recorded.

application/json

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.

idstringRequired

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

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

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.

Example: user_12345
emailstring Β· email Β· nullableOptionalExample: [email protected]
phonestring Β· nullableOptional

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.

Example: +15558675309Pattern: ^\+[1-9]\d{1,14}$
first_namestring Β· max: 100 Β· nullableOptional
last_namestring Β· max: 100 Β· nullableOptional
date_of_birthstring Β· date Β· nullableOptional

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.

Example: 1990-04-12
localestring Β· nullableOptional

BCP 47 locale tag.

Example: en-IN
timezonestring Β· nullableOptional

IANA timezone name.

Example: America/New_York
tagsstring[]Optional

All tags currently applied to this contact (sales.tags, the list the dashboard shows).

Example: ["vip","trial"]
primary_location_idstring Β· nullableOptional

Not populated yet (no Location resource). Use location / location_id.

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

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.

location_idstring Β· nullableOptional

The integration's location id (accountinfo.location_id, else data.location_id).

member_statusstring Β· nullableOptional

Membership/account status as synced (accountinfo.status), e.g. active, inactive, cancelled. Vocabulary is the integration's.

owner_user_idstring Β· nullableOptionalExample: usr_01H8XL7...Pattern: ^usr_[0-9A-HJKMNP-TV-Z]{26}$
segmentsstring[]Optional

Segment IDs this contact is currently a member of. Eventually consistent (up to minutes of lag from an underlying data change).

lifecycle_stagestring Β· nullableOptional

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.

Example: member
last_seen_atstring Β· date-time Β· nullableOptional

RFC 3339 timestamp, always UTC, millisecond precision.

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

RFC 3339 timestamp, always UTC, millisecond precision.

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

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

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

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

Example: 2026-05-27T14:23:11.482Z
post/contacts/{id}/opt_in
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"
  }
}

Record opt-out from a channel.

post

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.

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Body

Record 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).

channelstring Β· enumRequiredPossible values:
reasonstringOptional

Free-form reason. Not shown to the contact.

timestampstring Β· date-timeOptional

RFC 3339 timestamp, always UTC, millisecond precision.

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

Opt-out recorded.

application/json

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.

idstringRequired

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

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

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.

Example: user_12345
emailstring Β· email Β· nullableOptionalExample: [email protected]
phonestring Β· nullableOptional

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.

Example: +15558675309Pattern: ^\+[1-9]\d{1,14}$
first_namestring Β· max: 100 Β· nullableOptional
last_namestring Β· max: 100 Β· nullableOptional
date_of_birthstring Β· date Β· nullableOptional

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.

Example: 1990-04-12
localestring Β· nullableOptional

BCP 47 locale tag.

Example: en-IN
timezonestring Β· nullableOptional

IANA timezone name.

Example: America/New_York
tagsstring[]Optional

All tags currently applied to this contact (sales.tags, the list the dashboard shows).

Example: ["vip","trial"]
primary_location_idstring Β· nullableOptional

Not populated yet (no Location resource). Use location / location_id.

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

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.

location_idstring Β· nullableOptional

The integration's location id (accountinfo.location_id, else data.location_id).

member_statusstring Β· nullableOptional

Membership/account status as synced (accountinfo.status), e.g. active, inactive, cancelled. Vocabulary is the integration's.

owner_user_idstring Β· nullableOptionalExample: usr_01H8XL7...Pattern: ^usr_[0-9A-HJKMNP-TV-Z]{26}$
segmentsstring[]Optional

Segment IDs this contact is currently a member of. Eventually consistent (up to minutes of lag from an underlying data change).

lifecycle_stagestring Β· nullableOptional

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.

Example: member
last_seen_atstring Β· date-time Β· nullableOptional

RFC 3339 timestamp, always UTC, millisecond precision.

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

RFC 3339 timestamp, always UTC, millisecond precision.

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

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

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

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

Example: 2026-05-27T14:23:11.482Z
post/contacts/{id}/opt_out
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"
  }
}

List events for a contact.

get

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]=....

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
Query parameters
workroomstringOptional

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

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

Page size. Default 25, max 100.

Default: 25
cursorstringOptional

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

sortstringOptional

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

Example: -created_at,email
Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
200

A page of events.

application/json
objectconst: listRequired
has_morebooleanRequired

True if additional records exist beyond this page.

next_cursorstring Β· nullableRequired

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

prev_cursorstring Β· nullableRequired

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

get/contacts/{id}/events
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"
}

List the contact's unified activity feed (events + messages + appointments + tasks).

get

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.

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
Query parameters
workroomstringOptional

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

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

Page size. Default 25, max 100.

Default: 25
Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
200

Merged activity items, most recent first.

application/json
objectconst: listRequired
has_morebooleanRequired

True if additional records exist beyond this page.

next_cursorstring Β· nullableRequired

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

prev_cursorstring Β· nullableRequired

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

get/contacts/{id}/activity
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"
}

Bulk create/update/upsert/delete contacts.

post

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.

Authorizations
AuthorizationstringRequired

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

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

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

Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

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

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

operationstring Β· enumRequired
  • upsert: create if not found, update if found (see match_on).
  • create: always create; error on duplicate match.
  • update: only update; skip records that don't match.
  • delete: soft-delete records that match.
Possible values:
match_onstring Β· enumOptional

Field to use for finding existing records.

Default: emailPossible values:
Responses
202

Job accepted.

application/json

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

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

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

Possible values:
kindstringOptional

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

completed_atstring Β· date-time Β· nullableOptional

RFC 3339 timestamp, always UTC, millisecond precision.

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

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

totalintegerOptional
succeededintegerOptional
failedintegerOptional
result_urlstring Β· nullableOptional

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

errors_urlstring Β· nullableOptional

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

created_atstring Β· date-timeRequired

RFC 3339 timestamp, always UTC, millisecond precision.

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

RFC 3339 timestamp, always UTC, millisecond precision.

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

RFC 3339 timestamp, always UTC, millisecond precision.

Example: 2026-05-27T14:23:11.482Z
post/contacts/bulk
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"
}

Count contacts matching filters.

get

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.

Authorizations
AuthorizationstringRequired

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

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

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

Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
200

The count.

application/json
objectconst: countOptional
countintegerRequired
filter_snapshotobjectOptional

The filter set the count was computed against (for debugging).

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

The count.

{
  "object": "text",
  "count": 1,
  "filter_snapshot": {}
}

List notes on a contact.

get

Notes are stored on userdetails.salesactivity[] with action='noteadded' β€” the same feed the dashboard's activity tab reads. Ordered most-recent first.

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
200

List of notes (all-in-one; no pagination).

application/json
objectconst: listRequired
has_morebooleanRequired

True if additional records exist beyond this page.

next_cursorstring Β· nullableRequired

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

prev_cursorstring Β· nullableRequired

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

get/contacts/{id}/notes
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"
}

Add a note to a contact.

post

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.

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

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

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

Example: 8e3c7a90-7c4d-4f8e-8e3c-7a907c4d4f8e
Body
notestring Β· min: 1Required

The 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.)

Responses
201

Note created.

application/json
objectconst: contact_noteOptional
bodystring Β· nullableOptional
added_bystring Β· nullableOptional

Staff ID (usr_...) or the literal api_key when created by an API-key call.

added_by_emailstring Β· nullableOptional
created_atstring Β· date-time Β· nullableOptional
post/contacts/{id}/notes
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"
}

List staff assigned as responsible for a contact.

get

Backed by userdetails.sales.responsible[]. Also exposed as owner_user_ids[] on the Contact resource.

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
200

Assigned staff.

application/json
objectconst: listRequired
has_morebooleanRequired

True if additional records exist beyond this page.

next_cursorstring Β· nullableRequired

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

prev_cursorstring Β· nullableRequired

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

get/contacts/{id}/responsible
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"
}

Assign a staff user to a contact.

post

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.

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Body
user_idstringRequired

A staff user (from the legacy users collection). Used for owner_id, responsible_id, created_by, assigned_to, etc.

Pattern: ^usr_[0-9a-f]{24}$
Responses
201

Assignment created (or already existed).

application/json
objectconst: contact_responsibleOptional
user_idstringOptional

A staff user (from the legacy users collection). Used for owner_id, responsible_id, created_by, assigned_to, etc.

Pattern: ^usr_[0-9a-f]{24}$
emailstring Β· nullableOptional
post/contacts/{id}/responsible
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"
}

Unassign a staff user from a contact.

delete

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.

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

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

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

A staff user (from the legacy users collection). Used for owner_id, responsible_id, created_by, assigned_to, etc.

Pattern: ^usr_[0-9a-f]{24}$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
204

Removed (or was already unassigned).

No content

delete/contacts/{id}/responsible/{user_id}
DELETE /v3/contacts/{id}/responsible/{user_id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Add a contact to a static segment.

post

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.

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
seg_idstringRequiredExample: seg_01H8XKE...Pattern: ^seg_[0-9A-HJKMNP-TV-Z]{26}$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
200

Segment (updated size).

application/json

A named collection of contacts. Either static (hand-managed list) or dynamic (query-defined). Discriminated by the type field, which is immutable after creation.

idstringRequiredExample: seg_01H8XKE...Pattern: ^seg_[0-9A-HJKMNP-TV-Z]{26}$
objectconst: segmentRequired
workroom_idstring Β· nullableOptional

The workroom that owns this segment. A flow can only be triggered by segments in its own workroom β€” compare against Flow.workroom_id.

Example: wrm_5ace370fd2a57d74d0548fb2Pattern: ^wrm_[0-9a-f]{24}$
typestring Β· enumRequired

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.

Possible values:
namestring Β· max: 200Required
descriptionstring Β· max: 2000 Β· nullableOptional
sizeintegerRequired

Current member count. Eventually consistent β€” up to minutes of lag on dynamic segments.

email_countintegerOptional

Members with a non-empty, non-invalid email.

phone_countintegerOptional

Members with a non-empty, non-invalid phone.

last_evaluated_atstring Β· date-time Β· nullableOptional

When this dynamic segment was last recomputed. Null on static.

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

The segment folder this segment currently belongs to, or null if unfoldered.

Example: sfd_66b3a91d0e5b7c1a4d8e2f1aPattern: ^sfd_[0-9a-fA-F]{24}$
segment_summarystring Β· nullableOptional

AI-generated narrative summary of the segment's criteria. Populated on demand via POST /v3/segments/{id}/summary.

created_atstring Β· date-timeRequired

RFC 3339 timestamp, always UTC, millisecond precision.

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

RFC 3339 timestamp, always UTC, millisecond precision.

Example: 2026-05-27T14:23:11.482Z
post/contacts/{id}/segments/{seg_id}
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"
}

Remove a contact from a static segment.

delete

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.

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
seg_idstringRequiredExample: seg_01H8XKE...Pattern: ^seg_[0-9A-HJKMNP-TV-Z]{26}$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
204

Removed.

No content

delete/contacts/{id}/segments/{seg_id}
DELETE /v3/contacts/{id}/segments/{seg_id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content