Scopes and endpoints: campaigns, flows, automations
Last updated: 11 November 2026 · 11 min read
Scopes for campaigns, flows and automation rules. All three follow one rule: write prepares a draft, and the step that reaches customers (sending, turning on) needs a separate send or publish scope.
Steps
-
1
How to read this article
- Paths follow
https://api.clomni.ai/v1:GET /v1/agentsmeanshttps://api.clomni.ai/v1/agents. Paths have no workspace ID, because a token belongs to one workspace. - Every request carries the
Authorization: Bearer clomni_pat_xxxheader. How to get a token: Tokens and authentication in the Developer API. - Risk: low (no personal data), medium (reads customer data or changes internal data), high (sends to customers, deletes, bulk exports, changes live settings).
- Every scope goes through review, in public apps too. More: Review: checking scopes and rejection reasons.
- "Also grants":
writeandmanagegrant thereadof the same resource.send,delete,publish,assignandrungrant nothing. - When an endpoint lists several scopes, any one of them is enough. Without the scope the API answers 403
insufficient_scopewithrequired_scopesin the body. - Every POST takes an
Idempotency-Keyheader, so a repeated request is not run twice.
- Paths follow
-
2
Read campaigns (campaigns:read)
Reads campaigns, their versions, results and the status of each recipient.
- Risk: low.
- Review: goes through review; low risk scopes are looked at quickly.
- Also grants: nothing else.
Endpoints:
GET /v1/campaign_results: List campaign resultsGET /v1/campaign_results/{campaign_result_id}: Get a campaign's resultGET /v1/campaign_results/{campaign_result_id}/contacts: List a campaign's recipients and their statusGET /v1/campaigns: List campaignsGET /v1/campaigns/{campaign_id}: Get a campaignGET /v1/campaigns/{campaign_id}/versions: List a campaign's versions
Example:
curl "https://api.clomni.ai/v1/campaigns" \ -H "Authorization: Bearer clomni_pat_xxx"
curl "https://api.clomni.ai/v1/campaign_results" \ -H "Authorization: Bearer clomni_pat_xxx"
-
3
Edit campaign drafts (campaigns:write)
Creates and edits campaign drafts, discards unpublished changes, restores an older version, deletes a campaign. Note: unless
POST /v1/campaignshasenabled: false, the campaign is created active andcampaigns:sendis required too. InPATCH,enabled: trueorscheduled_atalso needscampaigns:send.- Risk: medium.
- Review: goes through review. Say exactly which data you use with it, when and why.
- Also grants:
campaigns:read.
Endpoints:
POST /v1/campaigns: Create a campaignPATCH /v1/campaigns/{campaign_id}: Update a campaignDELETE /v1/campaigns/{campaign_id}: Delete a campaignPOST /v1/campaigns/{campaign_id}/revert: Discard unpublished changesPOST /v1/campaigns/{campaign_id}/versions/{version}/restore: Restore a campaign version
Example:
curl -X POST "https://api.clomni.ai/v1/campaigns" \ -H "Authorization: Bearer clomni_pat_xxx" \ -H "Content-Type: application/json" \ -d '{"title": "November sale", "inbox_id": 5, "enabled": false, "scheduled_at": 1794200000, "audience": [{"type": "Label", "id": 14}], "template_params": {"name": "november_sale", "language": "az", "category": "MARKETING", "processed_params": {"body": {"1": "15%"}}}}' -
4
Send campaigns (campaigns:send)
Sends or schedules a campaign. Bulk messages go to customers, so it is high risk: in the review describe the volume and how consent is collected.
- Risk: high.
- Review: goes through review and gets a closer look. A detailed explanation and a short video of the feature are needed; the target is 2 working days.
- Also grants: nothing else.
Endpoints:
POST /v1/campaigns/{campaign_id}/publish: Publish a campaign
Example:
curl -X POST "https://api.clomni.ai/v1/campaigns/9/publish" \ -H "Authorization: Bearer clomni_pat_xxx"
-
5
Read flows (flows:read)
Reads flows, folders, versions, statistics, the step funnel and the contacts who went through a flow, and checks a flow for problems.
- Risk: low.
- Review: goes through review; low risk scopes are looked at quickly.
- Also grants: nothing else.
Endpoints:
GET /v1/flow_folders: List flow foldersGET /v1/flow_report: Get the flows reportGET /v1/flow_stats: Get statistics for all flowsGET /v1/flows: List flowsGET /v1/flows/{flow_id}: Get a flowGET /v1/flows/{flow_id}/analytics: Get a flow's statisticsGET /v1/flows/{flow_id}/analytics/contacts: List contacts who went through a flowGET /v1/flows/{flow_id}/analytics/funnel: Get a flow's step funnelGET /v1/flows/{flow_id}/check: Check a flow for problemsGET /v1/flows/{flow_id}/versions: List a flow's versionsGET /v1/flows/{flow_id}/versions/{version_id}: Get a flow version
Example:
curl "https://api.clomni.ai/v1/flows" \ -H "Authorization: Bearer clomni_pat_xxx"
curl "https://api.clomni.ai/v1/flows/31/check" \ -H "Authorization: Bearer clomni_pat_xxx"
-
6
Edit flow drafts (flows:write)
Creates and edits flow drafts, copies flows, moves them to folders, manages folders. Sending
statusin the body counts as publishing and also needsflows:publish.- Risk: medium.
- Review: goes through review. Say exactly which data you use with it, when and why.
- Also grants:
flows:read.
Endpoints:
POST /v1/flow_folders: Create a flow folderPATCH /v1/flow_folders/{flow_folder_id}: Update a flow folderDELETE /v1/flow_folders/{flow_folder_id}: Delete a flow folderPOST /v1/flows: Create a flowPATCH /v1/flows/{flow_id}: Update a flowPOST /v1/flows/{flow_id}/copy: Copy a flowPATCH /v1/flows/{flow_id}/move: Move a flow to a folder
For the request body see the API reference on developer.clomni.ai.
-
7
Publish flows (flows:publish)
Turns a flow on or off, restores an older version, deletes a flow. An active flow writes to customers by itself, so it is high risk. There is no endpoint to start a flow in a given conversation: a trigger, an agent, the AI agent or the mobile app (
Clomni.startFlow) starts it.- Risk: high.
- Review: goes through review and gets a closer look. A detailed explanation and a short video of the feature are needed; the target is 2 working days.
- Also grants: nothing else.
Endpoints:
DELETE /v1/flows/{flow_id}: Delete a flowPOST /v1/flows/{flow_id}/publish: Turn a flow on or offPOST /v1/flows/{flow_id}/versions/{version_id}/restore: Restore a flow version
For the request body see the API reference on developer.clomni.ai.
-
8
Read automations (automations:read)
Reads automation rules: event, conditions, actions and whether the rule is active.
- Risk: low.
- Review: goes through review; low risk scopes are looked at quickly.
- Also grants: nothing else.
Endpoints:
GET /v1/automation_rules: List automation rulesGET /v1/automation_rules/{automation_rule_id}: Get an automation rule
Example:
curl "https://api.clomni.ai/v1/automation_rules" \ -H "Authorization: Bearer clomni_pat_xxx"
-
9
Edit automation drafts (automations:write)
Creates and edits rules without activating them. Unless
POSThasactive: false, the rule is created active andautomations:publishis needed too.active: trueinPATCHalso needsautomations:publish.- Risk: medium.
- Review: goes through review. Say exactly which data you use with it, when and why.
- Also grants:
automations:read.
Endpoints:
POST /v1/automation_rules: Create an automation rulePATCH /v1/automation_rules/{automation_rule_id}: Update an automation rule
Example:
curl -X POST "https://api.clomni.ai/v1/automation_rules" \ -H "Authorization: Bearer clomni_pat_xxx" \ -H "Content-Type: application/json" \ -d '{"name": "VIP conversations to the sales team", "event_name": "conversation_created", "active": false, "conditions": [{"attribute_key": "customer_tier", "filter_operator": "equal_to", "values": ["gold"], "query_operator": null}], "actions": [{"action_name": "assign_team", "action_params": [3]}]}' -
10
Publish automations (automations:publish)
Turns rules on and off (
activeinPATCH), copies a rule, deletes a rule. A copy of an active rule is active too, which is why copying needs this scope.- Risk: high.
- Review: goes through review and gets a closer look. A detailed explanation and a short video of the feature are needed; the target is 2 working days.
- Also grants: nothing else.
Endpoints:
DELETE /v1/automation_rules/{automation_rule_id}: Delete an automation rulePOST /v1/automation_rules/{automation_rule_id}/clone: Copy an automation rule
Example:
curl -X PATCH "https://api.clomni.ai/v1/automation_rules/6" \ -H "Authorization: Bearer clomni_pat_xxx" \ -H "Content-Type: application/json" \ -d '{"active": true}' - 11