Scopes and endpoints: AI agents, knowledge base, help center
Last updated: 11 November 2026 · 13 min read
Scopes for reading, training and publishing AI agents, getting answers from them, the knowledge base and the help center. Changing an AI agent takes two steps: ai_agents:write prepares the draft and ai_agents:publish makes it live.
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 AI agents (ai_agents:read)
Reads AI agents: settings, instructions, draft, versions, FAQs ("Q&A" in the dashboard), scenarios ("Situations" in the dashboard), test questions and runs, the agent's tools and the inboxes it answers in.
- Risk: low.
- Review: goes through review; low risk scopes are looked at quickly.
- Also grants: nothing else.
Endpoints:
GET /v1/ai_agent_faqs: List FAQ entriesGET /v1/ai_agent_faqs/{faq_id}: Get a FAQ entryGET /v1/ai_agent_tools: List AI agent toolsGET /v1/ai_agent_tools/{ai_agent_tool_id}: Get an AI agent toolGET /v1/ai_agents: List AI agentsGET /v1/ai_agents/tools: List tools an AI agent can useGET /v1/ai_agents/{ai_agent_id}: Get an AI agentGET /v1/ai_agents/{ai_agent_id}/draft: Get an AI agent's draftGET /v1/ai_agents/{ai_agent_id}/inboxes: List the inboxes an AI agent answers inGET /v1/ai_agents/{ai_agent_id}/scenarios: List scenariosGET /v1/ai_agents/{ai_agent_id}/scenarios/{scenario_id}: Get a scenarioGET /v1/ai_agents/{ai_agent_id}/test_questions: List test questionsGET /v1/ai_agents/{ai_agent_id}/test_runs/{test_run_id}: Get a test runGET /v1/ai_agents/{ai_agent_id}/versions: List an AI agent's versions
Example:
curl "https://api.clomni.ai/v1/ai_agents" \ -H "Authorization: Bearer clomni_pat_xxx"
curl "https://api.clomni.ai/v1/ai_agent_faqs" \ -H "Authorization: Bearer clomni_pat_xxx"
-
3
Edit AI agent drafts (ai_agents:write)
Creates AI agents, edits the draft's settings, saves and deletes scenarios in the draft. It does not touch the live agent:
ai_agents:publishmakes the draft live.- Risk: medium.
- Review: goes through review. Say exactly which data you use with it, when and why.
- Also grants:
ai_agents:read.
Endpoints:
POST /v1/ai_agents: Create an AI agentPATCH /v1/ai_agents/{ai_agent_id}/draft: Update an AI agent's draftPOST /v1/ai_agents/{ai_agent_id}/draft/scenarios: Save a scenario in the draftDELETE /v1/ai_agents/{ai_agent_id}/draft/scenarios/{scenario_id}: Delete a scenario from the draft
Example:
curl -X POST "https://api.clomni.ai/v1/ai_agents" \ -H "Authorization: Bearer clomni_pat_xxx" \ -H "Content-Type: application/json" \ -d '{"name": "Sales assistant", "description": "Answers order and delivery questions", "config": {"product_name": "Demo Store"}}' -
4
Train AI agents (ai_agents:train)
Trains AI agents: adds, changes and deletes FAQs, scenarios and test questions, imports test questions, starts test runs, marks results, rebuilds what the agent searches. Test runs and rebuilding use AI credit.
- Risk: medium.
- Review: goes through review. Say exactly which data you use with it, when and why.
- Also grants: nothing else.
Endpoints:
POST /v1/ai_agent_faqs: Create a FAQ entryPATCH /v1/ai_agent_faqs/{faq_id}: Update a FAQ entryDELETE /v1/ai_agent_faqs/{faq_id}: Delete a FAQ entryPOST /v1/ai_agents/{ai_agent_id}/scenarios: Create a scenarioPATCH /v1/ai_agents/{ai_agent_id}/scenarios/{scenario_id}: Update a scenarioDELETE /v1/ai_agents/{ai_agent_id}/scenarios/{scenario_id}: Delete a scenarioPOST /v1/ai_agents/{ai_agent_id}/test_questions: Create a test questionPOST /v1/ai_agents/{ai_agent_id}/test_questions/import: Import test questionsPATCH /v1/ai_agents/{ai_agent_id}/test_questions/{test_question_id}: Update a test questionDELETE /v1/ai_agents/{ai_agent_id}/test_questions/{test_question_id}: Delete a test questionPATCH /v1/ai_agents/{ai_agent_id}/test_results/{test_result_id}: Mark a test resultPOST /v1/ai_agents/{ai_agent_id}/test_runs: Start a test runPOST /v1/ai_agents/{ai_agent_id}/train: Retrain an AI agent
Example:
curl -X POST "https://api.clomni.ai/v1/ai_agent_faqs" \ -H "Authorization: Bearer clomni_pat_xxx" \ -H "Content-Type: application/json" \ -d '{"question": "How long does delivery take?", "answer": "1 working day in Baku, 2-3 working days to the regions.", "assistant_id": 4}' -
5
Publish AI agents (ai_agents:publish)
Changes the live agent: publishes the draft, restores an older version, changes settings at once with
PATCH /v1/ai_agents/{ai_agent_id}, connects the agent to an inbox and disconnects it, changes how it works in an inbox, deletes the agent. The answers customers get change, so it is high risk.- 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:
PATCH /v1/ai_agents/{ai_agent_id}: Update a live AI agentDELETE /v1/ai_agents/{ai_agent_id}: Delete an AI agentPOST /v1/ai_agents/{ai_agent_id}/draft/publish: Publish an AI agent's draftPOST /v1/ai_agents/{ai_agent_id}/inboxes: Connect an AI agent to an inboxPATCH /v1/ai_agents/{ai_agent_id}/inboxes/{inbox_id}: Change how an AI agent works in an inboxDELETE /v1/ai_agents/{ai_agent_id}/inboxes/{inbox_id}: Disconnect an AI agent from an inboxPOST /v1/ai_agents/{ai_agent_id}/versions/{version}/restore: Restore an AI agent version
Example:
curl -X POST "https://api.clomni.ai/v1/ai_agents/4/draft/publish" \ -H "Authorization: Bearer clomni_pat_xxx"
curl -X POST "https://api.clomni.ai/v1/ai_agents/4/inboxes" \ -H "Authorization: Bearer clomni_pat_xxx" \ -H "Content-Type: application/json" \ -d '{"inbox": {"inbox_id": 5}}' -
6
Ask an AI agent (ai_agents:ask)
Gets answers from an AI agent on your own platform, the way the agent's test panel answers. Nothing is written to any conversation. Every answer is charged to the AI credit; when it runs out you get 402
ai_credit_spent. Withhandoff: true, pass the question to a person.- Risk: medium.
- Review: goes through review. Say exactly which data you use with it, when and why.
- Also grants: nothing else.
Endpoints:
POST /v1/ai_agents/{ai_agent_id}/ask: Ask an AI agent
Example:
curl -X POST "https://api.clomni.ai/v1/ai_agents/4/ask" \ -H "Authorization: Bearer clomni_pat_xxx" \ -H "Content-Type: application/json" \ -d '{"question": "And to the regions?", "history": [{"role": "user", "content": "How long does delivery take?"}, {"role": "assistant", "content": "1 working day in Baku."}]}' -
7
Read the knowledge base (knowledge:read)
Reads the knowledge base documents and links and whether they have been read (
status,sync_status).- Risk: low.
- Review: goes through review; low risk scopes are looked at quickly.
- Also grants: nothing else.
Endpoints:
GET /v1/knowledge: List knowledge base documentsGET /v1/knowledge/{document_id}: Get a knowledge base document
Example:
curl "https://api.clomni.ai/v1/knowledge?assistant_id=4" \ -H "Authorization: Bearer clomni_pat_xxx"
-
8
Edit the knowledge base (knowledge:write)
Adds a web page by link or a file and deletes documents. A document is read in the background;
statusshows when it is ready. There is no separate update endpoint: when a page changes, delete the old document and add it again.- Risk: medium.
- Review: goes through review. Say exactly which data you use with it, when and why.
- Also grants:
knowledge:read.
Endpoints:
POST /v1/knowledge: Add a document or linkDELETE /v1/knowledge/{document_id}: Delete a knowledge base document
Example:
curl -X POST "https://api.clomni.ai/v1/knowledge" \ -H "Authorization: Bearer clomni_pat_xxx" \ -H "Content-Type: application/json" \ -d '{"document": {"name": "Delivery rules", "external_link": "https://demo-store.example/delivery", "assistant_id": 4}}' -
9
Read AI logs (ai_logs:read)
Reads the AI log: questions the agent could not answer, answer reviews and the agent's results.
- Risk: medium.
- Review: goes through review. Say exactly which data you use with it, when and why.
- Also grants: nothing else.
Endpoints:
GET /v1/ai_agents/{ai_agent_id}/gaps: List questions an AI agent could not answerGET /v1/ai_agents/{ai_agent_id}/results: Get an AI agent's resultsGET /v1/ai_agents/{ai_agent_id}/reviews: List AI answer reviewsGET /v1/ai_agents/{ai_agent_id}/reviews/{review_id}: Get an AI answer review
Example:
curl "https://api.clomni.ai/v1/ai_agents/4/gaps" \ -H "Authorization: Bearer clomni_pat_xxx"
-
10
Read the help center (help_center:read)
Reads help center portals, categories and articles, and searches articles.
- Risk: low.
- Review: goes through review; low risk scopes are looked at quickly.
- Also grants: nothing else.
Endpoints:
GET /v1/portals: List help center portalsGET /v1/portals/{portal_id}: Get a help center portalGET /v1/portals/{portal_id}/articles: List articlesGET /v1/portals/{portal_id}/articles/{article_id}: Get an articleGET /v1/portals/{portal_id}/categories: List categoriesGET /v1/portals/{portal_id}/categories/{category_id}: Get a categoryGET /v1/search/articles: Search help center articles
Example:
curl "https://api.clomni.ai/v1/portals" \ -H "Authorization: Bearer clomni_pat_xxx"
-
11
Edit the help center (help_center:write)
Writes, edits, publishes and deletes articles, creates categories, changes the order and the portal settings.
- Risk: medium.
- Review: goes through review. Say exactly which data you use with it, when and why.
- Also grants:
help_center:read.
Endpoints:
PATCH /v1/portals/{portal_id}: Update a help center portalPOST /v1/portals/{portal_id}/articles: Create an articlePOST /v1/portals/{portal_id}/articles/reorder: Reorder articlesPATCH /v1/portals/{portal_id}/articles/{article_id}: Update an articleDELETE /v1/portals/{portal_id}/articles/{article_id}: Delete an articlePOST /v1/portals/{portal_id}/categories: Create a categoryPOST /v1/portals/{portal_id}/categories/reorder: Reorder categoriesPATCH /v1/portals/{portal_id}/categories/{category_id}: Update a categoryDELETE /v1/portals/{portal_id}/categories/{category_id}: Delete a category
Example:
curl -X POST "https://api.clomni.ai/v1/portals/demo-store/articles" \ -H "Authorization: Bearer clomni_pat_xxx" \ -H "Content-Type: application/json" \ -d '{"title": "How do I track my order?", "content": "Find your order number under My orders.", "category_id": 11, "status": "published", "locale": "en"}' -
12
About the help center
The customer help site (portal, categories, articles) is not in any Clomni package since 5 November 2026 and is not shown in the dashboard. The
help_center:*scopes and endpoints stay in the catalogue, but do not build new integrations on them. To answer customers automatically, use the AI agent's knowledge base (knowledge:write) and FAQs (ai_agents:train). - 13