Secondary Objects
Records synced from connected systems (Mindbody, Mariana Tek, Zenoti, ClubReady, ABC Fitness, and others) β memberships, classes, products, packages, and so on. Each record has a type plus type-specific properties; /secondary_object_schemas describes the fields for each type. Read-only.
Returns the secondary object type values usable in GET /secondary_objects?filter[type]=....
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.
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=.
acc_59fca1e3d2a57d28a10b0442Which 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.
G Test1OK
True if additional records exist beyond this page.
Opaque cursor for the next page. Null on the last page.
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 /v3/secondary_object_schemas HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
{
"object": "text",
"data": [
{
"type": "text",
"object": "secondary_object_schema",
"fields": [
{
"name": "text",
"type": "text"
}
]
}
],
"has_more": true,
"next_cursor": "text",
"prev_cursor": "text"
}The field definitions for a workroom-defined object type, which is what makes its records interpretable. Read-only.
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.
membershipTarget 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=.
acc_59fca1e3d2a57d28a10b0442OK
The object type this schema describes (e.g. "membership").
The resource doesn't exist or isn't visible to this caller.
GET /v3/secondary_object_schemas/{type} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"type": "text",
"object": "secondary_object_schema",
"fields": [
{
"name": "text",
"type": "text"
}
]
}filter[type] is REQUIRED β narrow to one type per request. Optional filter[q] matches on the name field (case-insensitive substring).
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.
Page size. Default 25, max 100.
25Opaque 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.
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=.
acc_59fca1e3d2a57d28a10b0442Which 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.
G Test1OK
True if additional records exist beyond this page.
Opaque cursor for the next page. Null on the last page.
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 /v3/secondary_objects?filter=[object+Object] HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
{
"object": "text",
"data": [
{
"id": "text",
"object": "secondary_object",
"type": "text",
"properties": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"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"
}A single record of a workroom-defined object type β memberships, products, classes and similar. Read-only. listSecondaryObjectSchemas returns which types exist.
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.
^sobj_[0-9a-f]{24}$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=.
acc_59fca1e3d2a57d28a10b0442OK
A single record of an externally-synced object (a membership, a product, a class, a package, etc.). type identifies the schema; properties is the type-specific field bag. Consult /secondary_object_schemas/{type} for the expected fields.
^sobj_[0-9a-f]{24}$The object type. Common values: membership, product, class, package. Check /secondary_object_schemas for what this workroom uses.
RFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZThe resource doesn't exist or isn't visible to this caller.
GET /v3/secondary_objects/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "text",
"object": "secondary_object",
"type": "text",
"properties": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"created_at": "2026-05-27T14:23:11.482Z",
"updated_at": "2026-05-27T14:23:11.482Z"
}