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

Custom Fields

Account-level schema for custom contact attributes. Type is immutable after creation; single_select and multi_select fields carry an options list.

List custom field definitions.

get

Returns all custom fields defined on the account's workrooms β€” both those created here and the custom attributes created in the dashboard (the workroom's segment attribute registry), so the list matches the dashboard's attribute pickers and the segment builder. Fields created or edited here are written through to that registry (type number β†’ Numeric, boolean β†’ Boolean, date/datetime β†’ Date, everything else β†’ String; options β†’ the attribute's option list). A dashboard-made attribute gets a stable id derived from its workroom and key; its Day type is reported as number. Custom field values live on individual Contacts under custom_fields.<key>. Common filters: ?filter[type]=single_select.

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

A page of custom field definitions.

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

A page of custom field definitions.

{
  "object": "text",
  "data": [
    {
      "id": "cf_01H8XM...",
      "object": "text",
      "key": "text",
      "label": "text",
      "type": "text",
      "description": "text",
      "options": [
        {
          "value": "text",
          "label": "text",
          "color": "text"
        }
      ],
      "default_value": null,
      "required": false,
      "indexed": false,
      "created_at": "2026-05-27T14:23:11.482Z",
      "updated_at": "2026-05-27T14:23:11.482Z"
    }
  ],
  "has_more": true,
  "next_cursor": "text",
  "prev_cursor": "text"
}

Create a custom field.

post

Creates a new custom field on the account. key is immutable and used everywhere the field is referenced (contact.custom_fields.<key>, Segment DSL, Liquid templates). type is also immutable β€” pick correctly. For single_select and multi_select, provide options.

Requires the field label and type. 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

Create a new custom field on the account. type is immutable after creation. For single_select and multi_select, provide options.

keystring Β· max: 100RequiredPattern: ^[a-z][a-z0-9_]*$
labelstring Β· max: 200Required
typestring Β· enumRequired

day_of_year is the dashboard's "Day" attribute type: an integer day of the year (0-365, January 1 = 0, the same numbering as personalinfo.birthday). Segment conditions on it use the anniversary operators (DayInNext, DayInLast, DayInMonth, ...) rather than numeric comparison. Stored in the dashboard registry as Day.

Possible values:
descriptionstring Β· max: 1000Optional
default_valuestring | number | boolean | array Β· nullableOptional

Its type must match the field's type.

requiredbooleanOptionalDefault: false
indexedbooleanOptionalDefault: false
Responses
201

Custom field created.

application/json
idstringRequiredExample: cf_01H8XM...Pattern: ^cf_[0-9A-HJKMNP-TV-Z]{26}$
objectconst: custom_fieldRequired
keystring Β· max: 100Required

Immutable machine identifier used in contact.custom_fields.{key} and in Segment DSL / Liquid templates.

Pattern: ^[a-z][a-z0-9_]*$
labelstring Β· max: 200Required

Human-readable name shown in the UI. Editable.

typestring Β· enumRequired

day_of_year is the dashboard's "Day" attribute type: an integer day of the year (0-365, January 1 = 0, the same numbering as personalinfo.birthday). Segment conditions on it use the anniversary operators (DayInNext, DayInLast, DayInMonth, ...) rather than numeric comparison. Stored in the dashboard registry as Day.

Possible values:
descriptionstring Β· max: 1000 Β· nullableOptional
default_valuestring | number | boolean | array Β· nullableOptional

Value applied to new contacts if none provided. Its type must match the field's type β€” a string for text, a number for number, an array for multi_select.

requiredbooleanOptional

If true, new contacts must supply this field. Not enforced retroactively on existing contacts.

Default: false
indexedbooleanOptional

If true, the field is indexed for use in segment filters. Toggling on causes a backfill.

Default: false
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/custom_fields
POST /v3/custom_fields HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 90

{
  "key": "lead_score",
  "label": "Lead Score",
  "type": "number",
  "default_value": 0,
  "indexed": true
}
{
  "id": "cf_01H8XM...",
  "object": "text",
  "key": "text",
  "label": "text",
  "type": "text",
  "description": "text",
  "options": [
    {
      "value": "text",
      "label": "text",
      "color": "text"
    }
  ],
  "default_value": null,
  "required": false,
  "indexed": false,
  "created_at": "2026-05-27T14:23:11.482Z",
  "updated_at": "2026-05-27T14:23:11.482Z"
}

Retrieve a custom field.

get

Fetch a single field definition.

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
idstringRequiredExample: cf_01H8XM...Pattern: ^cf_[0-9A-HJKMNP-TV-Z]{26}$
Query parameters
workroomstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
200

The custom field.

application/json
idstringRequiredExample: cf_01H8XM...Pattern: ^cf_[0-9A-HJKMNP-TV-Z]{26}$
objectconst: custom_fieldRequired
keystring Β· max: 100Required

Immutable machine identifier used in contact.custom_fields.{key} and in Segment DSL / Liquid templates.

Pattern: ^[a-z][a-z0-9_]*$
labelstring Β· max: 200Required

Human-readable name shown in the UI. Editable.

typestring Β· enumRequired

day_of_year is the dashboard's "Day" attribute type: an integer day of the year (0-365, January 1 = 0, the same numbering as personalinfo.birthday). Segment conditions on it use the anniversary operators (DayInNext, DayInLast, DayInMonth, ...) rather than numeric comparison. Stored in the dashboard registry as Day.

Possible values:
descriptionstring Β· max: 1000 Β· nullableOptional
default_valuestring | number | boolean | array Β· nullableOptional

Value applied to new contacts if none provided. Its type must match the field's type β€” a string for text, a number for number, an array for multi_select.

requiredbooleanOptional

If true, new contacts must supply this field. Not enforced retroactively on existing contacts.

Default: false
indexedbooleanOptional

If true, the field is indexed for use in segment filters. Toggling on causes a backfill.

Default: false
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
get/custom_fields/{id}
GET /v3/custom_fields/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "cf_01H8XM...",
  "object": "text",
  "key": "text",
  "label": "text",
  "type": "text",
  "description": "text",
  "options": [
    {
      "value": "text",
      "label": "text",
      "color": "text"
    }
  ],
  "default_value": null,
  "required": false,
  "indexed": false,
  "created_at": "2026-05-27T14:23:11.482Z",
  "updated_at": "2026-05-27T14:23:11.482Z"
}

Update a custom field.

patch

Partial update. key and type are immutable. For select-typed fields, adding options is safe. Removing an option currently used by contacts returns 409 option_in_use unless ?force=true (clears the field on affected contacts).

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
idstringRequiredExample: cf_01H8XM...Pattern: ^cf_[0-9A-HJKMNP-TV-Z]{26}$
Query parameters
workroomstringOptional

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

forcebooleanOptional

If true, remove-option calls that would strand data proceed anyway (clears the field on affected contacts).

Default: false
Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Body

Partial update. type and key cannot be changed. Modifying options for select-typed fields: adding options is safe; removing an option that contacts currently have set returns 409 unless ?force=true.

labelstring Β· max: 200Optional
descriptionstring Β· max: 1000 Β· nullableOptional
default_valuestring | number | boolean | array Β· nullableOptional

Its type must match the field's type.

requiredbooleanOptional
indexedbooleanOptional
Responses
200

Updated.

application/json
idstringRequiredExample: cf_01H8XM...Pattern: ^cf_[0-9A-HJKMNP-TV-Z]{26}$
objectconst: custom_fieldRequired
keystring Β· max: 100Required

Immutable machine identifier used in contact.custom_fields.{key} and in Segment DSL / Liquid templates.

Pattern: ^[a-z][a-z0-9_]*$
labelstring Β· max: 200Required

Human-readable name shown in the UI. Editable.

typestring Β· enumRequired

day_of_year is the dashboard's "Day" attribute type: an integer day of the year (0-365, January 1 = 0, the same numbering as personalinfo.birthday). Segment conditions on it use the anniversary operators (DayInNext, DayInLast, DayInMonth, ...) rather than numeric comparison. Stored in the dashboard registry as Day.

Possible values:
descriptionstring Β· max: 1000 Β· nullableOptional
default_valuestring | number | boolean | array Β· nullableOptional

Value applied to new contacts if none provided. Its type must match the field's type β€” a string for text, a number for number, an array for multi_select.

requiredbooleanOptional

If true, new contacts must supply this field. Not enforced retroactively on existing contacts.

Default: false
indexedbooleanOptional

If true, the field is indexed for use in segment filters. Toggling on causes a backfill.

Default: false
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
patch/custom_fields/{id}
PATCH /v3/custom_fields/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 148

{
  "label": "text",
  "description": "text",
  "options": [
    {
      "value": "text",
      "label": "text",
      "color": "text"
    }
  ],
  "default_value": null,
  "required": true,
  "indexed": true
}
{
  "id": "cf_01H8XM...",
  "object": "text",
  "key": "text",
  "label": "text",
  "type": "text",
  "description": "text",
  "options": [
    {
      "value": "text",
      "label": "text",
      "color": "text"
    }
  ],
  "default_value": null,
  "required": false,
  "indexed": false,
  "created_at": "2026-05-27T14:23:11.482Z",
  "updated_at": "2026-05-27T14:23:11.482Z"
}

Delete a custom field.

delete

Removes the field definition and its values from all contacts. Irreversible. Segments and flows that reference this field return unknown_attribute warnings on next evaluation. Returns 409 field_in_use if the field is referenced by any active flow, campaign, or segment β€” remove those references first, or use ?force=true (admin only).

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
idstringRequiredExample: cf_01H8XM...Pattern: ^cf_[0-9A-HJKMNP-TV-Z]{26}$
Query parameters
workroomstringOptional

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

forcebooleanOptionalDefault: false
Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
204

Deleted.

No content

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

No content