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

Notifications

Transactional send endpoints for SMS, email, and voice. One recipient per call. For opt-in-driven marketing use Campaigns; for multi-step sequences use Flows.

Send an SMS to one recipient.

post

Transactional SMS. Provide either template_id or inline body. For opt-in-driven marketing use POST /v3/campaigns; for multi-step sequences use POST /v3/flows. Idempotency-Key is required β€” without it, a retry sends a duplicate. Returns 422 compliance_block when the contact has opted out of SMS (any category β€” category: transactional does not bypass it), when the workroom's opt-in setting (allow sending to opted-in / double-opted-in only) excludes the contact, or for a marketing send to an invalid_phone number; 422 insufficient_sms_credits when the account bills SMS against prepaid credits and has none left; 422 empty_content when a template renders to nothing. The recipient number is formatted with the account's country code before sending. Once delivered the row carries the same fields as a dashboard inbox send (provider flag, messagesid, credit usage) and the contact's inbox preview is updated. Rate limit bucket: messaging (100 req/min).

Sends to a real person the moment it is called. There is no recall. This goes to the one recipient specified here - not a segment or campaign audience.

Where this lands. The message is written to the shared messages collection as status: "pending", in that collection's own schema, carrying one extra attribute β€” v3_api β€” naming the operation that created it (sendSMS/sendEmail/sendVoice). A delivery worker claims on { v3_api: { $exists: true }, status: "pending" } and sets status plus sent_on when done. source deliberately keeps the collection's existing vocabulary (single_chat_sms/single_chat_email) so the send still appears in the inbox and is counted by SMS-credit billing.

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

Send one SMS. Either template_id or body is required β€” not both. If neither is given, 400 missing_content. Include Idempotency-Key to avoid duplicate sends on retry.

template_idstringOptional

Reference an SMS template. Mutually exclusive with body.

Example: tpl_6ab24872ba90b88e270b4904Pattern: ^tpl_[0-9a-f]{24}$
bodystring Β· max: 1600Optional

Inline message body. Mutually exclusive with template_id.

fromstringOptional

The account's outbound phone number to send from. Omit to use the account default.

Example: pn_69e8619adeda61511130cf24Pattern: ^pn_[0-9a-f]{24}$
media_urlstring Β· uri[] Β· max: 10Optional

MMS media URLs (public http(s), fetched by the carrier) β€” sent as MMS through Twilio, Telnyx and Edgility the way the dashboard does; uses 2 extra SMS credits. An invalid URL returns 400. RingCentral workrooms cannot send MMS from v3.

categorystring Β· enumOptional

Does NOT bypass opt-out. As in the dashboard's one-to-one sends, a contact who has opted out of SMS (STOP / optin_sms: 0) gets no SMS and a contact who has unsubscribed from email (optout_email: 1) gets no email, whatever the category β€” both return 422 compliance_block (opted_out_all likewise blocks every channel). marketing additionally suppresses addresses the dashboard's campaign audience excludes: invalid_email 2/3/4 (bounced, complained, inactive) and invalid_phone: 1, returning 422 compliance_block; marketing email also carries the workroom's unsubscribe/address footers. Voice opt-out (optout_voice) still blocks marketing only. Earlier versions let transactional (the default) bypass channel opt-out; that bypass is gone.

Default: transactionalPossible values:
Responses
201

Send accepted. Returns the created message.

application/json

A single message record β€” the outcome of a notification send, an outbound message from a campaign or flow, or a message inside a conversation. Same shape regardless of origin.

idstringRequiredExample: msg_6a7eaec3505bea795709f897Pattern: ^msg_[0-9a-f]{24}$
objectconst: messageRequired
channelstring Β· enumRequired

Delivery channel. Push is not supported by Gleantap.

Possible values:
statusstring Β· enumRequired

A v3 send lands in the shared messages collection as pending β€” that collection's own queued state β€” and a delivery worker moves it to success or failed.

Campaign-pipeline sends use the richer lifecycle: queued β†’ sending β†’ sent β†’ delivered (or bounced/failed/undelivered). opened / clicked follow delivered for email and for SMS with tracked links. Terminal states: success, delivered, opened, clicked, failed, bounced, undelivered. Not every channel produces all of them.

Possible values:
categorystring Β· enumRequired

Does NOT bypass opt-out. As in the dashboard's one-to-one sends, a contact who has opted out of SMS (STOP / optin_sms: 0) gets no SMS and a contact who has unsubscribed from email (optout_email: 1) gets no email, whatever the category β€” both return 422 compliance_block (opted_out_all likewise blocks every channel). marketing additionally suppresses addresses the dashboard's campaign audience excludes: invalid_email 2/3/4 (bounced, complained, inactive) and invalid_phone: 1, returning 422 compliance_block; marketing email also carries the workroom's unsubscribe/address footers. Voice opt-out (optout_voice) still blocks marketing only. Earlier versions let transactional (the default) bypass channel opt-out; that bypass is gone.

Possible values:
directionstring Β· enumOptionalPossible values:
conversation_idstring Β· nullableOptional

If this message is part of a conversation, its ID. Transactional sends default to null.

template_idstring Β· nullableOptionalExample: tpl_6ab24872ba90b88e270b4904Pattern: ^tpl_[0-9a-f]{24}$
template_versioninteger Β· nullableOptional

Which version of the template was rendered.

subjectstring Β· nullableOptional

Email only.

body_snippetstring Β· nullableOptional

First ~200 chars of the rendered body, for previews.

providerstring Β· nullableOptional

Underlying delivery provider (twilio, telnyx, mailgun, etc.). Informational.

provider_message_idstring Β· nullableOptional
sent_atstring Β· date-time Β· nullableOptional

RFC 3339 timestamp, always UTC, millisecond precision.

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

RFC 3339 timestamp, always UTC, millisecond precision.

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

RFC 3339 timestamp, always UTC, millisecond precision.

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

RFC 3339 timestamp, always UTC, millisecond precision.

Example: 2026-05-27T14:23:11.482Z
failed_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-timeOptional

RFC 3339 timestamp, always UTC, millisecond precision.

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

{
  "to": {
    "contact_id": "con_6a7eaec3505bea795709f897"
  },
  "template_id": "tpl_booking_confirm",
  "variables": {
    "booking_time": "Saturday 6pm",
    "class_name": "Vinyasa Flow"
  }
}
{
  "id": "msg_6a7eaec3505bea795709f897",
  "object": "text",
  "channel": "sms",
  "status": "pending",
  "category": "transactional",
  "direction": "outbound",
  "conversation_id": "text",
  "to": {
    "contact_id": "con_6a7eaec3505bea795709f897",
    "phone": "+15558675309",
    "email": "[email protected]"
  },
  "from": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "template_id": "tpl_6ab24872ba90b88e270b4904",
  "template_version": 1,
  "subject": "text",
  "body_snippet": "text",
  "variables": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "provider": "text",
  "provider_message_id": "text",
  "error": {
    "code": "text",
    "message": "text"
  },
  "cost": {
    "amount": 1,
    "currency": "text"
  },
  "sent_at": "2026-05-27T14:23:11.482Z",
  "delivered_at": "2026-05-27T14:23:11.482Z",
  "opened_at": "2026-05-27T14:23:11.482Z",
  "clicked_at": "2026-05-27T14:23:11.482Z",
  "failed_at": "2026-05-27T14:23:11.482Z",
  "created_at": "2026-05-27T14:23:11.482Z",
  "updated_at": "2026-05-27T14:23:11.482Z"
}

Send an email to one recipient.

post

Transactional email. Provide either template_id or inline subject + body_html/body_text (with a template, an optional subject sets the subject line β€” templates carry none). Attachments are not supported (a request with attachments is rejected 422). Returns 422 compliance_block when the contact has unsubscribed from email (any category) or, for category: marketing, when the address is suppressed (invalid_email 2/3/4); 422 empty_content when the content renders to nothing. Marketing-category sends (and template/campaign test sends) get the workroom's unsubscribe and address footers, as the dashboard adds them; one-to-one transactional sends do not. The stored messages row follows the dashboard's layout: email is the sender, to the recipient. For marketing broadcasts use POST /v3/campaigns. Idempotency-Key is required. Rate limit bucket: messaging.

Sends to a real person the moment it is called. There is no recall. This goes to the one recipient specified here - not a segment or campaign audience.

Where this lands. The message is written to the shared messages collection as status: "pending", in that collection's own schema, carrying one extra attribute β€” v3_api β€” naming the operation that created it (sendSMS/sendEmail/sendVoice). A delivery worker claims on { v3_api: { $exists: true }, status: "pending" } and sets status plus sent_on when done. source deliberately keeps the collection's existing vocabulary (single_chat_sms/single_chat_email) so the send still appears in the inbox and is counted by SMS-credit billing.

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

Send one email. Either template_id or (subject + one of body_html/body_text) is required. Attachments are not supported: the send path cannot attach files, so a request carrying attachments is rejected with 422. Link to the file from the body instead.

template_idstringOptional

Reference an email template. Mutually exclusive with inline subject/body_html/body_text.

Example: tpl_6ab24872ba90b88e270b4904Pattern: ^tpl_[0-9a-f]{24}$
subjectstring Β· max: 500Optional
body_htmlstringOptional

HTML body. At least one of body_html or body_text required if not using a template.

body_textstringOptional

Plain-text body. Used (sent as a text/plain email) only when body_html is absent; with body_html present the HTML is sent.

reply_tostring Β· emailOptional

Overrides the Reply-To. Without it the dashboard's rule applies (the sender's own reply-to, else the workroom reply_to_email / default_email).

Example: [email protected]
ccstring Β· email[] Β· max: 10Optional

Delivered alongside the workroom's inbox auto-cc (cc_inbox_email_to); stored as user_cc.

bccstring Β· email[] Β· max: 10Optional

Delivered alongside the workroom's inbox auto-bcc (forward_inbox_email_copy); stored as user_bcc.

attachmentsarrayOptionalDeprecated

Not supported β€” any non-empty value is rejected with 422 send_failed. (Previously accepted and silently dropped: the email went out without the files.)

categorystring Β· enumOptional

Does NOT bypass opt-out. As in the dashboard's one-to-one sends, a contact who has opted out of SMS (STOP / optin_sms: 0) gets no SMS and a contact who has unsubscribed from email (optout_email: 1) gets no email, whatever the category β€” both return 422 compliance_block (opted_out_all likewise blocks every channel). marketing additionally suppresses addresses the dashboard's campaign audience excludes: invalid_email 2/3/4 (bounced, complained, inactive) and invalid_phone: 1, returning 422 compliance_block; marketing email also carries the workroom's unsubscribe/address footers. Voice opt-out (optout_voice) still blocks marketing only. Earlier versions let transactional (the default) bypass channel opt-out; that bypass is gone.

Default: transactionalPossible values:
Responses
201

Send accepted. Returns the created message.

application/json

A single message record β€” the outcome of a notification send, an outbound message from a campaign or flow, or a message inside a conversation. Same shape regardless of origin.

idstringRequiredExample: msg_6a7eaec3505bea795709f897Pattern: ^msg_[0-9a-f]{24}$
objectconst: messageRequired
channelstring Β· enumRequired

Delivery channel. Push is not supported by Gleantap.

Possible values:
statusstring Β· enumRequired

A v3 send lands in the shared messages collection as pending β€” that collection's own queued state β€” and a delivery worker moves it to success or failed.

Campaign-pipeline sends use the richer lifecycle: queued β†’ sending β†’ sent β†’ delivered (or bounced/failed/undelivered). opened / clicked follow delivered for email and for SMS with tracked links. Terminal states: success, delivered, opened, clicked, failed, bounced, undelivered. Not every channel produces all of them.

Possible values:
categorystring Β· enumRequired

Does NOT bypass opt-out. As in the dashboard's one-to-one sends, a contact who has opted out of SMS (STOP / optin_sms: 0) gets no SMS and a contact who has unsubscribed from email (optout_email: 1) gets no email, whatever the category β€” both return 422 compliance_block (opted_out_all likewise blocks every channel). marketing additionally suppresses addresses the dashboard's campaign audience excludes: invalid_email 2/3/4 (bounced, complained, inactive) and invalid_phone: 1, returning 422 compliance_block; marketing email also carries the workroom's unsubscribe/address footers. Voice opt-out (optout_voice) still blocks marketing only. Earlier versions let transactional (the default) bypass channel opt-out; that bypass is gone.

Possible values:
directionstring Β· enumOptionalPossible values:
conversation_idstring Β· nullableOptional

If this message is part of a conversation, its ID. Transactional sends default to null.

template_idstring Β· nullableOptionalExample: tpl_6ab24872ba90b88e270b4904Pattern: ^tpl_[0-9a-f]{24}$
template_versioninteger Β· nullableOptional

Which version of the template was rendered.

subjectstring Β· nullableOptional

Email only.

body_snippetstring Β· nullableOptional

First ~200 chars of the rendered body, for previews.

providerstring Β· nullableOptional

Underlying delivery provider (twilio, telnyx, mailgun, etc.). Informational.

provider_message_idstring Β· nullableOptional
sent_atstring Β· date-time Β· nullableOptional

RFC 3339 timestamp, always UTC, millisecond precision.

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

RFC 3339 timestamp, always UTC, millisecond precision.

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

RFC 3339 timestamp, always UTC, millisecond precision.

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

RFC 3339 timestamp, always UTC, millisecond precision.

Example: 2026-05-27T14:23:11.482Z
failed_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-timeOptional

RFC 3339 timestamp, always UTC, millisecond precision.

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

{
  "to": {
    "email": "[email protected]"
  },
  "template_id": "tpl_password_reset",
  "variables": {
    "reset_url": "https://app.example.com/reset?t=abc123",
    "expires_in_minutes": 30
  }
}
{
  "id": "msg_6a7eaec3505bea795709f897",
  "object": "text",
  "channel": "sms",
  "status": "pending",
  "category": "transactional",
  "direction": "outbound",
  "conversation_id": "text",
  "to": {
    "contact_id": "con_6a7eaec3505bea795709f897",
    "phone": "+15558675309",
    "email": "[email protected]"
  },
  "from": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "template_id": "tpl_6ab24872ba90b88e270b4904",
  "template_version": 1,
  "subject": "text",
  "body_snippet": "text",
  "variables": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "provider": "text",
  "provider_message_id": "text",
  "error": {
    "code": "text",
    "message": "text"
  },
  "cost": {
    "amount": 1,
    "currency": "text"
  },
  "sent_at": "2026-05-27T14:23:11.482Z",
  "delivered_at": "2026-05-27T14:23:11.482Z",
  "opened_at": "2026-05-27T14:23:11.482Z",
  "clicked_at": "2026-05-27T14:23:11.482Z",
  "failed_at": "2026-05-27T14:23:11.482Z",
  "created_at": "2026-05-27T14:23:11.482Z",
  "updated_at": "2026-05-27T14:23:11.482Z"
}

Place an outbound voice call.

post

TTS voice call. Provide either template_id (voice template with script + voice_id) or inline script + voice_id. Set machine_detection: true to hang up on voicemail (adds ~1s latency). Recording URLs surface on the resulting Message when record: true. Rate limit bucket: messaging.

Sends to a real person the moment it is called. There is no recall. This goes to the one recipient specified here - not a segment or campaign audience.

Where this lands. The message is written to the shared messages collection as status: "pending", in that collection's own schema, carrying one extra attribute β€” v3_api β€” naming the operation that created it (sendSMS/sendEmail/sendVoice). A delivery worker claims on { v3_api: { $exists: true }, status: "pending" } and sets status plus sent_on when done. source deliberately keeps the collection's existing vocabulary (single_chat_sms/single_chat_email) so the send still appears in the inbox and is counted by SMS-credit billing.

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

Place one outbound voice call. Either template_id (voice template with script + voice_id) or inline script is required. Set machine_detection: true to only deliver if a human answers.

template_idstringOptional

Reference a voice template. Mutually exclusive with inline script.

Example: tpl_6ab24872ba90b88e270b4904Pattern: ^tpl_[0-9a-f]{24}$
scriptstringOptional

TTS script to speak. Mutually exclusive with template_id.

voice_idstringOptional

Voice identifier (provider-specific, e.g., aura-asteria-en). Required when script is inline.

fromstringOptional

Caller ID for the outbound call.

Example: pn_69e8619adeda61511130cf24Pattern: ^pn_[0-9a-f]{24}$
machine_detectionbooleanOptional

If true, hang up when an answering machine or voicemail is detected. Adds ~1s of latency to detect.

Default: false
recordbooleanOptional

Record the call. Retention per account setting. Recording URL surfaced on the resulting Message when available.

Default: false
categorystring Β· enumOptional

Does NOT bypass opt-out. As in the dashboard's one-to-one sends, a contact who has opted out of SMS (STOP / optin_sms: 0) gets no SMS and a contact who has unsubscribed from email (optout_email: 1) gets no email, whatever the category β€” both return 422 compliance_block (opted_out_all likewise blocks every channel). marketing additionally suppresses addresses the dashboard's campaign audience excludes: invalid_email 2/3/4 (bounced, complained, inactive) and invalid_phone: 1, returning 422 compliance_block; marketing email also carries the workroom's unsubscribe/address footers. Voice opt-out (optout_voice) still blocks marketing only. Earlier versions let transactional (the default) bypass channel opt-out; that bypass is gone.

Default: transactionalPossible values:
Responses
201

Call queued. Returns the created message.

application/json

A single message record β€” the outcome of a notification send, an outbound message from a campaign or flow, or a message inside a conversation. Same shape regardless of origin.

idstringRequiredExample: msg_6a7eaec3505bea795709f897Pattern: ^msg_[0-9a-f]{24}$
objectconst: messageRequired
channelstring Β· enumRequired

Delivery channel. Push is not supported by Gleantap.

Possible values:
statusstring Β· enumRequired

A v3 send lands in the shared messages collection as pending β€” that collection's own queued state β€” and a delivery worker moves it to success or failed.

Campaign-pipeline sends use the richer lifecycle: queued β†’ sending β†’ sent β†’ delivered (or bounced/failed/undelivered). opened / clicked follow delivered for email and for SMS with tracked links. Terminal states: success, delivered, opened, clicked, failed, bounced, undelivered. Not every channel produces all of them.

Possible values:
categorystring Β· enumRequired

Does NOT bypass opt-out. As in the dashboard's one-to-one sends, a contact who has opted out of SMS (STOP / optin_sms: 0) gets no SMS and a contact who has unsubscribed from email (optout_email: 1) gets no email, whatever the category β€” both return 422 compliance_block (opted_out_all likewise blocks every channel). marketing additionally suppresses addresses the dashboard's campaign audience excludes: invalid_email 2/3/4 (bounced, complained, inactive) and invalid_phone: 1, returning 422 compliance_block; marketing email also carries the workroom's unsubscribe/address footers. Voice opt-out (optout_voice) still blocks marketing only. Earlier versions let transactional (the default) bypass channel opt-out; that bypass is gone.

Possible values:
directionstring Β· enumOptionalPossible values:
conversation_idstring Β· nullableOptional

If this message is part of a conversation, its ID. Transactional sends default to null.

template_idstring Β· nullableOptionalExample: tpl_6ab24872ba90b88e270b4904Pattern: ^tpl_[0-9a-f]{24}$
template_versioninteger Β· nullableOptional

Which version of the template was rendered.

subjectstring Β· nullableOptional

Email only.

body_snippetstring Β· nullableOptional

First ~200 chars of the rendered body, for previews.

providerstring Β· nullableOptional

Underlying delivery provider (twilio, telnyx, mailgun, etc.). Informational.

provider_message_idstring Β· nullableOptional
sent_atstring Β· date-time Β· nullableOptional

RFC 3339 timestamp, always UTC, millisecond precision.

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

RFC 3339 timestamp, always UTC, millisecond precision.

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

RFC 3339 timestamp, always UTC, millisecond precision.

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

RFC 3339 timestamp, always UTC, millisecond precision.

Example: 2026-05-27T14:23:11.482Z
failed_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-timeOptional

RFC 3339 timestamp, always UTC, millisecond precision.

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

{
  "to": {
    "contact_id": "con_6a7eaec3505bea795709f897"
  },
  "template_id": "tpl_appt_reminder_voice",
  "variables": {
    "appointment_time": "10am Saturday",
    "trainer_name": "Priya"
  },
  "machine_detection": true
}
{
  "id": "msg_6a7eaec3505bea795709f897",
  "object": "text",
  "channel": "sms",
  "status": "pending",
  "category": "transactional",
  "direction": "outbound",
  "conversation_id": "text",
  "to": {
    "contact_id": "con_6a7eaec3505bea795709f897",
    "phone": "+15558675309",
    "email": "[email protected]"
  },
  "from": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "template_id": "tpl_6ab24872ba90b88e270b4904",
  "template_version": 1,
  "subject": "text",
  "body_snippet": "text",
  "variables": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "provider": "text",
  "provider_message_id": "text",
  "error": {
    "code": "text",
    "message": "text"
  },
  "cost": {
    "amount": 1,
    "currency": "text"
  },
  "sent_at": "2026-05-27T14:23:11.482Z",
  "delivered_at": "2026-05-27T14:23:11.482Z",
  "opened_at": "2026-05-27T14:23:11.482Z",
  "clicked_at": "2026-05-27T14:23:11.482Z",
  "failed_at": "2026-05-27T14:23:11.482Z",
  "created_at": "2026-05-27T14:23:11.482Z",
  "updated_at": "2026-05-27T14:23:11.482Z"
}