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

Keyword Campaigns

SMS keyword auto-responders (for example, "Text JOIN to 555-0100"). A keyword campaign groups one or more keywords; each keyword matches an inbound SMS and sends an auto-response, with an optional webhook and conversion tracking. Keywords must be unique within a workroom.

List keyword campaigns.

get
Authorizations
AuthorizationstringRequired

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

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

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

Query parameters
workroomstringOptional

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

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

Page size. Default 25, max 100.

Default: 25
cursorstringOptional

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

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

Page of campaigns.

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

Page of campaigns.

{
  "object": "text",
  "data": [
    {
      "object": "text",
      "id": "kwc_66aa7c1d0e5b7c1a4d8e2f1c",
      "workroom_id": "wrm_5ace370fd2a57d74d0548fb2",
      "name": "text",
      "type": "inbound",
      "status": "active",
      "tags": [
        "text"
      ],
      "keyword_count": 1,
      "created_by": "text",
      "created_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "has_more": true,
  "next_cursor": "text",
  "prev_cursor": "text"
}

Create a keyword campaign.

post

Requires the keyword and the reply. Optional fields fall back to a server-side default when omitted. That includes the workroom: an omitted workroom resolves to the account default, and a record created in the wrong workroom is invisible where it was expected. Half-specified records are created successfully and then have to be hunted down and fixed by hand.

Authorizations
AuthorizationstringRequired

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

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

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

Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Body
namestring Β· min: 1Required
workroom_idstringOptionalExample: wrm_5ace370fd2a57d74d0548fb2Pattern: ^wrm_[0-9a-f]{24}$
statusstring Β· enumOptionalDefault: activePossible values:
typestringOptionalDefault: inbound
tagsstring[]Optional
Responses
201

Campaign created.

application/json
objectconst: keyword_campaignOptional
idstringOptional

Keyword campaign ID.

Example: kwc_66aa7c1d0e5b7c1a4d8e2f1cPattern: ^kwc_[0-9a-fA-F]{24}$
workroom_idstringOptionalExample: wrm_5ace370fd2a57d74d0548fb2Pattern: ^wrm_[0-9a-f]{24}$
namestring Β· nullableOptional
typestringOptionalExample: inbound
statusstring Β· enumOptionalPossible values:
tagsstring[]Optional
keyword_countintegerOptional
created_bystring Β· nullableOptional
created_atstring Β· date-time Β· nullableOptional
updated_atstring Β· date-time Β· nullableOptional
post/keyword_campaigns
POST /v3/keyword_campaigns HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 111

{
  "name": "text",
  "workroom_id": "wrm_5ace370fd2a57d74d0548fb2",
  "status": "active",
  "type": "inbound",
  "tags": [
    "text"
  ]
}
{
  "object": "text",
  "id": "kwc_66aa7c1d0e5b7c1a4d8e2f1c",
  "workroom_id": "wrm_5ace370fd2a57d74d0548fb2",
  "name": "text",
  "type": "inbound",
  "status": "active",
  "tags": [
    "text"
  ],
  "keyword_count": 1,
  "created_by": "text",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Retrieve a keyword campaign (includes keyword_count).

get
Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

Keyword campaign ID.

Example: kwc_66aa7c1d0e5b7c1a4d8e2f1cPattern: ^kwc_[0-9a-fA-F]{24}$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
200

Campaign.

application/json
objectconst: keyword_campaignOptional
idstringOptional

Keyword campaign ID.

Example: kwc_66aa7c1d0e5b7c1a4d8e2f1cPattern: ^kwc_[0-9a-fA-F]{24}$
workroom_idstringOptionalExample: wrm_5ace370fd2a57d74d0548fb2Pattern: ^wrm_[0-9a-f]{24}$
namestring Β· nullableOptional
typestringOptionalExample: inbound
statusstring Β· enumOptionalPossible values:
tagsstring[]Optional
keyword_countintegerOptional
created_bystring Β· nullableOptional
created_atstring Β· date-time Β· nullableOptional
updated_atstring Β· date-time Β· nullableOptional
get/keyword_campaigns/{id}
GET /v3/keyword_campaigns/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "text",
  "id": "kwc_66aa7c1d0e5b7c1a4d8e2f1c",
  "workroom_id": "wrm_5ace370fd2a57d74d0548fb2",
  "name": "text",
  "type": "inbound",
  "status": "active",
  "tags": [
    "text"
  ],
  "keyword_count": 1,
  "created_by": "text",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Update a keyword campaign.

patch

Status changes cascade to all child keywords (dashboard-compatible behavior).

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

Keyword campaign ID.

Example: kwc_66aa7c1d0e5b7c1a4d8e2f1cPattern: ^kwc_[0-9a-fA-F]{24}$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Body
namestring Β· min: 1Optional
statusstring Β· enumOptionalPossible values:
typestringOptional
tagsstring[]Optional
Responses
200

Updated campaign.

application/json
objectconst: keyword_campaignOptional
idstringOptional

Keyword campaign ID.

Example: kwc_66aa7c1d0e5b7c1a4d8e2f1cPattern: ^kwc_[0-9a-fA-F]{24}$
workroom_idstringOptionalExample: wrm_5ace370fd2a57d74d0548fb2Pattern: ^wrm_[0-9a-f]{24}$
namestring Β· nullableOptional
typestringOptionalExample: inbound
statusstring Β· enumOptionalPossible values:
tagsstring[]Optional
keyword_countintegerOptional
created_bystring Β· nullableOptional
created_atstring Β· date-time Β· nullableOptional
updated_atstring Β· date-time Β· nullableOptional
patch/keyword_campaigns/{id}
PATCH /v3/keyword_campaigns/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 63

{
  "name": "text",
  "status": "active",
  "type": "text",
  "tags": [
    "text"
  ]
}
{
  "object": "text",
  "id": "kwc_66aa7c1d0e5b7c1a4d8e2f1c",
  "workroom_id": "wrm_5ace370fd2a57d74d0548fb2",
  "name": "text",
  "type": "inbound",
  "status": "active",
  "tags": [
    "text"
  ],
  "keyword_count": 1,
  "created_by": "text",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Soft-delete a keyword campaign.

delete

Sets delete_flag=1 on the campaign and cascades to all child keywords (deactivates + soft-deletes).

Permanent. There is no undo and no trash to restore from. Anything that references the deleted record is affected too.

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

Keyword campaign ID.

Example: kwc_66aa7c1d0e5b7c1a4d8e2f1cPattern: ^kwc_[0-9a-fA-F]{24}$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
204

Deleted.

No content

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

No content

Pause a keyword campaign (status β†’ inactive).

post

Cascades to child keywords.

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

Keyword campaign ID.

Example: kwc_66aa7c1d0e5b7c1a4d8e2f1cPattern: ^kwc_[0-9a-fA-F]{24}$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
200

Paused campaign.

application/json
objectconst: keyword_campaignOptional
idstringOptional

Keyword campaign ID.

Example: kwc_66aa7c1d0e5b7c1a4d8e2f1cPattern: ^kwc_[0-9a-fA-F]{24}$
workroom_idstringOptionalExample: wrm_5ace370fd2a57d74d0548fb2Pattern: ^wrm_[0-9a-f]{24}$
namestring Β· nullableOptional
typestringOptionalExample: inbound
statusstring Β· enumOptionalPossible values:
tagsstring[]Optional
keyword_countintegerOptional
created_bystring Β· nullableOptional
created_atstring Β· date-time Β· nullableOptional
updated_atstring Β· date-time Β· nullableOptional
post/keyword_campaigns/{id}/pause
POST /v3/keyword_campaigns/{id}/pause HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "text",
  "id": "kwc_66aa7c1d0e5b7c1a4d8e2f1c",
  "workroom_id": "wrm_5ace370fd2a57d74d0548fb2",
  "name": "text",
  "type": "inbound",
  "status": "active",
  "tags": [
    "text"
  ],
  "keyword_count": 1,
  "created_by": "text",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Resume a keyword campaign (status β†’ active).

post

Cascades to child keywords.

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

Keyword campaign ID.

Example: kwc_66aa7c1d0e5b7c1a4d8e2f1cPattern: ^kwc_[0-9a-fA-F]{24}$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
200

Resumed campaign.

application/json
objectconst: keyword_campaignOptional
idstringOptional

Keyword campaign ID.

Example: kwc_66aa7c1d0e5b7c1a4d8e2f1cPattern: ^kwc_[0-9a-fA-F]{24}$
workroom_idstringOptionalExample: wrm_5ace370fd2a57d74d0548fb2Pattern: ^wrm_[0-9a-f]{24}$
namestring Β· nullableOptional
typestringOptionalExample: inbound
statusstring Β· enumOptionalPossible values:
tagsstring[]Optional
keyword_countintegerOptional
created_bystring Β· nullableOptional
created_atstring Β· date-time Β· nullableOptional
updated_atstring Β· date-time Β· nullableOptional
post/keyword_campaigns/{id}/resume
POST /v3/keyword_campaigns/{id}/resume HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "text",
  "id": "kwc_66aa7c1d0e5b7c1a4d8e2f1c",
  "workroom_id": "wrm_5ace370fd2a57d74d0548fb2",
  "name": "text",
  "type": "inbound",
  "status": "active",
  "tags": [
    "text"
  ],
  "keyword_count": 1,
  "created_by": "text",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

List keywords in a campaign.

get
Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

Keyword campaign ID.

Example: kwc_66aa7c1d0e5b7c1a4d8e2f1cPattern: ^kwc_[0-9a-fA-F]{24}$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
200

Keywords in this campaign (all-in-one).

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/keyword_campaigns/{id}/keywords
GET /v3/keyword_campaigns/{id}/keywords HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "text",
  "data": [
    {
      "object": "text",
      "id": "kw_66aa7c1d0e5b7c1a4d8e2f1d",
      "campaign_id": "kwc_66aa7c1d0e5b7c1a4d8e2f1c",
      "workroom_id": "wrm_5ace370fd2a57d74d0548fb2",
      "keyword": "text",
      "autoresponse": "text",
      "webhook": true,
      "webhook_url": "text",
      "status": "active",
      "conversion": {
        "title": "text",
        "value": 1,
        "segment_users": [
          {
            "segment": "Attributes",
            "data": "text",
            "event": "text",
            "operator": "=",
            "value": null,
            "value2": null,
            "operator2": "text",
            "value2_id": [
              "text"
            ],
            "data_type": "String",
            "dataAlias": "text",
            "ANY_ADDITIONAL_PROPERTY": "anything"
          }
        ]
      },
      "created_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "has_more": true,
  "next_cursor": "text",
  "prev_cursor": "text"
}

Add a keyword to a campaign.

post

Keyword text must be unique per workroom (409 keyword_conflict if not).

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

Keyword campaign ID.

Example: kwc_66aa7c1d0e5b7c1a4d8e2f1cPattern: ^kwc_[0-9a-fA-F]{24}$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Body
keywordstring Β· min: 1Required

Unique per workroom. 409 keyword_conflict if a live keyword already uses this text.

autoresponsestringOptional
webhookbooleanOptional
webhook_urlstringOptional
statusstring Β· enumOptionalPossible values:
Responses
201

Keyword created.

application/json
objectconst: keywordOptional
idstringOptional

Keyword ID.

Example: kw_66aa7c1d0e5b7c1a4d8e2f1dPattern: ^kw_[0-9a-fA-F]{24}$
campaign_idstringOptional

Keyword campaign ID.

Example: kwc_66aa7c1d0e5b7c1a4d8e2f1cPattern: ^kwc_[0-9a-fA-F]{24}$
workroom_idstringOptionalExample: wrm_5ace370fd2a57d74d0548fb2Pattern: ^wrm_[0-9a-f]{24}$
keywordstring Β· nullableOptional

Match text. Case-insensitive at match time (compared against strtoupper(inbound_body)).

autoresponsestring Β· nullableOptional

SMS body sent to the sender on match. Merge tags supported.

webhookbooleanOptional
webhook_urlstring Β· nullableOptional
statusstring Β· enumOptionalPossible values:
created_atstring Β· date-time Β· nullableOptional
updated_atstring Β· date-time Β· nullableOptional
post/keyword_campaigns/{id}/keywords
POST /v3/keyword_campaigns/{id}/keywords HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 365

{
  "keyword": "text",
  "autoresponse": "text",
  "webhook": true,
  "webhook_url": "text",
  "status": "active",
  "conversion": {
    "title": "text",
    "value": 1,
    "segment_users": [
      {
        "segment": "Attributes",
        "data": "text",
        "event": "text",
        "operator": "=",
        "value": null,
        "value2": null,
        "operator2": "text",
        "value2_id": [
          "text"
        ],
        "data_type": "String",
        "dataAlias": "text",
        "ANY_ADDITIONAL_PROPERTY": "anything"
      }
    ]
  }
}
{
  "object": "text",
  "id": "kw_66aa7c1d0e5b7c1a4d8e2f1d",
  "campaign_id": "kwc_66aa7c1d0e5b7c1a4d8e2f1c",
  "workroom_id": "wrm_5ace370fd2a57d74d0548fb2",
  "keyword": "text",
  "autoresponse": "text",
  "webhook": true,
  "webhook_url": "text",
  "status": "active",
  "conversion": {
    "title": "text",
    "value": 1,
    "segment_users": [
      {
        "segment": "Attributes",
        "data": "text",
        "event": "text",
        "operator": "=",
        "value": null,
        "value2": null,
        "operator2": "text",
        "value2_id": [
          "text"
        ],
        "data_type": "String",
        "dataAlias": "text",
        "ANY_ADDITIONAL_PROPERTY": "anything"
      }
    ]
  },
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Traffic and conversion report for a campaign.

get

Reads receipts from inboundtext β€” matches on Reference = strtoupper(keyword) and Goal = 1 for converted. Returns per-keyword and campaign-total counts. Optional from / to narrows the window; otherwise all-time.

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

Keyword campaign ID.

Example: kwc_66aa7c1d0e5b7c1a4d8e2f1cPattern: ^kwc_[0-9a-fA-F]{24}$
Query parameters
workroomstringOptional

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

fromstring Β· date-timeOptional
tostring Β· date-timeOptional
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

Campaign report.

application/json
objectconst: keyword_campaign_reportOptional
campaign_idstringOptional

Keyword campaign ID.

Example: kwc_66aa7c1d0e5b7c1a4d8e2f1cPattern: ^kwc_[0-9a-fA-F]{24}$
fromstring Β· date-time Β· nullableOptional
tostring Β· date-time Β· nullableOptional
received_countintegerOptional
converted_countintegerOptional
conversion_ratenumber Β· floatOptional
get/keyword_campaigns/{id}/report
GET /v3/keyword_campaigns/{id}/report HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "text",
  "campaign_id": "kwc_66aa7c1d0e5b7c1a4d8e2f1c",
  "from": "2026-01-01T00:00:00.000Z",
  "to": "2026-01-01T00:00:00.000Z",
  "received_count": 1,
  "converted_count": 1,
  "conversion_rate": 1,
  "keywords": [
    {
      "keyword_id": "kw_66aa7c1d0e5b7c1a4d8e2f1d",
      "keyword": "text",
      "received_count": 1,
      "converted_count": 1,
      "converted_value": 1
    }
  ]
}

Retrieve a keyword.

get

One SMS keyword: the word an inbound text must match, the auto-response it triggers, and the keyword campaign it belongs to. Keyword text is unique per workroom, because inbound routing depends on it.

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

Keyword ID.

Example: kw_66aa7c1d0e5b7c1a4d8e2f1dPattern: ^kw_[0-9a-fA-F]{24}$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
200

Keyword.

application/json
objectconst: keywordOptional
idstringOptional

Keyword ID.

Example: kw_66aa7c1d0e5b7c1a4d8e2f1dPattern: ^kw_[0-9a-fA-F]{24}$
campaign_idstringOptional

Keyword campaign ID.

Example: kwc_66aa7c1d0e5b7c1a4d8e2f1cPattern: ^kwc_[0-9a-fA-F]{24}$
workroom_idstringOptionalExample: wrm_5ace370fd2a57d74d0548fb2Pattern: ^wrm_[0-9a-f]{24}$
keywordstring Β· nullableOptional

Match text. Case-insensitive at match time (compared against strtoupper(inbound_body)).

autoresponsestring Β· nullableOptional

SMS body sent to the sender on match. Merge tags supported.

webhookbooleanOptional
webhook_urlstring Β· nullableOptional
statusstring Β· enumOptionalPossible values:
created_atstring Β· date-time Β· nullableOptional
updated_atstring Β· date-time Β· nullableOptional
get/keywords/{id}
GET /v3/keywords/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "text",
  "id": "kw_66aa7c1d0e5b7c1a4d8e2f1d",
  "campaign_id": "kwc_66aa7c1d0e5b7c1a4d8e2f1c",
  "workroom_id": "wrm_5ace370fd2a57d74d0548fb2",
  "keyword": "text",
  "autoresponse": "text",
  "webhook": true,
  "webhook_url": "text",
  "status": "active",
  "conversion": {
    "title": "text",
    "value": 1,
    "segment_users": [
      {
        "segment": "Attributes",
        "data": "text",
        "event": "text",
        "operator": "=",
        "value": null,
        "value2": null,
        "operator2": "text",
        "value2_id": [
          "text"
        ],
        "data_type": "String",
        "dataAlias": "text",
        "ANY_ADDITIONAL_PROPERTY": "anything"
      }
    ]
  },
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Update a keyword.

patch

Renaming a keyword re-validates workroom-uniqueness (409 on conflict).

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

Keyword ID.

Example: kw_66aa7c1d0e5b7c1a4d8e2f1dPattern: ^kw_[0-9a-fA-F]{24}$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Body
keywordstring Β· min: 1Required

Unique per workroom. 409 keyword_conflict if a live keyword already uses this text.

autoresponsestringOptional
webhookbooleanOptional
webhook_urlstringOptional
statusstring Β· enumOptionalPossible values:
Responses
200

Updated keyword.

application/json
objectconst: keywordOptional
idstringOptional

Keyword ID.

Example: kw_66aa7c1d0e5b7c1a4d8e2f1dPattern: ^kw_[0-9a-fA-F]{24}$
campaign_idstringOptional

Keyword campaign ID.

Example: kwc_66aa7c1d0e5b7c1a4d8e2f1cPattern: ^kwc_[0-9a-fA-F]{24}$
workroom_idstringOptionalExample: wrm_5ace370fd2a57d74d0548fb2Pattern: ^wrm_[0-9a-f]{24}$
keywordstring Β· nullableOptional

Match text. Case-insensitive at match time (compared against strtoupper(inbound_body)).

autoresponsestring Β· nullableOptional

SMS body sent to the sender on match. Merge tags supported.

webhookbooleanOptional
webhook_urlstring Β· nullableOptional
statusstring Β· enumOptionalPossible values:
created_atstring Β· date-time Β· nullableOptional
updated_atstring Β· date-time Β· nullableOptional
patch/keywords/{id}
PATCH /v3/keywords/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 365

{
  "keyword": "text",
  "autoresponse": "text",
  "webhook": true,
  "webhook_url": "text",
  "status": "active",
  "conversion": {
    "title": "text",
    "value": 1,
    "segment_users": [
      {
        "segment": "Attributes",
        "data": "text",
        "event": "text",
        "operator": "=",
        "value": null,
        "value2": null,
        "operator2": "text",
        "value2_id": [
          "text"
        ],
        "data_type": "String",
        "dataAlias": "text",
        "ANY_ADDITIONAL_PROPERTY": "anything"
      }
    ]
  }
}
{
  "object": "text",
  "id": "kw_66aa7c1d0e5b7c1a4d8e2f1d",
  "campaign_id": "kwc_66aa7c1d0e5b7c1a4d8e2f1c",
  "workroom_id": "wrm_5ace370fd2a57d74d0548fb2",
  "keyword": "text",
  "autoresponse": "text",
  "webhook": true,
  "webhook_url": "text",
  "status": "active",
  "conversion": {
    "title": "text",
    "value": 1,
    "segment_users": [
      {
        "segment": "Attributes",
        "data": "text",
        "event": "text",
        "operator": "=",
        "value": null,
        "value2": null,
        "operator2": "text",
        "value2_id": [
          "text"
        ],
        "data_type": "String",
        "dataAlias": "text",
        "ANY_ADDITIONAL_PROPERTY": "anything"
      }
    ]
  },
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Soft-delete a keyword.

delete

Permanent. There is no undo and no trash to restore from. Anything that references the deleted record is affected too.

Authorizations
AuthorizationstringRequired

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

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

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

Path parameters
idstringRequired

Keyword ID.

Example: kw_66aa7c1d0e5b7c1a4d8e2f1dPattern: ^kw_[0-9a-fA-F]{24}$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
204

Deleted.

No content

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

No content