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

Scorecards

Account-wide metrics tables broken down by responsible user, location, or workroom (a reporting view, not contact scoring). Metric values are computed in the background, so a new or edited scorecard shows calculation_status: "pending" until the next calculation run.

List the account's formula metrics.

get

Metrics computed from other metrics rather than from a query. Same records listCustomMetrics returns with filter[kind]=formula; this route is the formula-only view.

Authorizations
AuthorizationstringRequired

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

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

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

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

Page size. Default 25, max 100.

Default: 25
cursorstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Responses
200

A page of formula metrics.

application/json
objectstring Β· enumOptionalPossible values:
has_morebooleanOptional
next_cursorstring Β· nullableOptional
get/scorecards/formulas
GET /v3/scorecards/formulas HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

A page of formula metrics.

{
  "object": "list",
  "data": [
    {
      "object": "custom_metric",
      "id": "cmt_6520f7e8a17700005f006059",
      "name": "text",
      "kind": "segment",
      "metric_date": "text",
      "is_formula_referenceable": true,
      "warnings": [
        "text"
      ],
      "query": {
        "segment_users": [
          {}
        ],
        "with_or_segment_users": [
          {}
        ]
      },
      "formula": "({New Contacts} / {Total Contacts}) * 100",
      "prefix": "text",
      "suffix": "text"
    }
  ],
  "has_more": true,
  "next_cursor": "text"
}

Create a formula metric.

post

Defines a metric as an arithmetic expression over other metrics, referenced in braces:

({New Contacts} / {Total Contacts}) * 100      with suffix "%"
round({New Leads} / {Total Leads}, 2)

A {reference} resolves against three things, in the order the calculator tries them: a built-in metric name, one of the account's own custom metrics, then a workroom attribute key. listScorecardMetrics returns the first two.

Every reference is checked at write time, because nothing checks it later. The calculator substitutes each reference for its value and evaluates the result inside a catch-all that yields 0 on any error, and an unresolvable reference itself resolves to 0. So a formula with a mistyped metric name does not fail β€” ({New Contactz} / {Total Contacts}) * 100 computes (0 / 5000) * 100 and reports 0%, which looks like a real answer. The dashboard's own save path performs none of these checks.

Also rejected: a formula with no references (that is a constant), self-reference, unbalanced braces or parentheses, and anything the calculator's sanitiser would strip β€” only + - * / . ( ) ,, digits and the functions round, ceil, floor survive outside a reference, so a formula containing more than that would be stored and then silently evaluated as something else.

prefix and suffix are display-only, e.g. suffix: "%".

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.

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
Body
namestringOptional

Unique per account (case-insensitive); scorecards and other formulas reference metrics by this name.

formulastringOptional

Arithmetic over other metrics, each referenced in braces. Outside a reference only digits, + - * / . ( ) , and the functions round, ceil, floor are permitted β€” anything else is stripped by the calculator and is rejected here rather than stored.

Example: ({New Contacts} / {Total Contacts}) * 100
prefixstringOptional

Display prefix, e.g. "$".

suffixstringOptional

Display suffix, e.g. "%".

Responses
201

The created formula metric.

application/json
objectstring Β· enumOptionalPossible values:
idstringOptionalExample: cmt_6520f7e8a17700005f006059
namestringOptional

Unique per account. This is what a scorecard's metrics[] stores.

kindstring Β· enumOptional

segment counts contacts matching a query and is writable here. formula computes from other metrics and is writable via /scorecards/formulas.

Possible values:
metric_datestring Β· nullableOptional

Which date field constrains the metric to the scorecard's window. "" means no date constraint. Null means the field is absent, which the calculator treats as add_date.

is_formula_referenceablebooleanOptional

Whether this metric's name contains only characters supported in formula references.

warningsstring[]Optional

Warning messages, e.g. when the metric name contains hyphens or symbols and cannot be referenced from formulas.

formulastringOptional

Present for formula metrics. References other metrics in braces.

Example: ({New Contacts} / {Total Contacts}) * 100
prefixstringOptional

Display prefix for a formula metric.

suffixstringOptional

Display suffix for a formula metric

post/scorecards/formulas
POST /v3/scorecards/formulas HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 101

{
  "name": "text",
  "formula": "({New Contacts} / {Total Contacts}) * 100",
  "prefix": "text",
  "suffix": "text"
}
201

The created formula metric.

{
  "object": "custom_metric",
  "id": "cmt_6520f7e8a17700005f006059",
  "name": "text",
  "kind": "segment",
  "metric_date": "text",
  "is_formula_referenceable": true,
  "warnings": [
    "text"
  ],
  "query": {
    "segment_users": [
      {}
    ],
    "with_or_segment_users": [
      {}
    ]
  },
  "formula": "({New Contacts} / {Total Contacts}) * 100",
  "prefix": "text",
  "suffix": "text"
}

Retrieve one formula metric.

get

The expression and its display prefix/suffix.

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
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
Responses
200

The formula metric.

application/json
objectstring Β· enumOptionalPossible values:
idstringOptionalExample: cmt_6520f7e8a17700005f006059
namestringOptional

Unique per account. This is what a scorecard's metrics[] stores.

kindstring Β· enumOptional

segment counts contacts matching a query and is writable here. formula computes from other metrics and is writable via /scorecards/formulas.

Possible values:
metric_datestring Β· nullableOptional

Which date field constrains the metric to the scorecard's window. "" means no date constraint. Null means the field is absent, which the calculator treats as add_date.

is_formula_referenceablebooleanOptional

Whether this metric's name contains only characters supported in formula references.

warningsstring[]Optional

Warning messages, e.g. when the metric name contains hyphens or symbols and cannot be referenced from formulas.

formulastringOptional

Present for formula metrics. References other metrics in braces.

Example: ({New Contacts} / {Total Contacts}) * 100
prefixstringOptional

Display prefix for a formula metric.

suffixstringOptional

Display suffix for a formula metric

get/scorecards/formulas/{id}
GET /v3/scorecards/formulas/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

The formula metric.

{
  "object": "custom_metric",
  "id": "cmt_6520f7e8a17700005f006059",
  "name": "text",
  "kind": "segment",
  "metric_date": "text",
  "is_formula_referenceable": true,
  "warnings": [
    "text"
  ],
  "query": {
    "segment_users": [
      {}
    ],
    "with_or_segment_users": [
      {}
    ]
  },
  "formula": "({New Contacts} / {Total Contacts}) * 100",
  "prefix": "text",
  "suffix": "text"
}

Update a formula metric.

patch

Patches name, formula, prefix or suffix. Omitted fields are left unchanged. A changed formula is re-validated in full.

Renaming cascades, exactly as it does for segment metrics: scorecards holding the old name in metrics[]/metrics_columns[] are rewritten, and any other formula metric referencing {old name} is rewritten too. Affected scorecards are queued for recalculation. Without that they would keep the old name and silently resolve it to 0.

A segment-based custom metric is rejected here; use updateCustomMetric.

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
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
Body
namestringOptional

Unique per account (case-insensitive); scorecards and other formulas reference metrics by this name.

formulastringOptional

Arithmetic over other metrics, each referenced in braces. Outside a reference only digits, + - * / . ( ) , and the functions round, ceil, floor are permitted β€” anything else is stripped by the calculator and is rejected here rather than stored.

Example: ({New Contacts} / {Total Contacts}) * 100
prefixstringOptional

Display prefix, e.g. "$".

suffixstringOptional

Display suffix, e.g. "%".

Responses
200

The updated formula metric.

application/json
objectstring Β· enumOptionalPossible values:
idstringOptionalExample: cmt_6520f7e8a17700005f006059
namestringOptional

Unique per account. This is what a scorecard's metrics[] stores.

kindstring Β· enumOptional

segment counts contacts matching a query and is writable here. formula computes from other metrics and is writable via /scorecards/formulas.

Possible values:
metric_datestring Β· nullableOptional

Which date field constrains the metric to the scorecard's window. "" means no date constraint. Null means the field is absent, which the calculator treats as add_date.

is_formula_referenceablebooleanOptional

Whether this metric's name contains only characters supported in formula references.

warningsstring[]Optional

Warning messages, e.g. when the metric name contains hyphens or symbols and cannot be referenced from formulas.

formulastringOptional

Present for formula metrics. References other metrics in braces.

Example: ({New Contacts} / {Total Contacts}) * 100
prefixstringOptional

Display prefix for a formula metric.

suffixstringOptional

Display suffix for a formula metric

patch/scorecards/formulas/{id}
PATCH /v3/scorecards/formulas/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 101

{
  "name": "text",
  "formula": "({New Contacts} / {Total Contacts}) * 100",
  "prefix": "text",
  "suffix": "text"
}
200

The updated formula metric.

{
  "object": "custom_metric",
  "id": "cmt_6520f7e8a17700005f006059",
  "name": "text",
  "kind": "segment",
  "metric_date": "text",
  "is_formula_referenceable": true,
  "warnings": [
    "text"
  ],
  "query": {
    "segment_users": [
      {}
    ],
    "with_or_segment_users": [
      {}
    ]
  },
  "formula": "({New Contacts} / {Total Contacts}) * 100",
  "prefix": "text",
  "suffix": "text"
}

Delete a formula metric.

delete

Removes the formula permanently. Refused with 409 metric_in_use while a scorecard still references it by name.

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
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
Responses
204

Deleted.

No content

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

No content

List the account's custom scorecard metrics.

get

Account-defined metrics that a scorecard can reference. Two kinds share this listing, told apart by kind:

  • segment β€” counts the contacts matching query.segment_users, the same condition DSL segments use, within the window metric_date selects. Writable through these endpoints.

  • formula β€” computed from other metrics, e.g. ({New Contacts} / {Total Contacts}) * 100. Writable through /scorecards/formulas.

Filter with filter[kind]=segment|formula and filter[name]=<prefix>.

Authorizations
AuthorizationstringRequired

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

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

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

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

Page size. Default 25, max 100.

Default: 25
cursorstringOptional

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

Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Responses
200

A page of custom metrics.

application/json
objectstring Β· enumOptionalPossible values:
has_morebooleanOptional
next_cursorstring Β· nullableOptional
get/scorecards/custom_metrics
GET /v3/scorecards/custom_metrics HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

A page of custom metrics.

{
  "object": "list",
  "data": [
    {
      "object": "custom_metric",
      "id": "cmt_6520f7e8a17700005f006059",
      "name": "text",
      "kind": "segment",
      "metric_date": "text",
      "is_formula_referenceable": true,
      "warnings": [
        "text"
      ],
      "query": {
        "segment_users": [
          {}
        ],
        "with_or_segment_users": [
          {}
        ]
      },
      "formula": "({New Contacts} / {Total Contacts}) * 100",
      "prefix": "text",
      "suffix": "text"
    }
  ],
  "has_more": true,
  "next_cursor": "text"
}

Create a segment-based custom metric.

post

Defines a metric as a named query: it counts the contacts matching query.segment_users, within the window metric_date selects.

name must be unique on the account β€” case-insensitively. "Total Visits" and "total visits" are the same metric for this check, because scorecard matching is case-sensitive and a case-only twin would silently make one of them unreachable. A collision is a 422 naming the existing metric.

A name containing characters the formula parser cannot match β€” hyphens, %, # β€” is still accepted, because such a metric works fine on a scorecard. It comes back with is_formula_referenceable: false and a not_formula_referenceable: entry in warnings[], telling you it cannot be referenced from a formula metric.

metric_date decides what the number actually counts, and has three distinct states worth knowing apart:

  • a field name, e.g. memberships.start_date β€” the metric counts matches whose date falls in the scorecard's reporting window

  • "" β€” no date constraint; counts every match regardless of period

  • omitted β€” defaults to add_date, matching the dashboard's own calculator

query takes the same shape as a segment's: segment_users[] plus optional with_or_segment_users[] for OR groups. Call describeSegmentSchema for the categories, attributes and operators available on the workroom.

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.

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
Body
namestringOptional

Unique per account (case-insensitive); scorecards reference metrics by this name. Names should contain only letters, numbers, spaces, dots, or underscores to be referenceable in formula expressions.

metric_datestring Β· enumOptional

Which date field constrains the metric to the reporting window. "" is a real choice meaning no date constraint. Omitted on create, defaults to add_date.

Possible values:
Responses
201

The created metric.

application/json
objectstring Β· enumOptionalPossible values:
idstringOptionalExample: cmt_6520f7e8a17700005f006059
namestringOptional

Unique per account. This is what a scorecard's metrics[] stores.

kindstring Β· enumOptional

segment counts contacts matching a query and is writable here. formula computes from other metrics and is writable via /scorecards/formulas.

Possible values:
metric_datestring Β· nullableOptional

Which date field constrains the metric to the scorecard's window. "" means no date constraint. Null means the field is absent, which the calculator treats as add_date.

is_formula_referenceablebooleanOptional

Whether this metric's name contains only characters supported in formula references.

warningsstring[]Optional

Warning messages, e.g. when the metric name contains hyphens or symbols and cannot be referenced from formulas.

formulastringOptional

Present for formula metrics. References other metrics in braces.

Example: ({New Contacts} / {Total Contacts}) * 100
prefixstringOptional

Display prefix for a formula metric.

suffixstringOptional

Display suffix for a formula metric

post/scorecards/custom_metrics
POST /v3/scorecards/custom_metrics HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 100

{
  "name": "text",
  "metric_date": "add_date",
  "query": {
    "segment_users": [
      {}
    ],
    "with_or_segment_users": [
      {}
    ]
  }
}
201

The created metric.

{
  "object": "custom_metric",
  "id": "cmt_6520f7e8a17700005f006059",
  "name": "text",
  "kind": "segment",
  "metric_date": "text",
  "is_formula_referenceable": true,
  "warnings": [
    "text"
  ],
  "query": {
    "segment_users": [
      {}
    ],
    "with_or_segment_users": [
      {}
    ]
  },
  "formula": "({New Contacts} / {Total Contacts}) * 100",
  "prefix": "text",
  "suffix": "text"
}

Retrieve one custom metric.

get

The metric's definition. A formula metric returns its expression and display affixes; a segment metric returns its query.

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: cmt_6520f7e8a17700005f006059
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
Responses
200

The metric.

application/json
objectstring Β· enumOptionalPossible values:
idstringOptionalExample: cmt_6520f7e8a17700005f006059
namestringOptional

Unique per account. This is what a scorecard's metrics[] stores.

kindstring Β· enumOptional

segment counts contacts matching a query and is writable here. formula computes from other metrics and is writable via /scorecards/formulas.

Possible values:
metric_datestring Β· nullableOptional

Which date field constrains the metric to the scorecard's window. "" means no date constraint. Null means the field is absent, which the calculator treats as add_date.

is_formula_referenceablebooleanOptional

Whether this metric's name contains only characters supported in formula references.

warningsstring[]Optional

Warning messages, e.g. when the metric name contains hyphens or symbols and cannot be referenced from formulas.

formulastringOptional

Present for formula metrics. References other metrics in braces.

Example: ({New Contacts} / {Total Contacts}) * 100
prefixstringOptional

Display prefix for a formula metric.

suffixstringOptional

Display suffix for a formula metric

get/scorecards/custom_metrics/{id}
GET /v3/scorecards/custom_metrics/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

The metric.

{
  "object": "custom_metric",
  "id": "cmt_6520f7e8a17700005f006059",
  "name": "text",
  "kind": "segment",
  "metric_date": "text",
  "is_formula_referenceable": true,
  "warnings": [
    "text"
  ],
  "query": {
    "segment_users": [
      {}
    ],
    "with_or_segment_users": [
      {}
    ]
  },
  "formula": "({New Contacts} / {Total Contacts}) * 100",
  "prefix": "text",
  "suffix": "text"
}

Update a segment-based custom metric.

patch

Patches name, metric_date or query. Omitted fields are left unchanged.

Renaming cascades. Every scorecard whose metrics[] or metrics_columns[] holds the old name is rewritten to the new one, and every formula metric whose expression references {old name} is rewritten too. Those scorecards are then queued for recalculation (calculation_status reverts to pending), because their stored values are still keyed by the old name. Nothing is left rendering an empty tile. Delete is the operation that is refused outright while references exist (409 metric_in_use); rename is safe.

Formula metrics are rejected here: they are a different shape with their own endpoints β€” POST /scorecards/formulas and PATCH /scorecards/formulas/{id}.

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
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
Body
namestringOptional

Unique per account (case-insensitive); scorecards reference metrics by this name. Names should contain only letters, numbers, spaces, dots, or underscores to be referenceable in formula expressions.

metric_datestring Β· enumOptional

Which date field constrains the metric to the reporting window. "" is a real choice meaning no date constraint. Omitted on create, defaults to add_date.

Possible values:
Responses
200

The updated metric.

application/json
objectstring Β· enumOptionalPossible values:
idstringOptionalExample: cmt_6520f7e8a17700005f006059
namestringOptional

Unique per account. This is what a scorecard's metrics[] stores.

kindstring Β· enumOptional

segment counts contacts matching a query and is writable here. formula computes from other metrics and is writable via /scorecards/formulas.

Possible values:
metric_datestring Β· nullableOptional

Which date field constrains the metric to the scorecard's window. "" means no date constraint. Null means the field is absent, which the calculator treats as add_date.

is_formula_referenceablebooleanOptional

Whether this metric's name contains only characters supported in formula references.

warningsstring[]Optional

Warning messages, e.g. when the metric name contains hyphens or symbols and cannot be referenced from formulas.

formulastringOptional

Present for formula metrics. References other metrics in braces.

Example: ({New Contacts} / {Total Contacts}) * 100
prefixstringOptional

Display prefix for a formula metric.

suffixstringOptional

Display suffix for a formula metric

patch/scorecards/custom_metrics/{id}
PATCH /v3/scorecards/custom_metrics/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 100

{
  "name": "text",
  "metric_date": "add_date",
  "query": {
    "segment_users": [
      {}
    ],
    "with_or_segment_users": [
      {}
    ]
  }
}
200

The updated metric.

{
  "object": "custom_metric",
  "id": "cmt_6520f7e8a17700005f006059",
  "name": "text",
  "kind": "segment",
  "metric_date": "text",
  "is_formula_referenceable": true,
  "warnings": [
    "text"
  ],
  "query": {
    "segment_users": [
      {}
    ],
    "with_or_segment_users": [
      {}
    ]
  },
  "formula": "({New Contacts} / {Total Contacts}) * 100",
  "prefix": "text",
  "suffix": "text"
}

Delete a custom metric.

delete

Removes the definition permanently.

Refused with 409 metric_in_use while any scorecard still references the metric by name, and the error names those scorecards. Without that check the scorecard would keep the name and render an empty tile with no error anywhere.

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
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
Responses
204

Deleted.

No content

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

No content

List the metric names a scorecard can reference.

get

Every metric name valid on this account: the built-in metrics grouped by category, plus the account's own custom and formula metrics.

A scorecard's metrics[] stores these names verbatim and matches them exactly. A name that is not in this catalog is rejected on create and update; before that check existed, it saved cleanly and rendered as an empty tile.

Three groups come back:

  • builtin β€” the fixed metrics, keyed by category (Contacts, Customers, Sales, User Activity, Contacts Activity, Business Metrics).

  • custom_metrics β€” account-defined metrics that count the contacts matching a saved query.

  • formula_metrics β€” metrics computed from other metrics, with the expression and its display prefix/suffix. The expression references other metrics in braces, e.g. ({New Contacts} / {Total Contacts}) * 100.

all_names is the flat union, which is what metrics[] is validated against.

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.

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
Responses
200

The metric catalog for this account.

application/json

The metric names a scorecard may reference on this account.

objectstring Β· enumOptionalPossible values:
all_namesstring[]Optional

Flat union of every valid name. This is what metrics[] is checked against.

not_referenceablestring[]Optional

Metric names that exist and can be placed on a scorecard, but cannot be referenced inside formulas because of special characters (e.g. %, #, -).

notestringOptional

Advisory note indicating that scorecard metrics must match all_names exactly and unknown names are rejected with 422.

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

The metric catalog for this account.

{
  "object": "metric_catalog",
  "builtin": {
    "Contacts": [
      "New Contacts",
      "Total Contacts",
      "Contacts Engaged"
    ]
  },
  "custom_metrics": [
    {
      "name": "text",
      "has_criteria": true
    }
  ],
  "formula_metrics": [
    {
      "name": "text",
      "formula": "({New Contacts} / {Total Contacts}) * 100",
      "prefix": "text",
      "suffix": "%"
    }
  ],
  "all_names": [
    "text"
  ],
  "not_referenceable": [
    "text"
  ],
  "note": "text"
}

List scorecards.

get

Account-wide β€” not scoped by workroom (see the Scorecards tag description and workroom_scoped on each item). Filters: ?filter[breakdown]=..., ?filter[type]=..., ?filter[name]=... (case-insensitive prefix). Sortable fields: created_at (default, descending), name.

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.

sortstringOptional

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

Example: -created_at,email
include_valuesbooleanOptional

Whether to include metrics_values in each scorecard item. Defaults to false to keep response size manageable. Set to true to include full calculated metric values.

Default: false
Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
200

OK

application/json
objectconst: listRequired
has_morebooleanRequired

True if additional records exist beyond this page.

next_cursorstring Β· nullableRequired

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

prev_cursorstring Β· nullableRequired

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

get/scorecards
GET /v3/scorecards HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "text",
  "data": [
    {
      "id": "text",
      "object": "scorecard",
      "name": "text",
      "type": "text",
      "breakdown": "text",
      "metrics": [
        "text"
      ],
      "pipeline_ids": [
        "text"
      ],
      "total_rollup": true,
      "responsible_user_role": "text",
      "responsible_user_ids": [
        "text"
      ],
      "location_type": "text",
      "location_ids": [
        "text"
      ],
      "workroom_type": "text",
      "workroom_ids": [
        "text"
      ],
      "workroom_scoped": true,
      "scope_note": "text",
      "calculation_status": "pending",
      "calculation_error": "text",
      "metrics_calculated_at": "2026-05-27T14:23:11.482Z",
      "metrics_values": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "inactive": true,
      "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 scorecard.

post

Writes only the scorecard definition β€” metric values are computed asynchronously by the existing periodic dashboard cron (Cron::calculateScorecards()), the same job that has always computed them for dashboard-created scorecards; this endpoint does not trigger it synchronously. Returns 202, not 201: the response body is the full definition with calculation_status: "pending", not yet-computed values. Poll GET /scorecards/{id} for calculation_status to flip to completed.

Requires the name and what it measures. 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.

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
namestringRequired
typestring Β· enumRequired

Case-insensitive; stored canonical. Any other value is a 422. See the Scorecard schema.

Possible values:
breakdownstring Β· enumRequired

Case-insensitive; stored canonical. Any other value is a 422, as is None with type Table. See the Scorecard schema.

Possible values:
metricsstring[] Β· min: 1Required

Non-empty array of metric names. Every element must be a non-empty string.

pipeline_idsstring[]Optional
total_rollupbooleanOptionalDefault: false
responsible_user_rolestringOptional

Required (defaults to All) when breakdown is Responsible User. Use Specific Users with responsible_user_ids to restrict.

responsible_user_idsstring[]Optional

Only used when responsible_user_role is Specific Users. Accepts usr_-prefixed or raw ids; stored raw.

location_typestringOptional

Required (defaults to All) when breakdown is Location. Use Specific Locations with location_ids to restrict.

location_idsstring[]Optional

Only used when location_type is Specific Locations.

workroom_typestringOptional

Report-breakdown dimension only β€” see the Scorecard schema. Required (defaults to All) when breakdown is Workroom. Use Specific Workrooms with workroom_ids to restrict.

workroom_idsstring[]Optional

Only used when workroom_type is Specific Workrooms. Accepts wrm_-prefixed or raw ids; stored raw.

Responses
202

Scorecard definition created; metric calculation is pending.

application/json

Account-wide metrics table. Shaped identically regardless of whether the underlying doc was created by this API or by the legacy dashboard (Apps::ajaxSaveScorecard()) β€” both write the same fields to the same scorecards collection.

idstringOptionalPattern: ^scr_[0-9a-f]{24}$
objectstring Β· enumOptionalPossible values:
namestringOptional
typestringOptional

Chart/display type β€” one of Table, Metric, Line, Bar, Trend (the values the dashboard renders; Trend is legacy and charted like Line). Writes accept these case-insensitively (also # Metric, bar_chart, ...) and store the canonical spelling; anything else is a 422. Scorecards saved before this check may still carry another value.

breakdownstringOptional

How rows are sliced β€” one of None (aggregate only), Source, Location, Workroom, Responsible User. Writes accept these case-insensitively (also responsible_user, staff, aggregate) and store the canonical spelling; anything else is a 422. None is not available with type Table (as in the dashboard). Only Responsible User, Location, and Workroom have corresponding *_type/*_ids side fields (see below); None and Source leave all three side-field groups null.

metricsstring[]Optional

Metric names to track (e.g. "New Contacts", "Total Contacts"). Every element must be a non-empty string β€” an object or other non-string element is rejected with a 400/422, not silently coerced.

pipeline_idsstring[]Optional

Optional. Restricts pipeline-related metrics to these pipelines.

total_rollupbooleanOptional

Add a combined total-rollup row across all breakdown groups.

responsible_user_rolestring Β· nullableOptional

Only populated when breakdown is Responsible User. Dashboard UI offers All, Admin, WorkroomAdmin, Marketing, Sales, Analyst, Specific Users.

responsible_user_idsstring[] Β· nullableOptional

Raw staff-record ids (not usr_-prefixed) β€” only populated when responsible_user_role is Specific Users.

location_typestring Β· nullableOptional

Only populated when breakdown is Location. Dashboard UI offers All, Specific Locations.

location_idsstring[] Β· nullableOptional

Raw location values β€” only populated when location_type is Specific Locations.

workroom_typestring Β· nullableOptional

Report-breakdown dimension only β€” unrelated to the Gleantap-Workroom request-scoping header/query. Only populated when breakdown is Workroom. Dashboard UI offers All, Specific Workrooms.

workroom_idsstring[] Β· nullableOptional

Raw workroom ids β€” only populated when workroom_type is Specific Workrooms.

workroom_scopedbooleanOptional

Always false. The underlying scorecards collection has no app_id/workroom field at all, so this resource is account-wide regardless of any Gleantap-Workroom header/?workroom= hint on the request β€” see scope_note.

scope_notestringOptional

Plain-English restatement of workroom_scoped, always present so a caller does not have to infer scoping behavior from testing.

calculation_statusstring Β· enumOptional

Derived from the same fields the existing periodic Cron::calculateScorecards() sweep reads/writes on this same doc β€” this endpoint never computes metric values itself. A fresh scorecard reads pending until that sweep's next pass. Editing a scorecard (PATCH) clears its last calculation time, so it reads pending until the sweep recalculates it. A scorecard that completed calculation but produced no metric values reads error with an explanation in calculation_error. The sweep runs overnight (01:06–09:45 UTC); until then the dashboard shows the previous values, and its refresh button recalculates on demand.

Possible values:
calculation_errorstring Β· nullableOptional

Explanation when calculation_status is error (e.g. calculation failed or produced no metric values).

metrics_calculated_atstring Β· date-time Β· nullableOptional

RFC 3339 timestamp, always UTC, millisecond precision.

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

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

{
  "name": "Rep Performance",
  "type": "Table",
  "breakdown": "Responsible User",
  "responsible_user_role": "All",
  "metrics": [
    "New Contacts",
    "Total Contacts"
  ]
}
{
  "id": "text",
  "object": "scorecard",
  "name": "text",
  "type": "text",
  "breakdown": "text",
  "metrics": [
    "text"
  ],
  "pipeline_ids": [
    "text"
  ],
  "total_rollup": true,
  "responsible_user_role": "text",
  "responsible_user_ids": [
    "text"
  ],
  "location_type": "text",
  "location_ids": [
    "text"
  ],
  "workroom_type": "text",
  "workroom_ids": [
    "text"
  ],
  "workroom_scoped": true,
  "scope_note": "text",
  "calculation_status": "pending",
  "calculation_error": "text",
  "metrics_calculated_at": "2026-05-27T14:23:11.482Z",
  "metrics_values": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "inactive": true,
  "created_at": "2026-05-27T14:23:11.482Z",
  "updated_at": "2026-05-27T14:23:11.482Z"
}

Retrieve one scorecard.

get

A scorecard's definition and its current metric values.

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
idstringRequiredPattern: ^scr_[0-9a-f]{24}$
Header parameters
Gleantap-VersionstringOptional

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

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

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

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

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

Example: acc_59fca1e3d2a57d28a10b0442
Gleantap-WorkroomstringOptional

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

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

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

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

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

Example: G Test1
Responses
200

OK

application/json

Account-wide metrics table. Shaped identically regardless of whether the underlying doc was created by this API or by the legacy dashboard (Apps::ajaxSaveScorecard()) β€” both write the same fields to the same scorecards collection.

idstringOptionalPattern: ^scr_[0-9a-f]{24}$
objectstring Β· enumOptionalPossible values:
namestringOptional
typestringOptional

Chart/display type β€” one of Table, Metric, Line, Bar, Trend (the values the dashboard renders; Trend is legacy and charted like Line). Writes accept these case-insensitively (also # Metric, bar_chart, ...) and store the canonical spelling; anything else is a 422. Scorecards saved before this check may still carry another value.

breakdownstringOptional

How rows are sliced β€” one of None (aggregate only), Source, Location, Workroom, Responsible User. Writes accept these case-insensitively (also responsible_user, staff, aggregate) and store the canonical spelling; anything else is a 422. None is not available with type Table (as in the dashboard). Only Responsible User, Location, and Workroom have corresponding *_type/*_ids side fields (see below); None and Source leave all three side-field groups null.

metricsstring[]Optional

Metric names to track (e.g. "New Contacts", "Total Contacts"). Every element must be a non-empty string β€” an object or other non-string element is rejected with a 400/422, not silently coerced.

pipeline_idsstring[]Optional

Optional. Restricts pipeline-related metrics to these pipelines.

total_rollupbooleanOptional

Add a combined total-rollup row across all breakdown groups.

responsible_user_rolestring Β· nullableOptional

Only populated when breakdown is Responsible User. Dashboard UI offers All, Admin, WorkroomAdmin, Marketing, Sales, Analyst, Specific Users.

responsible_user_idsstring[] Β· nullableOptional

Raw staff-record ids (not usr_-prefixed) β€” only populated when responsible_user_role is Specific Users.

location_typestring Β· nullableOptional

Only populated when breakdown is Location. Dashboard UI offers All, Specific Locations.

location_idsstring[] Β· nullableOptional

Raw location values β€” only populated when location_type is Specific Locations.

workroom_typestring Β· nullableOptional

Report-breakdown dimension only β€” unrelated to the Gleantap-Workroom request-scoping header/query. Only populated when breakdown is Workroom. Dashboard UI offers All, Specific Workrooms.

workroom_idsstring[] Β· nullableOptional

Raw workroom ids β€” only populated when workroom_type is Specific Workrooms.

workroom_scopedbooleanOptional

Always false. The underlying scorecards collection has no app_id/workroom field at all, so this resource is account-wide regardless of any Gleantap-Workroom header/?workroom= hint on the request β€” see scope_note.

scope_notestringOptional

Plain-English restatement of workroom_scoped, always present so a caller does not have to infer scoping behavior from testing.

calculation_statusstring Β· enumOptional

Derived from the same fields the existing periodic Cron::calculateScorecards() sweep reads/writes on this same doc β€” this endpoint never computes metric values itself. A fresh scorecard reads pending until that sweep's next pass. Editing a scorecard (PATCH) clears its last calculation time, so it reads pending until the sweep recalculates it. A scorecard that completed calculation but produced no metric values reads error with an explanation in calculation_error. The sweep runs overnight (01:06–09:45 UTC); until then the dashboard shows the previous values, and its refresh button recalculates on demand.

Possible values:
calculation_errorstring Β· nullableOptional

Explanation when calculation_status is error (e.g. calculation failed or produced no metric values).

metrics_calculated_atstring Β· date-time Β· nullableOptional

RFC 3339 timestamp, always UTC, millisecond precision.

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

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/scorecards/{id}
GET /v3/scorecards/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "text",
  "object": "scorecard",
  "name": "text",
  "type": "text",
  "breakdown": "text",
  "metrics": [
    "text"
  ],
  "pipeline_ids": [
    "text"
  ],
  "total_rollup": true,
  "responsible_user_role": "text",
  "responsible_user_ids": [
    "text"
  ],
  "location_type": "text",
  "location_ids": [
    "text"
  ],
  "workroom_type": "text",
  "workroom_ids": [
    "text"
  ],
  "workroom_scoped": true,
  "scope_note": "text",
  "calculation_status": "pending",
  "calculation_error": "text",
  "metrics_calculated_at": "2026-05-27T14:23:11.482Z",
  "metrics_values": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "inactive": true,
  "created_at": "2026-05-27T14:23:11.482Z",
  "updated_at": "2026-05-27T14:23:11.482Z"
}

Update a scorecard definition.

patch

Partial update β€” only send the fields you want to change. Per update_for_account(), any successful update unconditionally queues the scorecard for recalculation (calculation_status reverts to pending) regardless of which fields changed β€” there is no field-level diffing that skips recalculation for a cosmetic-only change (e.g. renaming). This matches the legacy dashboard's own full-form save behavior. Changing breakdown recomputes all three breakdown side-field groups (responsible_user_*, location_*, workroom_*) from this same request body β€” the other two groups are cleared.

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
idstringRequiredPattern: ^scr_[0-9a-f]{24}$
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

Fields to update on a scorecard. All fields are optional.

namestringOptional
typestring Β· enumOptional

Case-insensitive; stored canonical. Any other value is a 422. See the Scorecard schema.

Possible values:
breakdownstring Β· enumOptional

Case-insensitive; stored canonical. Any other value is a 422, as is None with type Table. See the Scorecard schema.

Possible values:
metricsstring[] Β· min: 1Optional

Non-empty array of metric names. Every element must be a non-empty string.

pipeline_idsstring[]Optional
total_rollupbooleanOptionalDefault: false
responsible_user_rolestringOptional

Used when breakdown is Responsible User. Use Specific Users with responsible_user_ids to restrict.

responsible_user_idsstring[]Optional

Only used when responsible_user_role is Specific Users. Accepts usr_-prefixed or raw ids; stored raw.

location_typestringOptional

Used when breakdown is Location. Use Specific Locations with location_ids to restrict.

location_idsstring[]Optional

Only used when location_type is Specific Locations.

workroom_typestringOptional

Report-breakdown dimension only β€” see the Scorecard schema. Used when breakdown is Workroom. Use Specific Workrooms with workroom_ids to restrict.

workroom_idsstring[]Optional

Only used when workroom_type is Specific Workrooms. Accepts wrm_-prefixed or raw ids; stored raw.

Responses
200

OK β€” definition updated synchronously; recalculation is still async (see calculation_status).

application/json

Account-wide metrics table. Shaped identically regardless of whether the underlying doc was created by this API or by the legacy dashboard (Apps::ajaxSaveScorecard()) β€” both write the same fields to the same scorecards collection.

idstringOptionalPattern: ^scr_[0-9a-f]{24}$
objectstring Β· enumOptionalPossible values:
namestringOptional
typestringOptional

Chart/display type β€” one of Table, Metric, Line, Bar, Trend (the values the dashboard renders; Trend is legacy and charted like Line). Writes accept these case-insensitively (also # Metric, bar_chart, ...) and store the canonical spelling; anything else is a 422. Scorecards saved before this check may still carry another value.

breakdownstringOptional

How rows are sliced β€” one of None (aggregate only), Source, Location, Workroom, Responsible User. Writes accept these case-insensitively (also responsible_user, staff, aggregate) and store the canonical spelling; anything else is a 422. None is not available with type Table (as in the dashboard). Only Responsible User, Location, and Workroom have corresponding *_type/*_ids side fields (see below); None and Source leave all three side-field groups null.

metricsstring[]Optional

Metric names to track (e.g. "New Contacts", "Total Contacts"). Every element must be a non-empty string β€” an object or other non-string element is rejected with a 400/422, not silently coerced.

pipeline_idsstring[]Optional

Optional. Restricts pipeline-related metrics to these pipelines.

total_rollupbooleanOptional

Add a combined total-rollup row across all breakdown groups.

responsible_user_rolestring Β· nullableOptional

Only populated when breakdown is Responsible User. Dashboard UI offers All, Admin, WorkroomAdmin, Marketing, Sales, Analyst, Specific Users.

responsible_user_idsstring[] Β· nullableOptional

Raw staff-record ids (not usr_-prefixed) β€” only populated when responsible_user_role is Specific Users.

location_typestring Β· nullableOptional

Only populated when breakdown is Location. Dashboard UI offers All, Specific Locations.

location_idsstring[] Β· nullableOptional

Raw location values β€” only populated when location_type is Specific Locations.

workroom_typestring Β· nullableOptional

Report-breakdown dimension only β€” unrelated to the Gleantap-Workroom request-scoping header/query. Only populated when breakdown is Workroom. Dashboard UI offers All, Specific Workrooms.

workroom_idsstring[] Β· nullableOptional

Raw workroom ids β€” only populated when workroom_type is Specific Workrooms.

workroom_scopedbooleanOptional

Always false. The underlying scorecards collection has no app_id/workroom field at all, so this resource is account-wide regardless of any Gleantap-Workroom header/?workroom= hint on the request β€” see scope_note.

scope_notestringOptional

Plain-English restatement of workroom_scoped, always present so a caller does not have to infer scoping behavior from testing.

calculation_statusstring Β· enumOptional

Derived from the same fields the existing periodic Cron::calculateScorecards() sweep reads/writes on this same doc β€” this endpoint never computes metric values itself. A fresh scorecard reads pending until that sweep's next pass. Editing a scorecard (PATCH) clears its last calculation time, so it reads pending until the sweep recalculates it. A scorecard that completed calculation but produced no metric values reads error with an explanation in calculation_error. The sweep runs overnight (01:06–09:45 UTC); until then the dashboard shows the previous values, and its refresh button recalculates on demand.

Possible values:
calculation_errorstring Β· nullableOptional

Explanation when calculation_status is error (e.g. calculation failed or produced no metric values).

metrics_calculated_atstring Β· date-time Β· nullableOptional

RFC 3339 timestamp, always UTC, millisecond precision.

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

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

{
  "name": "text",
  "type": "Table",
  "breakdown": "None",
  "metrics": [
    "text"
  ],
  "pipeline_ids": [
    "text"
  ],
  "total_rollup": false,
  "responsible_user_role": "text",
  "responsible_user_ids": [
    "text"
  ],
  "location_type": "text",
  "location_ids": [
    "text"
  ],
  "workroom_type": "text",
  "workroom_ids": [
    "text"
  ]
}
{
  "id": "text",
  "object": "scorecard",
  "name": "text",
  "type": "text",
  "breakdown": "text",
  "metrics": [
    "text"
  ],
  "pipeline_ids": [
    "text"
  ],
  "total_rollup": true,
  "responsible_user_role": "text",
  "responsible_user_ids": [
    "text"
  ],
  "location_type": "text",
  "location_ids": [
    "text"
  ],
  "workroom_type": "text",
  "workroom_ids": [
    "text"
  ],
  "workroom_scoped": true,
  "scope_note": "text",
  "calculation_status": "pending",
  "calculation_error": "text",
  "metrics_calculated_at": "2026-05-27T14:23:11.482Z",
  "metrics_values": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "inactive": true,
  "created_at": "2026-05-27T14:23:11.482Z",
  "updated_at": "2026-05-27T14:23:11.482Z"
}
delete

'No reference-counting or force needed β€” a scorecard is a read-only report over other entities; nothing else in the data model references a scorecard by id.'

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
idstringRequiredPattern: ^scr_[0-9a-f]{24}$
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/scorecards/{id}
DELETE /v3/scorecards/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content