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

Conversations

The inbox. There is one conversation per contact per workroom, covering the full SMS, email, and voice thread. Conversations are addressed by the contact ID (con_...). Reply with POST /conversations/{contact_id}/reply (channel = sms or email).

List contact conversations. Filter by open/closed, assigned staff, or tag.

get

This list includes every conversation regardless of channel, including Instagram, Facebook Messenger, WhatsApp, and Gleanchat (web chat) - but listConversationMessages and replyToConversation only support sms, email, and voice (see their own descriptions). A conversation from one of those unsupported channels still appears here; its messages cannot be read or replied to via this API today.

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

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

OK

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/conversations
GET /v3/conversations HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "object": "text",
  "data": [
    {
      "id": "con_6a7eaec3505bea795709f897",
      "object": "conversation",
      "contact_id": "con_6a7eaec3505bea795709f897",
      "contact_name": "text",
      "contact_email": "text",
      "contact_phone": "text",
      "closed": true,
      "conversation_id": "text",
      "responsible_ids": [
        "text"
      ],
      "tags": [
        "text"
      ],
      "tag_ids": [
        "text"
      ],
      "started_at": "2026-05-27T14:23:11.482Z",
      "closed_at": "2026-05-27T14:23:11.482Z",
      "closed_by": "text",
      "reopened_at": "2026-05-27T14:23:11.482Z",
      "reopened_by": "text",
      "reopened_reason": "text",
      "closed_conversation_ids": [
        "text"
      ],
      "messages_url": "text"
    }
  ],
  "has_more": true,
  "next_cursor": "text",
  "prev_cursor": "text"
}

Retrieve one contact's conversation.

get

The conversation state for a contact in this workroom: open or closed, assigned staff, and tags. There is one conversation per contact per workroom, so the ID here is the contact's ID. Messages are listConversationMessages.

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
contact_idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
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

OK

application/json

Contact-scoped conversation state. One conversation per contact per workroom. The id on the wire is the contact's prefixed id (con_<hex>). Persistent state lives in userdetails.conversations.

idstringOptional

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:[^/]+$
objectstring Β· enumOptionalPossible values:
contact_idstringOptional

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:[^/]+$
contact_namestring Β· nullableOptional
contact_emailstring Β· nullableOptional
contact_phonestring Β· nullableOptional
closedbooleanOptional
conversation_idstring Β· nullableOptional

Id of the current conversation record (the dashboard's userconversations row). Null right after a reopen. The next assign or tag change fills it in when it creates a new record; exactly like the dashboard inbox (v1 saveOpenConversationRecord), when an open record for the contact already exists it is updated in place and this stays null. A close always records the finished record's id in closed_conversation_ids. Do not treat it as a per-reopen counter.

tagsstring[]Optional

Titles of the inbox conversation tags on this conversation. Stored as conversation_tags ids, exactly as the dashboard inbox stores them; a stored value with no matching tag (a deleted tag) is returned as stored.

tag_idsstring[]Optional

The conversation_tags ids behind tags (24-hex, unprefixed), for values that resolve to a tag.

started_atstring Β· date-time Β· nullableOptional

Start of the CURRENT conversation instance, not necessarily the first-ever contact with this person - it resets to the reopen time whenever the conversation reopens (same instant as reopened_at on that event), matching conversation_id being cleared on reopen. History of prior instances is in closed_conversation_ids. Null on a small number of legacy conversations that predate this field being tracked.

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

Null whenever closed is false - a reopen clears this, it never carries over the previous close's date once the conversation is open again.

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

Null whenever closed is false, for the same reason as closed_at.

Pattern: ^usr_[0-9a-f]{24}$
reopened_atstring Β· date-timeOptional

Equals started_at at the moment of reopening - both are set to the same timestamp, since a reopen starts a new conversation instance. This is expected, not a data error.

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

Null when the dashboard auto-reopened the conversation on inbound/outbound activity rather than a staff member reopening it - see reopened_reason.

Pattern: ^usr_[0-9a-f]{24}$
reopened_reasonstring Β· nullableOptional

Set only on an auto-reopen (reopened_by is null): a free-form event label from the dashboard, e.g. "Email Received". Null when reopened_by is set, and null when the conversation was never reopened.

closed_conversation_idsstring[]Optional
messages_urlstring Β· nullableOptional

Relative URL to fetch the message union. Convenience field.

get/conversations/{contact_id}
GET /v3/conversations/{contact_id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "con_6a7eaec3505bea795709f897",
  "object": "conversation",
  "contact_id": "con_6a7eaec3505bea795709f897",
  "contact_name": "text",
  "contact_email": "text",
  "contact_phone": "text",
  "closed": true,
  "conversation_id": "text",
  "responsible_ids": [
    "text"
  ],
  "tags": [
    "text"
  ],
  "tag_ids": [
    "text"
  ],
  "started_at": "2026-05-27T14:23:11.482Z",
  "closed_at": "2026-05-27T14:23:11.482Z",
  "closed_by": "text",
  "reopened_at": "2026-05-27T14:23:11.482Z",
  "reopened_by": "text",
  "reopened_reason": "text",
  "closed_conversation_ids": [
    "text"
  ],
  "messages_url": "text"
}

Return the merged message thread for a contact.

get

Unions rows from 5 legacy collections (inboundtext, inboundemails, pushmessagessms, pushmessagesemail, phonecalls) filtered to this contact. Sorted most-recent first. This endpoint does NOT paginate via cursor β€” messages come from 5 sources; the union is bounded by limit. If you need more than 200, page by narrowing filter[channel] or filter[direction].

Instagram, Facebook Messenger, WhatsApp, and Gleanchat (web chat) are not supported. A conversation on one of those channels can appear in listConversations, but this endpoint has no source collection for them - it returns an empty or incomplete thread rather than an error. Only sms, email, and voice are covered.

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
contact_idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
Query parameters
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

OK

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/conversations/{contact_id}/messages
GET /v3/conversations/{contact_id}/messages HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "object": "text",
  "data": [
    {
      "id": "msg_6a7eaec3505bea795709f897",
      "object": "message",
      "channel": "sms",
      "direction": "inbound",
      "body": "text",
      "subject": "text",
      "from": "text",
      "to": "text",
      "status": "text",
      "sent_at": "2026-05-27T14:23:11.482Z",
      "received_at": "2026-05-27T14:23:11.482Z",
      "timestamp": "2026-05-27T14:23:11.482Z",
      "media_urls": [
        "https://example.com"
      ],
      "campaign_id": "cam_6a7eaec3505bea795709f897",
      "source": "text",
      "provider": "twilio",
      "provider_id": "text"
    }
  ],
  "has_more": true,
  "next_cursor": "text",
  "prev_cursor": "text"
}

Send an SMS or email as a reply from an operator.

post

Sends through the workroom's provider (Twilio, Telnyx or Edgility for SMS; SMTP/Mailgun/SendGrid for email) and records the send in the inbox the same way the dashboard does: the message row, the contact's inbox preview and sort time, and SMS credit usage. If the conversation is closed, it auto-reopens. If the workroom lacks provider credentials (SMS) or a default from_email (email), returns 422 with actionable detail. RingCentral is not supported. On accounts that bill SMS against prepaid credits, an SMS reply is refused with 422 insufficient_sms_credits when the balance is zero.

Gates, as the dashboard inbox: 422 compliance_block for an SMS reply to a contact who opted out of SMS, or β€” when the workroom's opt-in settings allow sending only to opted-in (or double-opted-in) contacts β€” to one who has not opted in (or not replied with an opt-in keyword); and for an email reply to a contact who unsubscribed from email. The SMS goes to the stored phone with a leading 0 dropped and the account's country code added.

Side effects beyond the message row, as the dashboard: the conversation is assigned to the sending staff member (added to responsible_ids) unless the workroom turned inbox auto-assign off; the reply's response_time (seconds since the contact's latest inbound message, first reply only) is recorded for inbox response-time reports; and the mobile app's silent-push row is queued. The dashboard's MINDBODY contact-log push is not made.

Only channel: "sms" or channel: "email" are accepted. Instagram, Facebook Messenger, WhatsApp, and Gleanchat (web chat) conversations cannot be replied to through this endpoint, even though they appear in listConversations - there is no social/chat send path wired into v3 today.

Sends to a real person the moment it is called. There is no recall. This is a single reply to the one contact on this conversation - not a segment or campaign 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.

Path parameters
contact_idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
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
channelstring Β· enumRequiredPossible values:
bodystringRequired

Message body. Plain text for SMS; HTML permitted for email.

subjectstringOptional

Email only. Defaults to "Message from Gleantap".

from_numberstringOptional

SMS only. Overrides the workroom default. Must match a number provisioned on THIS workroom under Twilio (appdetails.from[]), Telnyx (appdetails.telnyx.from or phone_numbers with type=telnyx), Edgility (appdetails.edgility.from), or RingCentral (ringcentralaccounts). Unknown numbers β†’ 422 validation_failed.

from_emailstringOptional

Email only. The sender address (one of the workroom's sender emails); its configured name and Reply-To apply. Default: the workroom from_email, else the primary account user, else default_email β€” as the dashboard inbox.

from_namestringOptional

Email only. Overrides the resolved sender name (sender email's name, else the workroom from_sender_name, else the workroom name).

dry_runbooleanOptional

SMS only. When true, resolves the provider + from-number but does NOT actually hit Twilio/Telnyx/Edgility/RingCentral. Logs a message row with dry_run=1 for auditability, but charges no SMS credits and leaves the conversation and inbox preview untouched.

Default: false
Responses
201

Sent + logged.

application/json

Unified message shape returned by GET /conversations/{contact_id}/messages. Sourced from 5 legacy collections (inboundtext, inboundemails, pushmessagessms, pushmessagesemail, phonecalls) and normalized on the wire. Not the same as the top-level Message schema returned by /messages β€” this one is the read-only union view.

idstring Β· nullableOptionalExample: msg_6a7eaec3505bea795709f897Pattern: ^msg_[0-9a-f]{24}$
objectstring Β· enumOptionalPossible values:
channelstring Β· enumOptionalPossible values:
directionstring Β· enumOptionalPossible values:
bodystring Β· nullableOptional

For voice, may contain call_notes if any.

subjectstring Β· nullableOptional

Email only.

fromstring Β· nullableOptional
tostring Β· nullableOptional
statusstring Β· nullableOptional

Outbound: provider status (queued/sent/delivered/failed). Inbound: received.

sent_atstring Β· date-timeOptional

RFC 3339 timestamp, always UTC, millisecond precision.

Example: 2026-05-27T14:23:11.482Z
received_atstring Β· date-timeOptional

RFC 3339 timestamp, always UTC, millisecond precision.

Example: 2026-05-27T14:23:11.482Z
timestampstring Β· date-timeOptional

Sort key. Whichever of sent_at/received_at applies.

Example: 2026-05-27T14:23:11.482Z
media_urlsstring Β· uri[]Optional
campaign_idstring Β· nullableOptional

Set if this message was sent by a campaign or flow (not a reply).

Example: cam_6a7eaec3505bea795709f897Pattern: ^cam_[0-9a-f]{24}$
sourcestringOptional

The underlying collection this row came from β€” for debugging / provenance.

providerstring Β· enum Β· nullableOptional

For outbound: which provider actually delivered this send. Populated on reply endpoints; may be null on older rows.

Possible values:
provider_idstring Β· nullableOptional

Provider-side message id (Twilio SID, Telnyx message id, Edgility campaign_id). dry_run_<hash> when dry_run was set.

post/conversations/{contact_id}/reply
POST /v3/conversations/{contact_id}/reply HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 124

{
  "channel": "sms",
  "body": "text",
  "subject": "text",
  "from_number": "text",
  "from_email": "text",
  "from_name": "text",
  "dry_run": false
}
{
  "id": "msg_6a7eaec3505bea795709f897",
  "object": "message",
  "channel": "sms",
  "direction": "inbound",
  "body": "text",
  "subject": "text",
  "from": "text",
  "to": "text",
  "status": "text",
  "sent_at": "2026-05-27T14:23:11.482Z",
  "received_at": "2026-05-27T14:23:11.482Z",
  "timestamp": "2026-05-27T14:23:11.482Z",
  "media_urls": [
    "https://example.com"
  ],
  "campaign_id": "cam_6a7eaec3505bea795709f897",
  "source": "text",
  "provider": "twilio",
  "provider_id": "text"
}

Add one or more responsible staff to a conversation. Pass `AI` to enable AI handling.

post
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
contact_idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
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
Responses
200

OK

application/json

Contact-scoped conversation state. One conversation per contact per workroom. The id on the wire is the contact's prefixed id (con_<hex>). Persistent state lives in userdetails.conversations.

idstringOptional

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:[^/]+$
objectstring Β· enumOptionalPossible values:
contact_idstringOptional

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:[^/]+$
contact_namestring Β· nullableOptional
contact_emailstring Β· nullableOptional
contact_phonestring Β· nullableOptional
closedbooleanOptional
conversation_idstring Β· nullableOptional

Id of the current conversation record (the dashboard's userconversations row). Null right after a reopen. The next assign or tag change fills it in when it creates a new record; exactly like the dashboard inbox (v1 saveOpenConversationRecord), when an open record for the contact already exists it is updated in place and this stays null. A close always records the finished record's id in closed_conversation_ids. Do not treat it as a per-reopen counter.

tagsstring[]Optional

Titles of the inbox conversation tags on this conversation. Stored as conversation_tags ids, exactly as the dashboard inbox stores them; a stored value with no matching tag (a deleted tag) is returned as stored.

tag_idsstring[]Optional

The conversation_tags ids behind tags (24-hex, unprefixed), for values that resolve to a tag.

started_atstring Β· date-time Β· nullableOptional

Start of the CURRENT conversation instance, not necessarily the first-ever contact with this person - it resets to the reopen time whenever the conversation reopens (same instant as reopened_at on that event), matching conversation_id being cleared on reopen. History of prior instances is in closed_conversation_ids. Null on a small number of legacy conversations that predate this field being tracked.

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

Null whenever closed is false - a reopen clears this, it never carries over the previous close's date once the conversation is open again.

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

Null whenever closed is false, for the same reason as closed_at.

Pattern: ^usr_[0-9a-f]{24}$
reopened_atstring Β· date-timeOptional

Equals started_at at the moment of reopening - both are set to the same timestamp, since a reopen starts a new conversation instance. This is expected, not a data error.

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

Null when the dashboard auto-reopened the conversation on inbound/outbound activity rather than a staff member reopening it - see reopened_reason.

Pattern: ^usr_[0-9a-f]{24}$
reopened_reasonstring Β· nullableOptional

Set only on an auto-reopen (reopened_by is null): a free-form event label from the dashboard, e.g. "Email Received". Null when reopened_by is set, and null when the conversation was never reopened.

closed_conversation_idsstring[]Optional
messages_urlstring Β· nullableOptional

Relative URL to fetch the message union. Convenience field.

post/conversations/{contact_id}/assign
POST /v3/conversations/{contact_id}/assign HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 28

{
  "responsible_ids": [
    "text"
  ]
}
200

OK

{
  "id": "con_6a7eaec3505bea795709f897",
  "object": "conversation",
  "contact_id": "con_6a7eaec3505bea795709f897",
  "contact_name": "text",
  "contact_email": "text",
  "contact_phone": "text",
  "closed": true,
  "conversation_id": "text",
  "responsible_ids": [
    "text"
  ],
  "tags": [
    "text"
  ],
  "tag_ids": [
    "text"
  ],
  "started_at": "2026-05-27T14:23:11.482Z",
  "closed_at": "2026-05-27T14:23:11.482Z",
  "closed_by": "text",
  "reopened_at": "2026-05-27T14:23:11.482Z",
  "reopened_by": "text",
  "reopened_reason": "text",
  "closed_conversation_ids": [
    "text"
  ],
  "messages_url": "text"
}

Remove one or more responsible staff from a conversation. Removing the last one returns it to the inbox's Unassigned view.

post
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
contact_idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
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
Responses
200

OK

application/json

Contact-scoped conversation state. One conversation per contact per workroom. The id on the wire is the contact's prefixed id (con_<hex>). Persistent state lives in userdetails.conversations.

idstringOptional

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:[^/]+$
objectstring Β· enumOptionalPossible values:
contact_idstringOptional

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:[^/]+$
contact_namestring Β· nullableOptional
contact_emailstring Β· nullableOptional
contact_phonestring Β· nullableOptional
closedbooleanOptional
conversation_idstring Β· nullableOptional

Id of the current conversation record (the dashboard's userconversations row). Null right after a reopen. The next assign or tag change fills it in when it creates a new record; exactly like the dashboard inbox (v1 saveOpenConversationRecord), when an open record for the contact already exists it is updated in place and this stays null. A close always records the finished record's id in closed_conversation_ids. Do not treat it as a per-reopen counter.

tagsstring[]Optional

Titles of the inbox conversation tags on this conversation. Stored as conversation_tags ids, exactly as the dashboard inbox stores them; a stored value with no matching tag (a deleted tag) is returned as stored.

tag_idsstring[]Optional

The conversation_tags ids behind tags (24-hex, unprefixed), for values that resolve to a tag.

started_atstring Β· date-time Β· nullableOptional

Start of the CURRENT conversation instance, not necessarily the first-ever contact with this person - it resets to the reopen time whenever the conversation reopens (same instant as reopened_at on that event), matching conversation_id being cleared on reopen. History of prior instances is in closed_conversation_ids. Null on a small number of legacy conversations that predate this field being tracked.

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

Null whenever closed is false - a reopen clears this, it never carries over the previous close's date once the conversation is open again.

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

Null whenever closed is false, for the same reason as closed_at.

Pattern: ^usr_[0-9a-f]{24}$
reopened_atstring Β· date-timeOptional

Equals started_at at the moment of reopening - both are set to the same timestamp, since a reopen starts a new conversation instance. This is expected, not a data error.

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

Null when the dashboard auto-reopened the conversation on inbound/outbound activity rather than a staff member reopening it - see reopened_reason.

Pattern: ^usr_[0-9a-f]{24}$
reopened_reasonstring Β· nullableOptional

Set only on an auto-reopen (reopened_by is null): a free-form event label from the dashboard, e.g. "Email Received". Null when reopened_by is set, and null when the conversation was never reopened.

closed_conversation_idsstring[]Optional
messages_urlstring Β· nullableOptional

Relative URL to fetch the message union. Convenience field.

post/conversations/{contact_id}/unassign
POST /v3/conversations/{contact_id}/unassign HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 28

{
  "responsible_ids": [
    "text"
  ]
}
200

OK

{
  "id": "con_6a7eaec3505bea795709f897",
  "object": "conversation",
  "contact_id": "con_6a7eaec3505bea795709f897",
  "contact_name": "text",
  "contact_email": "text",
  "contact_phone": "text",
  "closed": true,
  "conversation_id": "text",
  "responsible_ids": [
    "text"
  ],
  "tags": [
    "text"
  ],
  "tag_ids": [
    "text"
  ],
  "started_at": "2026-05-27T14:23:11.482Z",
  "closed_at": "2026-05-27T14:23:11.482Z",
  "closed_by": "text",
  "reopened_at": "2026-05-27T14:23:11.482Z",
  "reopened_by": "text",
  "reopened_reason": "text",
  "closed_conversation_ids": [
    "text"
  ],
  "messages_url": "text"
}

Mark a conversation closed. Body can pass `closed_by` (staff id).

post
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
contact_idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
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
closed_bystringOptional

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
200

OK

application/json

Contact-scoped conversation state. One conversation per contact per workroom. The id on the wire is the contact's prefixed id (con_<hex>). Persistent state lives in userdetails.conversations.

idstringOptional

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:[^/]+$
objectstring Β· enumOptionalPossible values:
contact_idstringOptional

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:[^/]+$
contact_namestring Β· nullableOptional
contact_emailstring Β· nullableOptional
contact_phonestring Β· nullableOptional
closedbooleanOptional
conversation_idstring Β· nullableOptional

Id of the current conversation record (the dashboard's userconversations row). Null right after a reopen. The next assign or tag change fills it in when it creates a new record; exactly like the dashboard inbox (v1 saveOpenConversationRecord), when an open record for the contact already exists it is updated in place and this stays null. A close always records the finished record's id in closed_conversation_ids. Do not treat it as a per-reopen counter.

tagsstring[]Optional

Titles of the inbox conversation tags on this conversation. Stored as conversation_tags ids, exactly as the dashboard inbox stores them; a stored value with no matching tag (a deleted tag) is returned as stored.

tag_idsstring[]Optional

The conversation_tags ids behind tags (24-hex, unprefixed), for values that resolve to a tag.

started_atstring Β· date-time Β· nullableOptional

Start of the CURRENT conversation instance, not necessarily the first-ever contact with this person - it resets to the reopen time whenever the conversation reopens (same instant as reopened_at on that event), matching conversation_id being cleared on reopen. History of prior instances is in closed_conversation_ids. Null on a small number of legacy conversations that predate this field being tracked.

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

Null whenever closed is false - a reopen clears this, it never carries over the previous close's date once the conversation is open again.

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

Null whenever closed is false, for the same reason as closed_at.

Pattern: ^usr_[0-9a-f]{24}$
reopened_atstring Β· date-timeOptional

Equals started_at at the moment of reopening - both are set to the same timestamp, since a reopen starts a new conversation instance. This is expected, not a data error.

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

Null when the dashboard auto-reopened the conversation on inbound/outbound activity rather than a staff member reopening it - see reopened_reason.

Pattern: ^usr_[0-9a-f]{24}$
reopened_reasonstring Β· nullableOptional

Set only on an auto-reopen (reopened_by is null): a free-form event label from the dashboard, e.g. "Email Received". Null when reopened_by is set, and null when the conversation was never reopened.

closed_conversation_idsstring[]Optional
messages_urlstring Β· nullableOptional

Relative URL to fetch the message union. Convenience field.

post/conversations/{contact_id}/close
POST /v3/conversations/{contact_id}/close HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 20

{
  "closed_by": "text"
}
200

OK

{
  "id": "con_6a7eaec3505bea795709f897",
  "object": "conversation",
  "contact_id": "con_6a7eaec3505bea795709f897",
  "contact_name": "text",
  "contact_email": "text",
  "contact_phone": "text",
  "closed": true,
  "conversation_id": "text",
  "responsible_ids": [
    "text"
  ],
  "tags": [
    "text"
  ],
  "tag_ids": [
    "text"
  ],
  "started_at": "2026-05-27T14:23:11.482Z",
  "closed_at": "2026-05-27T14:23:11.482Z",
  "closed_by": "text",
  "reopened_at": "2026-05-27T14:23:11.482Z",
  "reopened_by": "text",
  "reopened_reason": "text",
  "closed_conversation_ids": [
    "text"
  ],
  "messages_url": "text"
}

Reopen a closed conversation. Clears `conversation_id` until the next assign, tag change, or close.

post
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
contact_idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
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
reopened_bystringOptional

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
200

OK

application/json

Contact-scoped conversation state. One conversation per contact per workroom. The id on the wire is the contact's prefixed id (con_<hex>). Persistent state lives in userdetails.conversations.

idstringOptional

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:[^/]+$
objectstring Β· enumOptionalPossible values:
contact_idstringOptional

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:[^/]+$
contact_namestring Β· nullableOptional
contact_emailstring Β· nullableOptional
contact_phonestring Β· nullableOptional
closedbooleanOptional
conversation_idstring Β· nullableOptional

Id of the current conversation record (the dashboard's userconversations row). Null right after a reopen. The next assign or tag change fills it in when it creates a new record; exactly like the dashboard inbox (v1 saveOpenConversationRecord), when an open record for the contact already exists it is updated in place and this stays null. A close always records the finished record's id in closed_conversation_ids. Do not treat it as a per-reopen counter.

tagsstring[]Optional

Titles of the inbox conversation tags on this conversation. Stored as conversation_tags ids, exactly as the dashboard inbox stores them; a stored value with no matching tag (a deleted tag) is returned as stored.

tag_idsstring[]Optional

The conversation_tags ids behind tags (24-hex, unprefixed), for values that resolve to a tag.

started_atstring Β· date-time Β· nullableOptional

Start of the CURRENT conversation instance, not necessarily the first-ever contact with this person - it resets to the reopen time whenever the conversation reopens (same instant as reopened_at on that event), matching conversation_id being cleared on reopen. History of prior instances is in closed_conversation_ids. Null on a small number of legacy conversations that predate this field being tracked.

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

Null whenever closed is false - a reopen clears this, it never carries over the previous close's date once the conversation is open again.

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

Null whenever closed is false, for the same reason as closed_at.

Pattern: ^usr_[0-9a-f]{24}$
reopened_atstring Β· date-timeOptional

Equals started_at at the moment of reopening - both are set to the same timestamp, since a reopen starts a new conversation instance. This is expected, not a data error.

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

Null when the dashboard auto-reopened the conversation on inbound/outbound activity rather than a staff member reopening it - see reopened_reason.

Pattern: ^usr_[0-9a-f]{24}$
reopened_reasonstring Β· nullableOptional

Set only on an auto-reopen (reopened_by is null): a free-form event label from the dashboard, e.g. "Email Received". Null when reopened_by is set, and null when the conversation was never reopened.

closed_conversation_idsstring[]Optional
messages_urlstring Β· nullableOptional

Relative URL to fetch the message union. Convenience field.

post/conversations/{contact_id}/reopen
POST /v3/conversations/{contact_id}/reopen HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 22

{
  "reopened_by": "text"
}
200

OK

{
  "id": "con_6a7eaec3505bea795709f897",
  "object": "conversation",
  "contact_id": "con_6a7eaec3505bea795709f897",
  "contact_name": "text",
  "contact_email": "text",
  "contact_phone": "text",
  "closed": true,
  "conversation_id": "text",
  "responsible_ids": [
    "text"
  ],
  "tags": [
    "text"
  ],
  "tag_ids": [
    "text"
  ],
  "started_at": "2026-05-27T14:23:11.482Z",
  "closed_at": "2026-05-27T14:23:11.482Z",
  "closed_by": "text",
  "reopened_at": "2026-05-27T14:23:11.482Z",
  "reopened_by": "text",
  "reopened_reason": "text",
  "closed_conversation_ids": [
    "text"
  ],
  "messages_url": "text"
}

Replace the conversation's tag list (full-replace, not merge).

put
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
contact_idstringRequired

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

Example: con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$
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
tagsstring[]Required

Inbox conversation tags by title (case-insensitive) or conversation_tags id. Each must already exist in the contact's workroom (create it in the inbox) β€” an unknown one is rejected with 422 unknown_tag. Stored as ids, as the dashboard inbox does.

Responses
200

OK

application/json

Contact-scoped conversation state. One conversation per contact per workroom. The id on the wire is the contact's prefixed id (con_<hex>). Persistent state lives in userdetails.conversations.

idstringOptional

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:[^/]+$
objectstring Β· enumOptionalPossible values:
contact_idstringOptional

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:[^/]+$
contact_namestring Β· nullableOptional
contact_emailstring Β· nullableOptional
contact_phonestring Β· nullableOptional
closedbooleanOptional
conversation_idstring Β· nullableOptional

Id of the current conversation record (the dashboard's userconversations row). Null right after a reopen. The next assign or tag change fills it in when it creates a new record; exactly like the dashboard inbox (v1 saveOpenConversationRecord), when an open record for the contact already exists it is updated in place and this stays null. A close always records the finished record's id in closed_conversation_ids. Do not treat it as a per-reopen counter.

tagsstring[]Optional

Titles of the inbox conversation tags on this conversation. Stored as conversation_tags ids, exactly as the dashboard inbox stores them; a stored value with no matching tag (a deleted tag) is returned as stored.

tag_idsstring[]Optional

The conversation_tags ids behind tags (24-hex, unprefixed), for values that resolve to a tag.

started_atstring Β· date-time Β· nullableOptional

Start of the CURRENT conversation instance, not necessarily the first-ever contact with this person - it resets to the reopen time whenever the conversation reopens (same instant as reopened_at on that event), matching conversation_id being cleared on reopen. History of prior instances is in closed_conversation_ids. Null on a small number of legacy conversations that predate this field being tracked.

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

Null whenever closed is false - a reopen clears this, it never carries over the previous close's date once the conversation is open again.

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

Null whenever closed is false, for the same reason as closed_at.

Pattern: ^usr_[0-9a-f]{24}$
reopened_atstring Β· date-timeOptional

Equals started_at at the moment of reopening - both are set to the same timestamp, since a reopen starts a new conversation instance. This is expected, not a data error.

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

Null when the dashboard auto-reopened the conversation on inbound/outbound activity rather than a staff member reopening it - see reopened_reason.

Pattern: ^usr_[0-9a-f]{24}$
reopened_reasonstring Β· nullableOptional

Set only on an auto-reopen (reopened_by is null): a free-form event label from the dashboard, e.g. "Email Received". Null when reopened_by is set, and null when the conversation was never reopened.

closed_conversation_idsstring[]Optional
messages_urlstring Β· nullableOptional

Relative URL to fetch the message union. Convenience field.

put/conversations/{contact_id}/tags
PUT /v3/conversations/{contact_id}/tags HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 17

{
  "tags": [
    "text"
  ]
}
{
  "id": "con_6a7eaec3505bea795709f897",
  "object": "conversation",
  "contact_id": "con_6a7eaec3505bea795709f897",
  "contact_name": "text",
  "contact_email": "text",
  "contact_phone": "text",
  "closed": true,
  "conversation_id": "text",
  "responsible_ids": [
    "text"
  ],
  "tags": [
    "text"
  ],
  "tag_ids": [
    "text"
  ],
  "started_at": "2026-05-27T14:23:11.482Z",
  "closed_at": "2026-05-27T14:23:11.482Z",
  "closed_by": "text",
  "reopened_at": "2026-05-27T14:23:11.482Z",
  "reopened_by": "text",
  "reopened_reason": "text",
  "closed_conversation_ids": [
    "text"
  ],
  "messages_url": "text"
}