Flows
Multi-step automations. Contacts are enrolled based on segment membership (or manually via POST /flows/{id}/enroll) and move through the flow's steps. Use GET /flows/schema to see the supported node types and their settings.
Paginated list. Common filters: ?filter[status]=active, ?filter[name]=welcome (case-insensitive prefix). ?fields=name,status keeps only those top-level fields (plus id, object). Flows in a list never include nodes. Rate limit bucket: read.
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.
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.
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.
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.
-created_at,emailSparse fieldset β comma-separated list of fields to include in the response. Reduces payload size on high-volume reads. Nested field access is not supported; request the parent object.
id,email,phone,tagsMinor 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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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 Test1A page of flows.
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/flows HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
A page of flows.
{
"object": "text",
"data": [
{
"id": "flw_01H8XKV...",
"object": "text",
"name": "text",
"description": "text",
"status": "draft",
"workroom_id": "wrm_5ace370fd2a57d74d0548fb2",
"entry": {
"segment_ids": [
"seg_01H8XKE..."
],
"segments": [
{
"id": "seg_01H8XKE...",
"object": "segment",
"type": "dynamic",
"name": "Active VIPs in Mumbai",
"description": "VIP-tagged members who checked in or purchased recently",
"query": {
"segment_users": [
{
"segment": "Tags",
"operator": "Contains",
"value": [
"vip"
]
},
{
"segment": "City",
"operator": "=",
"value": [
"Mumbai"
]
}
]
},
"size": 1247,
"email_count": 1188,
"phone_count": 1201,
"last_evaluated_at": "2026-05-27T14:00:00Z",
"created_at": "2026-04-01T09:00:00Z",
"updated_at": "2026-05-27T14:00:00Z"
}
],
"unenroll_segment_ids": [
"seg_01H8XKE..."
],
"unenroll_segments": [
{
"id": "seg_01H8XKE...",
"object": "segment",
"type": "dynamic",
"name": "Active VIPs in Mumbai",
"description": "VIP-tagged members who checked in or purchased recently",
"query": {
"segment_users": [
{
"segment": "Tags",
"operator": "Contains",
"value": [
"vip"
]
},
{
"segment": "City",
"operator": "=",
"value": [
"Mumbai"
]
}
]
},
"size": 1247,
"email_count": 1188,
"phone_count": 1201,
"last_evaluated_at": "2026-05-27T14:00:00Z",
"created_at": "2026-04-01T09:00:00Z",
"updated_at": "2026-05-27T14:00:00Z"
}
],
"manual_only": false,
"reenroll": false,
"end_date_time": "2026-05-27T14:23:11.482Z",
"segment_criteria": {
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
],
"exclude_segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
}
},
"nodes": [
{
"id": "text",
"type": "email_campaign",
"parent_id": "text",
"parent_branch": "root",
"action_name": "text",
"campaign_id": "cam_6a7eaec3505bea795709f897",
"template_id": "tpl_6ab24872ba90b88e270b4904",
"subject": "text",
"message_body": "text",
"preheader_text": "text",
"from_name": "text",
"from_email": "[email protected]",
"from_number": "text",
"schedule": "Relative",
"delayTimeHour": 1,
"delayTimetype": "minutes",
"selected_date": "2026-01-01",
"selected_time": "text",
"action_type": "yes_no",
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
],
"multi_conditions": [
{
"value": "text",
"is_other": false,
"name_alias": "text",
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
]
}
],
"salesautomation_id": "text",
"sales_automation": {
"action": {
"type": "tags",
"tag_names": [
"text"
],
"task_name": "text",
"description": "text",
"due_at": "2026-05-27T14:23:11.482Z",
"due_in_days": 1,
"assignee_staff_id": "text",
"assignee_staff_ids": [
"text"
],
"assignee_mode": "Owner",
"task_type": "text",
"stage_id": "text",
"staff_ids": [
"text"
],
"distribution": "All",
"reassign": false,
"value": "text",
"note": "text",
"flow_id": "text",
"applies_to": "All"
},
"actions": [
{
"type": "tags",
"tag_names": [
"text"
],
"task_name": "text",
"description": "text",
"due_at": "2026-05-27T14:23:11.482Z",
"due_in_days": 1,
"assignee_staff_id": "text",
"assignee_staff_ids": [
"text"
],
"assignee_mode": "Owner",
"task_type": "text",
"stage_id": "text",
"staff_ids": [
"text"
],
"distribution": "All",
"reassign": false,
"value": "text",
"note": "text",
"flow_id": "text",
"applies_to": "All"
}
]
},
"webhook_url": "https://example.com",
"webhook_method": "GET",
"webhook_payload_type": "json",
"webhook_fields": [
{
"key": "text",
"value": "text"
}
],
"webhook_header_fields": [
{
"key": "text",
"value": "text"
}
],
"mariana_action": {
"type": "pack",
"package_id": "text",
"package_name": "text",
"credit_id": "text",
"credit_name": "text",
"quantity": 1,
"expiry_days": "text",
"amount": 1,
"currency": "text",
"note": "text",
"if_not_found": "create",
"recipient": "contact"
}
}
],
"stats": {
"active_runs": 1,
"completed_runs": 1,
"entered": 1,
"unenrolled": 1
},
"conversion_config": {
"conversion_ids": [
"text"
],
"attribution_window_days": 1
},
"timezone": "America/New_York",
"created_at": "2026-05-27T14:23:11.482Z",
"updated_at": "2026-05-27T14:23:11.482Z",
"published_at": "2026-05-27T14:23:11.482Z",
"archived_at": "2026-05-27T14:23:11.482Z",
"created_by_user_id": "usr_01H8XL7...",
"metadata": {
"our_crm_id": "cust_884321",
"sync_batch": "2026-05-imports"
}
}
],
"has_more": true,
"next_cursor": "text",
"prev_cursor": "text"
}Creates a flow in draft status β nothing enrolls until POST /v3/flows/{id}/publish. The DAG is validated at save (cycle detection, orphan-parent detection, node-type-specific field checks). Rate limit bucket: write.
CRITICAL for email_campaign and sms_campaign nodes: provide actual content. Each such node MUST specify one of:
inline
subject+message_body(+ optionalpreheader_text,from_name,from_emailfor email)template_idreferencing a templatecampaign_idreferencing a campaign that already has content
A campaign-type node with none of these creates an empty shadow campaign that the send worker will refuse to fire. Flow message nodes need finished copy: blank or stubbed subject lines and bodies are what the flow will actually send. from_name/from_email/from_number inherit from the workroom's app defaults when omitted, so it's fine to leave those unset.
CRITICAL: set the enrollment trigger. entry.segment_ids is what makes the flow fire, and publishing is refused without it (no_entry_segment) because an empty entry segment would enroll the whole workroom. A flow created with an empty entry comes back with a no_entry_trigger warning, cannot be published, and shows an empty "Enroll the audience" panel in the dashboard. Entry is by segment membership, so a trigger expressed in words ("when someone cancels", "new leads") corresponds to a segment that has to exist and be attached here. A flow with no entry.segment_ids is created but never enrols anyone.
The flow is placed in the workroom that owns entry.segment_ids, so you normally don't pass workroom at all. Segments from two different workrooms in one flow are rejected. Response warnings[] names any ID that could not be attached (unknown_segment_id:β¦, cross_workroom_segment_id:β¦), so a flow can be created with its trigger silently unattached.
describeSegmentSchema (GET /v3/segments/schema) returns the available categories. Concepts with a first-class category resolve against that category rather than a custom field; see createSegment for the full rule.
Requires a name, an entry audience (entry.segment_ids) and the step definitions. Optional fields fall back to a server-side default when omitted, including the workroom β an omitted workroom resolves to the account default, and a flow created in the wrong workroom is invisible where it was expected.
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.
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.
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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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 Test1A unique key (β€255 chars) chosen by the client. Replays with the same key + same body return the cached response. Replays with the same key + different body return 409 idempotency_conflict. Required on messaging sends and bulk operations; recommended elsewhere.
8e3c7a90-7c4d-4f8e-8e3c-7a907c4d4f8eCreates a draft flow. Nothing enrolls until POST /v3/flows/{id}/publish. The DAG is validated at save time (cycle detection, orphan-parent detection, node-type-specific field requirements).
IANA timezone name.
America/New_YorkDraft flow created.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$draft β never published. active β published and enrolling. inactive β unpublished; in-flight runs continue but no new entries. paused β enrollment and step execution both halted; can be resumed. completed β end_date_time passed. archived β soft-deleted.
The workroom this flow lives in. Its entry.segment_ids must all belong to the same workroom.
wrm_5ace370fd2a57d74d0548fb2Pattern: ^wrm_[0-9a-f]{24}$Timezone used to interpret delay node "Specific Date & Time" values. Defaults to the account timezone.
America/New_YorkRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482Zusr_01H8XL7...Pattern: ^usr_[0-9A-HJKMNP-TV-Z]{26}$Request could not be parsed or failed validation.
Semantic validation failed β the request is well-formed but references an object in the wrong state (e.g., sending to an opted-out contact).
POST /v3/flows HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 693
{
"name": "Welcome sequence",
"entry": {
"segment_ids": [
"seg_new_signups"
],
"reenroll": false
},
"nodes": [
{
"id": "n1",
"type": "email_campaign",
"parent_branch": "root",
"campaign_id": "cam_welcome_email",
"action_name": "Welcome email"
},
{
"id": "n2",
"type": "delay",
"parent_id": "n1",
"parent_branch": "next",
"schedule": "Relative",
"delayTimeHour": 2,
"delayTimetype": "days"
},
{
"id": "n3",
"type": "condition",
"parent_id": "n2",
"parent_branch": "next",
"action_type": "yes_no",
"segment_users": [
{
"segment": "EmailCampaigns",
"data": "opened_an_email",
"operator": "Is One Of",
"data_type": "List",
"value": [
"cam_welcome_email"
]
}
]
},
{
"id": "n4",
"type": "sms_campaign",
"parent_id": "n3",
"parent_branch": "no",
"campaign_id": "cam_welcome_sms"
}
]
}{
"id": "flw_01H8XKV...",
"object": "text",
"name": "text",
"description": "text",
"status": "draft",
"workroom_id": "wrm_5ace370fd2a57d74d0548fb2",
"entry": {
"segment_ids": [
"seg_01H8XKE..."
],
"segments": [
{
"id": "seg_01H8XKE...",
"object": "segment",
"type": "dynamic",
"name": "Active VIPs in Mumbai",
"description": "VIP-tagged members who checked in or purchased recently",
"query": {
"segment_users": [
{
"segment": "Tags",
"operator": "Contains",
"value": [
"vip"
]
},
{
"segment": "City",
"operator": "=",
"value": [
"Mumbai"
]
}
]
},
"size": 1247,
"email_count": 1188,
"phone_count": 1201,
"last_evaluated_at": "2026-05-27T14:00:00Z",
"created_at": "2026-04-01T09:00:00Z",
"updated_at": "2026-05-27T14:00:00Z"
}
],
"unenroll_segment_ids": [
"seg_01H8XKE..."
],
"unenroll_segments": [
{
"id": "seg_01H8XKE...",
"object": "segment",
"type": "dynamic",
"name": "Active VIPs in Mumbai",
"description": "VIP-tagged members who checked in or purchased recently",
"query": {
"segment_users": [
{
"segment": "Tags",
"operator": "Contains",
"value": [
"vip"
]
},
{
"segment": "City",
"operator": "=",
"value": [
"Mumbai"
]
}
]
},
"size": 1247,
"email_count": 1188,
"phone_count": 1201,
"last_evaluated_at": "2026-05-27T14:00:00Z",
"created_at": "2026-04-01T09:00:00Z",
"updated_at": "2026-05-27T14:00:00Z"
}
],
"manual_only": false,
"reenroll": false,
"end_date_time": "2026-05-27T14:23:11.482Z",
"segment_criteria": {
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
],
"exclude_segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
}
},
"nodes": [
{
"id": "text",
"type": "email_campaign",
"parent_id": "text",
"parent_branch": "root",
"action_name": "text",
"campaign_id": "cam_6a7eaec3505bea795709f897",
"template_id": "tpl_6ab24872ba90b88e270b4904",
"subject": "text",
"message_body": "text",
"preheader_text": "text",
"from_name": "text",
"from_email": "[email protected]",
"from_number": "text",
"schedule": "Relative",
"delayTimeHour": 1,
"delayTimetype": "minutes",
"selected_date": "2026-01-01",
"selected_time": "text",
"action_type": "yes_no",
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
],
"multi_conditions": [
{
"value": "text",
"is_other": false,
"name_alias": "text",
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
]
}
],
"salesautomation_id": "text",
"sales_automation": {
"action": {
"type": "tags",
"tag_names": [
"text"
],
"task_name": "text",
"description": "text",
"due_at": "2026-05-27T14:23:11.482Z",
"due_in_days": 1,
"assignee_staff_id": "text",
"assignee_staff_ids": [
"text"
],
"assignee_mode": "Owner",
"task_type": "text",
"stage_id": "text",
"staff_ids": [
"text"
],
"distribution": "All",
"reassign": false,
"value": "text",
"note": "text",
"flow_id": "text",
"applies_to": "All"
},
"actions": [
{
"type": "tags",
"tag_names": [
"text"
],
"task_name": "text",
"description": "text",
"due_at": "2026-05-27T14:23:11.482Z",
"due_in_days": 1,
"assignee_staff_id": "text",
"assignee_staff_ids": [
"text"
],
"assignee_mode": "Owner",
"task_type": "text",
"stage_id": "text",
"staff_ids": [
"text"
],
"distribution": "All",
"reassign": false,
"value": "text",
"note": "text",
"flow_id": "text",
"applies_to": "All"
}
]
},
"webhook_url": "https://example.com",
"webhook_method": "GET",
"webhook_payload_type": "json",
"webhook_fields": [
{
"key": "text",
"value": "text"
}
],
"webhook_header_fields": [
{
"key": "text",
"value": "text"
}
],
"mariana_action": {
"type": "pack",
"package_id": "text",
"package_name": "text",
"credit_id": "text",
"credit_name": "text",
"quantity": 1,
"expiry_days": "text",
"amount": 1,
"currency": "text",
"note": "text",
"if_not_found": "create",
"recipient": "contact"
}
}
],
"stats": {
"active_runs": 1,
"completed_runs": 1,
"entered": 1,
"unenrolled": 1
},
"conversion_config": {
"conversion_ids": [
"text"
],
"attribution_window_days": 1
},
"timezone": "America/New_York",
"created_at": "2026-05-27T14:23:11.482Z",
"updated_at": "2026-05-27T14:23:11.482Z",
"published_at": "2026-05-27T14:23:11.482Z",
"archived_at": "2026-05-27T14:23:11.482Z",
"created_by_user_id": "usr_01H8XL7...",
"metadata": {
"our_crm_id": "cust_884321",
"sync_batch": "2026-05-imports"
}
}Returns the flow with current stats. Use ?expand=entry.segments to add entry.segments and entry.unenroll_segments (full Segment objects for segment_ids / unenroll_segment_ids); any other expand value is a 422. ?fields= keeps only the listed top-level fields (plus id, object, and entry when expanding).
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.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$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.
Sparse fieldset β comma-separated list of fields to include in the response. Reduces payload size on high-volume reads. Nested field access is not supported; request the parent object.
id,email,phone,tagsComma-separated list of related resources to inline in the response. Without expand, a related field is just the ID string. With expand, it's the full sub-object. Up to two levels deep; max 4 expansions per request.
contact,pipeline,stage,assigneeMinor 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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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 Test1The flow.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$draft β never published. active β published and enrolling. inactive β unpublished; in-flight runs continue but no new entries. paused β enrollment and step execution both halted; can be resumed. completed β end_date_time passed. archived β soft-deleted.
The workroom this flow lives in. Its entry.segment_ids must all belong to the same workroom.
wrm_5ace370fd2a57d74d0548fb2Pattern: ^wrm_[0-9a-f]{24}$Timezone used to interpret delay node "Specific Date & Time" values. Defaults to the account timezone.
America/New_YorkRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482Zusr_01H8XL7...Pattern: ^usr_[0-9A-HJKMNP-TV-Z]{26}$The resource doesn't exist or isn't visible to this caller.
GET /v3/flows/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "flw_01H8XKV...",
"object": "text",
"name": "text",
"description": "text",
"status": "draft",
"workroom_id": "wrm_5ace370fd2a57d74d0548fb2",
"entry": {
"segment_ids": [
"seg_01H8XKE..."
],
"segments": [
{
"id": "seg_01H8XKE...",
"object": "segment",
"type": "dynamic",
"name": "Active VIPs in Mumbai",
"description": "VIP-tagged members who checked in or purchased recently",
"query": {
"segment_users": [
{
"segment": "Tags",
"operator": "Contains",
"value": [
"vip"
]
},
{
"segment": "City",
"operator": "=",
"value": [
"Mumbai"
]
}
]
},
"size": 1247,
"email_count": 1188,
"phone_count": 1201,
"last_evaluated_at": "2026-05-27T14:00:00Z",
"created_at": "2026-04-01T09:00:00Z",
"updated_at": "2026-05-27T14:00:00Z"
}
],
"unenroll_segment_ids": [
"seg_01H8XKE..."
],
"unenroll_segments": [
{
"id": "seg_01H8XKE...",
"object": "segment",
"type": "dynamic",
"name": "Active VIPs in Mumbai",
"description": "VIP-tagged members who checked in or purchased recently",
"query": {
"segment_users": [
{
"segment": "Tags",
"operator": "Contains",
"value": [
"vip"
]
},
{
"segment": "City",
"operator": "=",
"value": [
"Mumbai"
]
}
]
},
"size": 1247,
"email_count": 1188,
"phone_count": 1201,
"last_evaluated_at": "2026-05-27T14:00:00Z",
"created_at": "2026-04-01T09:00:00Z",
"updated_at": "2026-05-27T14:00:00Z"
}
],
"manual_only": false,
"reenroll": false,
"end_date_time": "2026-05-27T14:23:11.482Z",
"segment_criteria": {
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
],
"exclude_segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
}
},
"nodes": [
{
"id": "text",
"type": "email_campaign",
"parent_id": "text",
"parent_branch": "root",
"action_name": "text",
"campaign_id": "cam_6a7eaec3505bea795709f897",
"template_id": "tpl_6ab24872ba90b88e270b4904",
"subject": "text",
"message_body": "text",
"preheader_text": "text",
"from_name": "text",
"from_email": "[email protected]",
"from_number": "text",
"schedule": "Relative",
"delayTimeHour": 1,
"delayTimetype": "minutes",
"selected_date": "2026-01-01",
"selected_time": "text",
"action_type": "yes_no",
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
],
"multi_conditions": [
{
"value": "text",
"is_other": false,
"name_alias": "text",
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
]
}
],
"salesautomation_id": "text",
"sales_automation": {
"action": {
"type": "tags",
"tag_names": [
"text"
],
"task_name": "text",
"description": "text",
"due_at": "2026-05-27T14:23:11.482Z",
"due_in_days": 1,
"assignee_staff_id": "text",
"assignee_staff_ids": [
"text"
],
"assignee_mode": "Owner",
"task_type": "text",
"stage_id": "text",
"staff_ids": [
"text"
],
"distribution": "All",
"reassign": false,
"value": "text",
"note": "text",
"flow_id": "text",
"applies_to": "All"
},
"actions": [
{
"type": "tags",
"tag_names": [
"text"
],
"task_name": "text",
"description": "text",
"due_at": "2026-05-27T14:23:11.482Z",
"due_in_days": 1,
"assignee_staff_id": "text",
"assignee_staff_ids": [
"text"
],
"assignee_mode": "Owner",
"task_type": "text",
"stage_id": "text",
"staff_ids": [
"text"
],
"distribution": "All",
"reassign": false,
"value": "text",
"note": "text",
"flow_id": "text",
"applies_to": "All"
}
]
},
"webhook_url": "https://example.com",
"webhook_method": "GET",
"webhook_payload_type": "json",
"webhook_fields": [
{
"key": "text",
"value": "text"
}
],
"webhook_header_fields": [
{
"key": "text",
"value": "text"
}
],
"mariana_action": {
"type": "pack",
"package_id": "text",
"package_name": "text",
"credit_id": "text",
"credit_name": "text",
"quantity": 1,
"expiry_days": "text",
"amount": 1,
"currency": "text",
"note": "text",
"if_not_found": "create",
"recipient": "contact"
}
}
],
"stats": {
"active_runs": 1,
"completed_runs": 1,
"entered": 1,
"unenrolled": 1
},
"conversion_config": {
"conversion_ids": [
"text"
],
"attribution_window_days": 1
},
"timezone": "America/New_York",
"created_at": "2026-05-27T14:23:11.482Z",
"updated_at": "2026-05-27T14:23:11.482Z",
"published_at": "2026-05-27T14:23:11.482Z",
"archived_at": "2026-05-27T14:23:11.482Z",
"created_by_user_id": "usr_01H8XL7...",
"metadata": {
"our_crm_id": "cust_884321",
"sync_batch": "2026-05-imports"
}
}Editing nodes or entry on an active flow does NOT version-pin in-flight runs β they inherit the new definition. nodes[] replaces the whole DAG, but a node you keep (same id and same type) keeps its internal id, its message's campaign and its condition segment, so contacts already in the flow carry on and are not re-sent steps they had. Pass nodes back with the ids a GET returns (for dashboard-built nodes that is the raw node id). Campaigns, condition segments and CRM rules belonging to removed nodes are deleted, as the dashboard does when you delete a step (send history is kept).
Refused when it would strand contacts. If the flow has in-flight runs and the change removes or retypes a node they are positioned under, or renumbers a not-yet-reached step to at or below where they are (they would skip it), the update returns 409 inflight_runs_affected with the details and nothing is written. Keep those nodes, wait until the runs finish, or retry with ?force=true (the conflicts are then returned as warnings[]). ?dry_run=true returns the same conflicts as warnings without persisting.
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.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$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.
If true, validate + return warnings but don't persist.
falseApply a nodes[] change even though it strands or skips in-flight contacts (see above).
falseMinor 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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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 Test1Partial update. Editing nodes or entry on a live flow does NOT version-pin in-flight runs β they inherit the new definition. Deleted nodes that in-flight contacts have already passed cause the runs to stall; the response includes a warnings[] list flagging affected runs. Add ?dry_run=true to preview warnings without persisting.
IANA timezone name.
America/New_YorkUpdated (or, if ?dry_run=true, what the update would look like).
The updated flow plus advisory warnings about in-flight impact.
Echoes the ?dry_run query param. When true, nothing was persisted.
Request could not be parsed or failed validation.
The resource doesn't exist or isn't visible to this caller.
inflight_runs_affected β see above.
Semantic validation failed β the request is well-formed but references an object in the wrong state (e.g., sending to an opted-out contact).
PATCH /v3/flows/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 4714
{
"name": "text",
"description": "text",
"entry": {
"segment_ids": [
"seg_01H8XKE..."
],
"segments": [
{
"id": "seg_01H8XKE...",
"object": "segment",
"type": "dynamic",
"name": "Active VIPs in Mumbai",
"description": "VIP-tagged members who checked in or purchased recently",
"query": {
"segment_users": [
{
"segment": "Tags",
"operator": "Contains",
"value": [
"vip"
]
},
{
"segment": "City",
"operator": "=",
"value": [
"Mumbai"
]
}
]
},
"size": 1247,
"email_count": 1188,
"phone_count": 1201,
"last_evaluated_at": "2026-05-27T14:00:00Z",
"created_at": "2026-04-01T09:00:00Z",
"updated_at": "2026-05-27T14:00:00Z"
}
],
"unenroll_segment_ids": [
"seg_01H8XKE..."
],
"unenroll_segments": [
{
"id": "seg_01H8XKE...",
"object": "segment",
"type": "dynamic",
"name": "Active VIPs in Mumbai",
"description": "VIP-tagged members who checked in or purchased recently",
"query": {
"segment_users": [
{
"segment": "Tags",
"operator": "Contains",
"value": [
"vip"
]
},
{
"segment": "City",
"operator": "=",
"value": [
"Mumbai"
]
}
]
},
"size": 1247,
"email_count": 1188,
"phone_count": 1201,
"last_evaluated_at": "2026-05-27T14:00:00Z",
"created_at": "2026-04-01T09:00:00Z",
"updated_at": "2026-05-27T14:00:00Z"
}
],
"manual_only": false,
"reenroll": false,
"end_date_time": "2026-05-27T14:23:11.482Z",
"segment_criteria": {
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
],
"exclude_segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
}
},
"nodes": [
{
"id": "text",
"type": "email_campaign",
"parent_id": "text",
"parent_branch": "root",
"action_name": "text",
"campaign_id": "cam_6a7eaec3505bea795709f897",
"template_id": "tpl_6ab24872ba90b88e270b4904",
"subject": "text",
"message_body": "text",
"preheader_text": "text",
"from_name": "text",
"from_email": "[email protected]",
"from_number": "text",
"schedule": "Relative",
"delayTimeHour": 1,
"delayTimetype": "minutes",
"selected_date": "2026-01-01",
"selected_time": "text",
"action_type": "yes_no",
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
],
"multi_conditions": [
{
"value": "text",
"is_other": false,
"name_alias": "text",
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
]
}
],
"salesautomation_id": "text",
"sales_automation": {
"action": {
"type": "tags",
"tag_names": [
"text"
],
"task_name": "text",
"description": "text",
"due_at": "2026-05-27T14:23:11.482Z",
"due_in_days": 1,
"assignee_staff_id": "text",
"assignee_staff_ids": [
"text"
],
"task_type": "text",
"stage_id": "text",
"staff_ids": [
"text"
],
"distribution": "All",
"reassign": false,
"value": "text",
"note": "text",
"flow_id": "text",
"applies_to": "All"
},
"actions": [
{
"type": "tags",
"tag_names": [
"text"
],
"task_name": "text",
"description": "text",
"due_at": "2026-05-27T14:23:11.482Z",
"due_in_days": 1,
"assignee_staff_id": "text",
"assignee_staff_ids": [
"text"
],
"task_type": "text",
"stage_id": "text",
"staff_ids": [
"text"
],
"distribution": "All",
"reassign": false,
"value": "text",
"note": "text",
"flow_id": "text",
"applies_to": "All"
}
]
},
"webhook_url": "https://example.com",
"webhook_method": "GET",
"webhook_payload_type": "json",
"webhook_fields": [
{
"key": "text",
"value": "text"
}
],
"webhook_header_fields": [
{
"key": "text",
"value": "text"
}
],
"mariana_action": {
"type": "pack",
"package_id": "text",
"package_name": "text",
"credit_id": "text",
"credit_name": "text",
"quantity": 1,
"expiry_days": "text",
"amount": 1,
"currency": "text",
"note": "text",
"if_not_found": "create",
"recipient": "contact"
}
}
],
"conversion_config": {},
"timezone": "America/New_York",
"metadata": {
"our_crm_id": "cust_884321",
"sync_batch": "2026-05-imports"
}
}{
"flow": {
"id": "flw_01H8XKV...",
"object": "text",
"name": "text",
"description": "text",
"status": "draft",
"workroom_id": "wrm_5ace370fd2a57d74d0548fb2",
"entry": {
"segment_ids": [
"seg_01H8XKE..."
],
"segments": [
{
"id": "seg_01H8XKE...",
"object": "segment",
"type": "dynamic",
"name": "Active VIPs in Mumbai",
"description": "VIP-tagged members who checked in or purchased recently",
"query": {
"segment_users": [
{
"segment": "Tags",
"operator": "Contains",
"value": [
"vip"
]
},
{
"segment": "City",
"operator": "=",
"value": [
"Mumbai"
]
}
]
},
"size": 1247,
"email_count": 1188,
"phone_count": 1201,
"last_evaluated_at": "2026-05-27T14:00:00Z",
"created_at": "2026-04-01T09:00:00Z",
"updated_at": "2026-05-27T14:00:00Z"
}
],
"unenroll_segment_ids": [
"seg_01H8XKE..."
],
"unenroll_segments": [
{
"id": "seg_01H8XKE...",
"object": "segment",
"type": "dynamic",
"name": "Active VIPs in Mumbai",
"description": "VIP-tagged members who checked in or purchased recently",
"query": {
"segment_users": [
{
"segment": "Tags",
"operator": "Contains",
"value": [
"vip"
]
},
{
"segment": "City",
"operator": "=",
"value": [
"Mumbai"
]
}
]
},
"size": 1247,
"email_count": 1188,
"phone_count": 1201,
"last_evaluated_at": "2026-05-27T14:00:00Z",
"created_at": "2026-04-01T09:00:00Z",
"updated_at": "2026-05-27T14:00:00Z"
}
],
"manual_only": false,
"reenroll": false,
"end_date_time": "2026-05-27T14:23:11.482Z",
"segment_criteria": {
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
],
"exclude_segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
}
},
"nodes": [
{
"id": "text",
"type": "email_campaign",
"parent_id": "text",
"parent_branch": "root",
"action_name": "text",
"campaign_id": "cam_6a7eaec3505bea795709f897",
"template_id": "tpl_6ab24872ba90b88e270b4904",
"subject": "text",
"message_body": "text",
"preheader_text": "text",
"from_name": "text",
"from_email": "[email protected]",
"from_number": "text",
"schedule": "Relative",
"delayTimeHour": 1,
"delayTimetype": "minutes",
"selected_date": "2026-01-01",
"selected_time": "text",
"action_type": "yes_no",
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
],
"multi_conditions": [
{
"value": "text",
"is_other": false,
"name_alias": "text",
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
]
}
],
"salesautomation_id": "text",
"sales_automation": {
"action": {
"type": "tags",
"tag_names": [
"text"
],
"task_name": "text",
"description": "text",
"due_at": "2026-05-27T14:23:11.482Z",
"due_in_days": 1,
"assignee_staff_id": "text",
"assignee_staff_ids": [
"text"
],
"assignee_mode": "Owner",
"task_type": "text",
"stage_id": "text",
"staff_ids": [
"text"
],
"distribution": "All",
"reassign": false,
"value": "text",
"note": "text",
"flow_id": "text",
"applies_to": "All"
},
"actions": [
{
"type": "tags",
"tag_names": [
"text"
],
"task_name": "text",
"description": "text",
"due_at": "2026-05-27T14:23:11.482Z",
"due_in_days": 1,
"assignee_staff_id": "text",
"assignee_staff_ids": [
"text"
],
"assignee_mode": "Owner",
"task_type": "text",
"stage_id": "text",
"staff_ids": [
"text"
],
"distribution": "All",
"reassign": false,
"value": "text",
"note": "text",
"flow_id": "text",
"applies_to": "All"
}
]
},
"webhook_url": "https://example.com",
"webhook_method": "GET",
"webhook_payload_type": "json",
"webhook_fields": [
{
"key": "text",
"value": "text"
}
],
"webhook_header_fields": [
{
"key": "text",
"value": "text"
}
],
"mariana_action": {
"type": "pack",
"package_id": "text",
"package_name": "text",
"credit_id": "text",
"credit_name": "text",
"quantity": 1,
"expiry_days": "text",
"amount": 1,
"currency": "text",
"note": "text",
"if_not_found": "create",
"recipient": "contact"
}
}
],
"stats": {
"active_runs": 1,
"completed_runs": 1,
"entered": 1,
"unenrolled": 1
},
"conversion_config": {
"conversion_ids": [
"text"
],
"attribution_window_days": 1
},
"timezone": "America/New_York",
"created_at": "2026-05-27T14:23:11.482Z",
"updated_at": "2026-05-27T14:23:11.482Z",
"published_at": "2026-05-27T14:23:11.482Z",
"archived_at": "2026-05-27T14:23:11.482Z",
"created_by_user_id": "usr_01H8XL7...",
"metadata": {
"our_crm_id": "cust_884321",
"sync_batch": "2026-05-imports"
}
},
"warnings": [
{
"code": "in_flight_at_deleted_node",
"message": "text",
"affected_run_count": 1
}
],
"dry_run": true
}Soft delete β the flow moves to archived. Every unfinished run is completed with flow_complete_reason: "flow_archived" (on the run and on the contact's flow entry). Its nodes and shadow campaigns move to archived, its flow-bound CRM rules go inactive, and its hidden condition segments are deleted β what the dashboard's status cascade and Delete do, minus anything that holds history: campaign docs, sent messages and run records are retained. Archive is terminal: publishing an archived flow returns 409 flow_archived; duplicate it instead (the copy gets fresh shadow campaigns, condition segments and CRM rules). Repeating the call is safe. Gleantap retains archived flows for history and auditing; there is no hard delete endpoint.
Stops journeys people are already in. Archiving halts every in-flight run immediately, so contacts partway through stop receiving the rest of the sequence. listFlowRuns reports how many runs are currently active.
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.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$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.
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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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 Test1Archived.
No content
The resource doesn't exist or isn't visible to this caller.
DELETE /v3/flows/{id} HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Transitions draft β active. Enrollment begins on the next cron tick (typically within 30 min). Publish re-validates the DAG β orphan nodes, cycles, missing campaign references, or empty entry segments return 422. An archived flow returns 409 flow_archived.
Goes live. Once live it keeps reaching real contacts on its own, with no further call.
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.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$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.
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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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 Test1Published.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$draft β never published. active β published and enrolling. inactive β unpublished; in-flight runs continue but no new entries. paused β enrollment and step execution both halted; can be resumed. completed β end_date_time passed. archived β soft-deleted.
The workroom this flow lives in. Its entry.segment_ids must all belong to the same workroom.
wrm_5ace370fd2a57d74d0548fb2Pattern: ^wrm_[0-9a-f]{24}$Timezone used to interpret delay node "Specific Date & Time" values. Defaults to the account timezone.
America/New_YorkRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482Zusr_01H8XL7...Pattern: ^usr_[0-9A-HJKMNP-TV-Z]{26}$The resource doesn't exist or isn't visible to this caller.
Idempotency conflict, version conflict (If-Match), or state conflict.
Semantic validation failed β the request is well-formed but references an object in the wrong state (e.g., sending to an opted-out contact).
POST /v3/flows/{id}/publish HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "flw_01H8XKV...",
"object": "text",
"name": "text",
"description": "text",
"status": "draft",
"workroom_id": "wrm_5ace370fd2a57d74d0548fb2",
"entry": {
"segment_ids": [
"seg_01H8XKE..."
],
"segments": [
{
"id": "seg_01H8XKE...",
"object": "segment",
"type": "dynamic",
"name": "Active VIPs in Mumbai",
"description": "VIP-tagged members who checked in or purchased recently",
"query": {
"segment_users": [
{
"segment": "Tags",
"operator": "Contains",
"value": [
"vip"
]
},
{
"segment": "City",
"operator": "=",
"value": [
"Mumbai"
]
}
]
},
"size": 1247,
"email_count": 1188,
"phone_count": 1201,
"last_evaluated_at": "2026-05-27T14:00:00Z",
"created_at": "2026-04-01T09:00:00Z",
"updated_at": "2026-05-27T14:00:00Z"
}
],
"unenroll_segment_ids": [
"seg_01H8XKE..."
],
"unenroll_segments": [
{
"id": "seg_01H8XKE...",
"object": "segment",
"type": "dynamic",
"name": "Active VIPs in Mumbai",
"description": "VIP-tagged members who checked in or purchased recently",
"query": {
"segment_users": [
{
"segment": "Tags",
"operator": "Contains",
"value": [
"vip"
]
},
{
"segment": "City",
"operator": "=",
"value": [
"Mumbai"
]
}
]
},
"size": 1247,
"email_count": 1188,
"phone_count": 1201,
"last_evaluated_at": "2026-05-27T14:00:00Z",
"created_at": "2026-04-01T09:00:00Z",
"updated_at": "2026-05-27T14:00:00Z"
}
],
"manual_only": false,
"reenroll": false,
"end_date_time": "2026-05-27T14:23:11.482Z",
"segment_criteria": {
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
],
"exclude_segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
}
},
"nodes": [
{
"id": "text",
"type": "email_campaign",
"parent_id": "text",
"parent_branch": "root",
"action_name": "text",
"campaign_id": "cam_6a7eaec3505bea795709f897",
"template_id": "tpl_6ab24872ba90b88e270b4904",
"subject": "text",
"message_body": "text",
"preheader_text": "text",
"from_name": "text",
"from_email": "[email protected]",
"from_number": "text",
"schedule": "Relative",
"delayTimeHour": 1,
"delayTimetype": "minutes",
"selected_date": "2026-01-01",
"selected_time": "text",
"action_type": "yes_no",
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
],
"multi_conditions": [
{
"value": "text",
"is_other": false,
"name_alias": "text",
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
]
}
],
"salesautomation_id": "text",
"sales_automation": {
"action": {
"type": "tags",
"tag_names": [
"text"
],
"task_name": "text",
"description": "text",
"due_at": "2026-05-27T14:23:11.482Z",
"due_in_days": 1,
"assignee_staff_id": "text",
"assignee_staff_ids": [
"text"
],
"assignee_mode": "Owner",
"task_type": "text",
"stage_id": "text",
"staff_ids": [
"text"
],
"distribution": "All",
"reassign": false,
"value": "text",
"note": "text",
"flow_id": "text",
"applies_to": "All"
},
"actions": [
{
"type": "tags",
"tag_names": [
"text"
],
"task_name": "text",
"description": "text",
"due_at": "2026-05-27T14:23:11.482Z",
"due_in_days": 1,
"assignee_staff_id": "text",
"assignee_staff_ids": [
"text"
],
"assignee_mode": "Owner",
"task_type": "text",
"stage_id": "text",
"staff_ids": [
"text"
],
"distribution": "All",
"reassign": false,
"value": "text",
"note": "text",
"flow_id": "text",
"applies_to": "All"
}
]
},
"webhook_url": "https://example.com",
"webhook_method": "GET",
"webhook_payload_type": "json",
"webhook_fields": [
{
"key": "text",
"value": "text"
}
],
"webhook_header_fields": [
{
"key": "text",
"value": "text"
}
],
"mariana_action": {
"type": "pack",
"package_id": "text",
"package_name": "text",
"credit_id": "text",
"credit_name": "text",
"quantity": 1,
"expiry_days": "text",
"amount": 1,
"currency": "text",
"note": "text",
"if_not_found": "create",
"recipient": "contact"
}
}
],
"stats": {
"active_runs": 1,
"completed_runs": 1,
"entered": 1,
"unenrolled": 1
},
"conversion_config": {
"conversion_ids": [
"text"
],
"attribution_window_days": 1
},
"timezone": "America/New_York",
"created_at": "2026-05-27T14:23:11.482Z",
"updated_at": "2026-05-27T14:23:11.482Z",
"published_at": "2026-05-27T14:23:11.482Z",
"archived_at": "2026-05-27T14:23:11.482Z",
"created_by_user_id": "usr_01H8XL7...",
"metadata": {
"our_crm_id": "cust_884321",
"sync_batch": "2026-05-imports"
}
}Transitions active β inactive. Stops new enrollments; in-flight runs continue to completion. To stop in-flight runs too, use DELETE /v3/flows/{id} (archive).
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.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$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.
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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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 Test1Unpublished.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$draft β never published. active β published and enrolling. inactive β unpublished; in-flight runs continue but no new entries. paused β enrollment and step execution both halted; can be resumed. completed β end_date_time passed. archived β soft-deleted.
The workroom this flow lives in. Its entry.segment_ids must all belong to the same workroom.
wrm_5ace370fd2a57d74d0548fb2Pattern: ^wrm_[0-9a-f]{24}$Timezone used to interpret delay node "Specific Date & Time" values. Defaults to the account timezone.
America/New_YorkRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482Zusr_01H8XL7...Pattern: ^usr_[0-9A-HJKMNP-TV-Z]{26}$The resource doesn't exist or isn't visible to this caller.
Idempotency conflict, version conflict (If-Match), or state conflict.
POST /v3/flows/{id}/unpublish HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "flw_01H8XKV...",
"object": "text",
"name": "text",
"description": "text",
"status": "draft",
"workroom_id": "wrm_5ace370fd2a57d74d0548fb2",
"entry": {
"segment_ids": [
"seg_01H8XKE..."
],
"segments": [
{
"id": "seg_01H8XKE...",
"object": "segment",
"type": "dynamic",
"name": "Active VIPs in Mumbai",
"description": "VIP-tagged members who checked in or purchased recently",
"query": {
"segment_users": [
{
"segment": "Tags",
"operator": "Contains",
"value": [
"vip"
]
},
{
"segment": "City",
"operator": "=",
"value": [
"Mumbai"
]
}
]
},
"size": 1247,
"email_count": 1188,
"phone_count": 1201,
"last_evaluated_at": "2026-05-27T14:00:00Z",
"created_at": "2026-04-01T09:00:00Z",
"updated_at": "2026-05-27T14:00:00Z"
}
],
"unenroll_segment_ids": [
"seg_01H8XKE..."
],
"unenroll_segments": [
{
"id": "seg_01H8XKE...",
"object": "segment",
"type": "dynamic",
"name": "Active VIPs in Mumbai",
"description": "VIP-tagged members who checked in or purchased recently",
"query": {
"segment_users": [
{
"segment": "Tags",
"operator": "Contains",
"value": [
"vip"
]
},
{
"segment": "City",
"operator": "=",
"value": [
"Mumbai"
]
}
]
},
"size": 1247,
"email_count": 1188,
"phone_count": 1201,
"last_evaluated_at": "2026-05-27T14:00:00Z",
"created_at": "2026-04-01T09:00:00Z",
"updated_at": "2026-05-27T14:00:00Z"
}
],
"manual_only": false,
"reenroll": false,
"end_date_time": "2026-05-27T14:23:11.482Z",
"segment_criteria": {
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
],
"exclude_segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
}
},
"nodes": [
{
"id": "text",
"type": "email_campaign",
"parent_id": "text",
"parent_branch": "root",
"action_name": "text",
"campaign_id": "cam_6a7eaec3505bea795709f897",
"template_id": "tpl_6ab24872ba90b88e270b4904",
"subject": "text",
"message_body": "text",
"preheader_text": "text",
"from_name": "text",
"from_email": "[email protected]",
"from_number": "text",
"schedule": "Relative",
"delayTimeHour": 1,
"delayTimetype": "minutes",
"selected_date": "2026-01-01",
"selected_time": "text",
"action_type": "yes_no",
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
],
"multi_conditions": [
{
"value": "text",
"is_other": false,
"name_alias": "text",
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
]
}
],
"salesautomation_id": "text",
"sales_automation": {
"action": {
"type": "tags",
"tag_names": [
"text"
],
"task_name": "text",
"description": "text",
"due_at": "2026-05-27T14:23:11.482Z",
"due_in_days": 1,
"assignee_staff_id": "text",
"assignee_staff_ids": [
"text"
],
"assignee_mode": "Owner",
"task_type": "text",
"stage_id": "text",
"staff_ids": [
"text"
],
"distribution": "All",
"reassign": false,
"value": "text",
"note": "text",
"flow_id": "text",
"applies_to": "All"
},
"actions": [
{
"type": "tags",
"tag_names": [
"text"
],
"task_name": "text",
"description": "text",
"due_at": "2026-05-27T14:23:11.482Z",
"due_in_days": 1,
"assignee_staff_id": "text",
"assignee_staff_ids": [
"text"
],
"assignee_mode": "Owner",
"task_type": "text",
"stage_id": "text",
"staff_ids": [
"text"
],
"distribution": "All",
"reassign": false,
"value": "text",
"note": "text",
"flow_id": "text",
"applies_to": "All"
}
]
},
"webhook_url": "https://example.com",
"webhook_method": "GET",
"webhook_payload_type": "json",
"webhook_fields": [
{
"key": "text",
"value": "text"
}
],
"webhook_header_fields": [
{
"key": "text",
"value": "text"
}
],
"mariana_action": {
"type": "pack",
"package_id": "text",
"package_name": "text",
"credit_id": "text",
"credit_name": "text",
"quantity": 1,
"expiry_days": "text",
"amount": 1,
"currency": "text",
"note": "text",
"if_not_found": "create",
"recipient": "contact"
}
}
],
"stats": {
"active_runs": 1,
"completed_runs": 1,
"entered": 1,
"unenrolled": 1
},
"conversion_config": {
"conversion_ids": [
"text"
],
"attribution_window_days": 1
},
"timezone": "America/New_York",
"created_at": "2026-05-27T14:23:11.482Z",
"updated_at": "2026-05-27T14:23:11.482Z",
"published_at": "2026-05-27T14:23:11.482Z",
"archived_at": "2026-05-27T14:23:11.482Z",
"created_by_user_id": "usr_01H8XL7...",
"metadata": {
"our_crm_id": "cust_884321",
"sync_batch": "2026-05-imports"
}
}Creates a new draft flow with the same entry, nodes, and conversion goals. Stats are NOT copied. As in the dashboard's clone, every message node gets its own fresh shadow campaign (same content, drafted), every yes_no/wait_till_true condition its own hidden condition segment, and every sales_automation node its own CRM rule (inactive until the copy is published) β nothing in the copy references the original's parts, so editing or archiving one flow never touches the other. Works on archived flows (the way to bring one back).
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.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$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.
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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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 Test1Name for the duplicate. Defaults to "<source name> (copy)".
Duplicate created.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$draft β never published. active β published and enrolling. inactive β unpublished; in-flight runs continue but no new entries. paused β enrollment and step execution both halted; can be resumed. completed β end_date_time passed. archived β soft-deleted.
The workroom this flow lives in. Its entry.segment_ids must all belong to the same workroom.
wrm_5ace370fd2a57d74d0548fb2Pattern: ^wrm_[0-9a-f]{24}$Timezone used to interpret delay node "Specific Date & Time" values. Defaults to the account timezone.
America/New_YorkRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482Zusr_01H8XL7...Pattern: ^usr_[0-9A-HJKMNP-TV-Z]{26}$The resource doesn't exist or isn't visible to this caller.
POST /v3/flows/{id}/duplicate HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"name": "text"
}{
"id": "flw_01H8XKV...",
"object": "text",
"name": "text",
"description": "text",
"status": "draft",
"workroom_id": "wrm_5ace370fd2a57d74d0548fb2",
"entry": {
"segment_ids": [
"seg_01H8XKE..."
],
"segments": [
{
"id": "seg_01H8XKE...",
"object": "segment",
"type": "dynamic",
"name": "Active VIPs in Mumbai",
"description": "VIP-tagged members who checked in or purchased recently",
"query": {
"segment_users": [
{
"segment": "Tags",
"operator": "Contains",
"value": [
"vip"
]
},
{
"segment": "City",
"operator": "=",
"value": [
"Mumbai"
]
}
]
},
"size": 1247,
"email_count": 1188,
"phone_count": 1201,
"last_evaluated_at": "2026-05-27T14:00:00Z",
"created_at": "2026-04-01T09:00:00Z",
"updated_at": "2026-05-27T14:00:00Z"
}
],
"unenroll_segment_ids": [
"seg_01H8XKE..."
],
"unenroll_segments": [
{
"id": "seg_01H8XKE...",
"object": "segment",
"type": "dynamic",
"name": "Active VIPs in Mumbai",
"description": "VIP-tagged members who checked in or purchased recently",
"query": {
"segment_users": [
{
"segment": "Tags",
"operator": "Contains",
"value": [
"vip"
]
},
{
"segment": "City",
"operator": "=",
"value": [
"Mumbai"
]
}
]
},
"size": 1247,
"email_count": 1188,
"phone_count": 1201,
"last_evaluated_at": "2026-05-27T14:00:00Z",
"created_at": "2026-04-01T09:00:00Z",
"updated_at": "2026-05-27T14:00:00Z"
}
],
"manual_only": false,
"reenroll": false,
"end_date_time": "2026-05-27T14:23:11.482Z",
"segment_criteria": {
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
],
"exclude_segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
}
},
"nodes": [
{
"id": "text",
"type": "email_campaign",
"parent_id": "text",
"parent_branch": "root",
"action_name": "text",
"campaign_id": "cam_6a7eaec3505bea795709f897",
"template_id": "tpl_6ab24872ba90b88e270b4904",
"subject": "text",
"message_body": "text",
"preheader_text": "text",
"from_name": "text",
"from_email": "[email protected]",
"from_number": "text",
"schedule": "Relative",
"delayTimeHour": 1,
"delayTimetype": "minutes",
"selected_date": "2026-01-01",
"selected_time": "text",
"action_type": "yes_no",
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
],
"multi_conditions": [
{
"value": "text",
"is_other": false,
"name_alias": "text",
"segment_users": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"with_or_segment_users": [
[
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
]
}
],
"salesautomation_id": "text",
"sales_automation": {
"action": {
"type": "tags",
"tag_names": [
"text"
],
"task_name": "text",
"description": "text",
"due_at": "2026-05-27T14:23:11.482Z",
"due_in_days": 1,
"assignee_staff_id": "text",
"assignee_staff_ids": [
"text"
],
"assignee_mode": "Owner",
"task_type": "text",
"stage_id": "text",
"staff_ids": [
"text"
],
"distribution": "All",
"reassign": false,
"value": "text",
"note": "text",
"flow_id": "text",
"applies_to": "All"
},
"actions": [
{
"type": "tags",
"tag_names": [
"text"
],
"task_name": "text",
"description": "text",
"due_at": "2026-05-27T14:23:11.482Z",
"due_in_days": 1,
"assignee_staff_id": "text",
"assignee_staff_ids": [
"text"
],
"assignee_mode": "Owner",
"task_type": "text",
"stage_id": "text",
"staff_ids": [
"text"
],
"distribution": "All",
"reassign": false,
"value": "text",
"note": "text",
"flow_id": "text",
"applies_to": "All"
}
]
},
"webhook_url": "https://example.com",
"webhook_method": "GET",
"webhook_payload_type": "json",
"webhook_fields": [
{
"key": "text",
"value": "text"
}
],
"webhook_header_fields": [
{
"key": "text",
"value": "text"
}
],
"mariana_action": {
"type": "pack",
"package_id": "text",
"package_name": "text",
"credit_id": "text",
"credit_name": "text",
"quantity": 1,
"expiry_days": "text",
"amount": 1,
"currency": "text",
"note": "text",
"if_not_found": "create",
"recipient": "contact"
}
}
],
"stats": {
"active_runs": 1,
"completed_runs": 1,
"entered": 1,
"unenrolled": 1
},
"conversion_config": {
"conversion_ids": [
"text"
],
"attribution_window_days": 1
},
"timezone": "America/New_York",
"created_at": "2026-05-27T14:23:11.482Z",
"updated_at": "2026-05-27T14:23:11.482Z",
"published_at": "2026-05-27T14:23:11.482Z",
"archived_at": "2026-05-27T14:23:11.482Z",
"created_by_user_id": "usr_01H8XL7...",
"metadata": {
"our_crm_id": "cust_884321",
"sync_batch": "2026-05-imports"
}
}Enrolls one contact into the flow, bypassing segment-based entry. Still respects unenroll_segment_ids β a match aborts the run at the next step. Idempotency-Key is strongly recommended.
Matches the dashboard's "enter into flow": a contact gets a new run only if they have no run for this flow, unless (a) they were removed with POST /unenroll β that run is replaced β or (b) entry.reenroll is true and their finished run started before today (account timezone). The first step runs on the flow worker's next pass. The response may carry warnings[].
Starts messaging this contact. Enrolling runs the flow's steps against a real person, including its sends.
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.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$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.
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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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 Test1A unique key (β€255 chars) chosen by the client. Replays with the same key + same body return the cached response. Replays with the same key + different body return 409 idempotency_conflict. Required on messaging sends and bulk operations; recommended elsewhere.
8e3c7a90-7c4d-4f8e-8e3c-7a907c4d4f8eManually enroll a contact. Bypasses segment-based entry evaluation but still respects unenroll_segment_ids (a match will terminate the run at the next step).
A contact ID. Accepts either the native prefixed id (con_<24-hex>) or an external-ID reference (external_id:<your_id>).
con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$When true, the flow worker is triggered for this contact right away, so the first step runs within seconds instead of on the worker's next pass. The response waits up to about 3 seconds for that step, so it usually shows current_action_step >= 1 and the step in action_story; if the worker is slower, the run is returned still pending and listFlowRuns shows its progress.
falseContact enrolled. Returns the new run.
A single contact's traversal of a flow (userflowactions in the engine). Immutable after complete β re-enrollment produces a new run and archives the old to history.
Run ID β flr_<24-hex>. Stable for the lifetime of the run; re-enrollment creates a new run with a new ID.
^flr_[0-9a-f]{24}$flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$A contact ID. Accepts either the native prefixed id (con_<24-hex>) or an external-ID reference (external_id:<your_id>).
con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$The 7 node types the engine actually supports (mariana_action gives the contact a pack, class credits or account credit in the workroom's Mariana Tek studio). Richer vocab from the main spec (send_message, tag, add_to_segment, update_contact, create_task, create_opportunity, wait_for_event, split, end) is NOT implemented β express those via sales_automation (pointing at a CRM sub-automation) or return 501 node_type_not_supported. See Flow Engine companion doc Β§10.
RFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZPopulated on complete. Common values: finished, unenrolled, unenroll_segment_matched, end_date_reached, node_missing (a node was deleted while the contact was mid-flight β see FlowUpdate description).
True if this run is a re-enrollment of a previously-completed contact.
RFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRFC 3339 timestamp, always UTC, millisecond precision.
2026-05-27T14:23:11.482ZRequest could not be parsed or failed validation.
The resource doesn't exist or isn't visible to this caller.
already_enrolled (a run is in flight), already_completed (finished and entry.reenroll is false), or reenroll_same_day (re-enroll allowed but the finished run started today).
POST /v3/flows/{id}/enroll HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 73
{
"contact_id": "con_6a7eaec3505bea795709f897",
"execute_immediately": false
}{
"id": "text",
"object": "text",
"flow_id": "flw_01H8XKV...",
"contact_id": "con_6a7eaec3505bea795709f897",
"status": "pending",
"current_action_step": 1,
"current_action_type": "email_campaign",
"current_action_name": "text",
"current_action_datetime": "2026-05-27T14:23:11.482Z",
"flow_complete_reason": "text",
"reenroll": true,
"action_story": [
{
"operation_step_id": "text",
"operation_type": "email_campaign",
"operation_step": 1,
"action_name": "text",
"action_datetime": "2026-05-27T14:23:11.482Z",
"campaign_id": "cam_6a7eaec3505bea795709f897",
"salesautomation_id": "text",
"matched_condition": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"operation_parent_type": "text",
"webhook_url": "text",
"webhook_status": 1,
"webhook_response": "text"
}
],
"conversion_ids": [
{
"id": "text",
"name": "text",
"flow_operation_step": 1,
"deleted": true
}
],
"created_at": "2026-05-27T14:23:11.482Z",
"updated_at": "2026-05-27T14:23:11.482Z"
}Terminates the in-flight run for one contact with flow_status: "complete", flow_unenrolled: true and flow_complete_reason: <reason>, exactly as the dashboard's "remove from flow" does: the contact is also marked as manually removed (so segment entry does not put them straight back in) and their profile's flow entry is completed. Counted in analytics unenrolled. Enrolling them again with POST /enroll is allowed. Idempotent: no-op when the contact has no in-flight run.
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.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$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.
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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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 Test1Manually unenroll a contact. Idempotent β no-op if the contact isn't in-flight.
A contact ID. Accepts either the native prefixed id (con_<24-hex>) or an external-ID reference (external_id:<your_id>).
con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$Free-form reason stored on the run's flow_complete_reason.
Unenrolled (or already not in-flight).
No content
The resource doesn't exist or isn't visible to this caller.
POST /v3/flows/{id}/unenroll HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 61
{
"contact_id": "con_6a7eaec3505bea795709f897",
"reason": "text"
}No content
Evaluates every node without triggering real sends, webhooks, or CRM automations. Returns the traversal that a real run would take. Useful for validating condition branches and delay math against a real contact's data.
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.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$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.
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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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 Test1Dry-run the flow for a specific contact. Renders and evaluates every node without triggering sends, webhooks, or CRM automations β returns the traversal that would happen.
A contact ID. Accepts either the native prefixed id (con_<24-hex>) or an external-ID reference (external_id:<your_id>).
con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$If true (default), treat every delay node as if its wait had elapsed. Set false to compute the actual delays.
trueSimulated traversal.
A contact ID. Accepts either the native prefixed id (con_<24-hex>) or an external-ID reference (external_id:<your_id>).
con_6a7eaec3505bea795709f897Pattern: ^con_[0-9a-f]{24}$|^external_id:[^/]+$Request could not be parsed or failed validation.
The resource doesn't exist or isn't visible to this caller.
POST /v3/flows/{id}/test_run HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 64
{
"contact_id": "con_6a7eaec3505bea795709f897",
"skip_delays": true
}{
"object": "text",
"contact_id": "con_6a7eaec3505bea795709f897",
"traversal": [
{
"node_id": "text",
"node_type": "email_campaign",
"action_name": "text",
"simulated_at": "2026-05-27T14:23:11.482Z",
"branch_taken": "text",
"would_send": true,
"notes": "text",
"warnings": [
"text"
]
}
]
}Paginated list of userflowactions rows for this flow. Common filters: ?filter[status]=processing (in-flight), ?filter[status]=complete, ?filter[contact_id]=, ?filter[flow_complete_reason]=unenrolled. Use ?include_history=true to also include archived runs from previous re-enrollments.
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.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$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.
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.
falseMinor 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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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 Test1A page of runs.
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.
The resource doesn't exist or isn't visible to this caller.
GET /v3/flows/{id}/runs HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "text",
"data": [
{
"id": "text",
"object": "text",
"flow_id": "flw_01H8XKV...",
"contact_id": "con_6a7eaec3505bea795709f897",
"status": "pending",
"current_action_step": 1,
"current_action_type": "email_campaign",
"current_action_name": "text",
"current_action_datetime": "2026-05-27T14:23:11.482Z",
"flow_complete_reason": "text",
"reenroll": true,
"action_story": [
{
"operation_step_id": "text",
"operation_type": "email_campaign",
"operation_step": 1,
"action_name": "text",
"action_datetime": "2026-05-27T14:23:11.482Z",
"campaign_id": "cam_6a7eaec3505bea795709f897",
"salesautomation_id": "text",
"matched_condition": [
{
"segment": "Attributes",
"data": "text",
"event": "text",
"operator": "=",
"value": null,
"value2": null,
"operator2": "text",
"value2_id": [
"text"
],
"data_type": "String",
"dataAlias": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"operation_parent_type": "text",
"webhook_url": "text",
"webhook_status": 1,
"webhook_response": "text"
}
],
"conversion_ids": [
{
"id": "text",
"name": "text",
"flow_operation_step": 1,
"deleted": 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"
}How a flow is performing: run counters, what its message nodes sent, and per-node reached counts.
messages carries the flow's sends, deliveries, opens and clicks for the window β the same figures /messages/report?flow_id=β¦ returns. A flow's message nodes send through shadow campaigns, so its sends live alongside every other send and are found by that link.
entered and unenrolled are windowed; active_runs and completed_runs are current state and do not move with the window. Default window is the last 30 days; override with ?start=/?end=. Bare dates are read as UTC.
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.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$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.
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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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 Test1Analytics payload.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$RFC 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/flows/{id}/analytics HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "text",
"flow_id": "flw_01H8XKV...",
"window": {
"start": "2026-05-27T14:23:11.482Z",
"end": "2026-05-27T14:23:11.482Z",
"applies_to": "text"
},
"totals": {
"active_runs": 1,
"completed_runs": 1,
"entered": 1,
"unenrolled": 1
},
"messages": {
"attempted": 1,
"sent": 1,
"delivered": 1,
"bounced": 1,
"dropped": 1,
"undelivered": 1,
"delayed": 1,
"failed": 1,
"unaccounted": 1,
"complaints": 1,
"unsubscribed": 1,
"campaigns": 1,
"flows": 1,
"opened": 1,
"clicked": 1,
"contacts": 1,
"delivery_rate": 1,
"bounce_rate": 1,
"drop_rate": 1,
"open_rate": 1,
"click_rate": 1,
"click_to_open_rate": 1,
"spam_rate": 1,
"unsubscribe_rate": 1
},
"per_node": [
{
"node_id": "text",
"node_type": "email_campaign",
"reached": 1,
"completed": 1,
"dropped": 1,
"avg_dwell_seconds": 1
}
],
"computed_at": "2026-05-27T14:23:11.482Z"
}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.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$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.
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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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 Test1Sharing config.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$A staff user (from the legacy users collection). Used for owner_id, responsible_id, created_by, assigned_to, etc.
The resource doesn't exist or isn't visible to this caller.
GET /v3/flows/{id}/sharing HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "text",
"flow_id": "flw_01H8XKV...",
"allowed_roles": {
"ANY_ADDITIONAL_PROPERTY": true
},
"other_allowed_user_ids": [
"text"
],
"role_updated_on": "2026-01-01T00:00:00.000Z"
}Full-replace (matches the dashboard's checkbox POST β unchecked boxes just don't appear). Accepted role keys: me, Admin, WorkroomAdmin, Marketing, Sales, Analyst, Other. When Other is true, other_allowed_user_ids[] must contain at least one valid staff ID or 400 is returned.
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.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$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.
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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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 Test1Required (non-empty) when allowed_roles.Other is true; otherwise ignored.
Updated sharing config.
flw_01H8XKV...Pattern: ^flw_[0-9A-HJKMNP-TV-Z]{26}$A staff user (from the legacy users collection). Used for owner_id, responsible_id, created_by, assigned_to, etc.
Request could not be parsed or failed validation.
The resource doesn't exist or isn't visible to this caller.
PUT /v3/flows/{id}/sharing HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 84
{
"allowed_roles": {
"ANY_ADDITIONAL_PROPERTY": true
},
"other_allowed_user_ids": [
"text"
]
}{
"object": "text",
"flow_id": "flw_01H8XKV...",
"allowed_roles": {
"ANY_ADDITIONAL_PROPERTY": true
},
"other_allowed_user_ids": [
"text"
],
"role_updated_on": "2026-01-01T00:00:00.000Z"
}Catalog for authoring a flow. Returns the 7 node types (email_campaign, sms_campaign, delay, condition, sales_automation, webhook, mariana_action) with per-type field requirements, the 2 entry-trigger types (segment_membership, manual), the 13 sales_automation action types with example payloads, the 6 trigger types, and a small library of common flow recipes (lead nurture, appointment reminder, win-back).
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.
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.
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.
2026-05-27Pattern: ^\d{4}-\d{2}-\d{2}$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
GET /v3/flows/schema HTTP/1.1
Host: api.gleantap.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}