AI Agents API
An AI Agent is the brain behind your bot: its instructions, personality, language, knowledge and tools. You build an Agent once and then point traffic at it. This guide explains how Agents work over the API and what to watch out for. Every field of every endpoint is in the API Reference.
- Base URL:
https://api.dmchamp.com/v1 - Authentication: your API key (see Authentication), as
?apiKey=or theX-API-Keyheader - Errors and paging: see Errors & Pagination
If you are new to Agents as a concept, read AI Agents first.
Agencies: every endpoint on this page accepts
sub_account_id, so you can build and configure a client’s Agent with your agency key. Send it as a query parameter. See API for Agencies.
How an Agent fits together
Four things are managed separately, and it helps to know which is which before you start:
| Piece | What it is | Where you set it |
|---|---|---|
| Configuration | Instructions, rules, goal, personality, language, AI tier, booking and follow-up behaviour | PUT /agents/{agentId} or the narrower PUT /agents/{agentId}/bot-config |
| Knowledge | FAQs and knowledge sources (pages and documents the platform has read for you) | FAQs API and POST /agents/{agentId}/kb-sources |
| Tools | Custom functions and MCP servers the Agent may call mid-conversation | POST /agents/{agentId}/custom-functions and POST /agents/{agentId}/mcp-servers |
| Routing | Which channels and conversations actually reach this Agent | Entry Points: PUT /entry-points/channel-defaults and POST /agents/{agentId}/entry-points |
A new Agent answers nobody until you route to it. Creating an Agent does not put it on a channel. That is the step most integrations miss. See Routing conversations to an Agent at the end of this page.
Live edits and drafts. Fields you send to PUT /agents/{agentId} or PUT /agents/{agentId}/bot-config go live at once, with no draft and no version history entry. To stage a change, send it with the test_bot. prefix; it waits as a draft until you publish it, which records a version.
The Agent document is large. A full Agent (mostly its FAQ list, knowledge sources and page content read from your website) can reach 580 KB, and listing a 64-Agent account in full passes 3 MB. Ask for summary rows or a field list whenever you can.
Endpoints
| Task | Method and path | Explorer |
|---|---|---|
| List Agents | GET /agents |
Open in API Reference |
| Create an Agent | POST /agents |
Open in API Reference |
| Get an Agent | GET /agents/{agentId} |
Open in API Reference |
| Update an Agent | PUT /agents/{agentId} |
Open in API Reference |
| Update bot settings | PUT /agents/{agentId}/bot-config |
Open in API Reference |
| Set active hours | PUT /agents/{agentId}/active-hours |
Open in API Reference |
| Pause or resume | PATCH /agents/{agentId}/active |
Open in API Reference |
| Duplicate | POST /agents/{agentId}/duplicate |
Open in API Reference |
| Copy into a sub-account | POST /subaccounts/agents/copy |
Open in API Reference |
| Copy (deprecated) | POST /subaccounts/campaigns/copy |
Open in API Reference |
| Delete | DELETE /agents/{agentId} |
Open in API Reference |
| Publish the draft | POST /agents/{agentId}/publish-draft |
Open in API Reference |
| Discard the draft | POST /agents/{agentId}/discard-draft |
Open in API Reference |
| Optimize with AI | POST /agents/{agentId}/optimize |
Open in API Reference |
| Add a tagging rule | POST /agents/{agentId}/tags |
Open in API Reference |
| Replace a tagging rule | PUT /agents/{agentId}/tags/{tagId} |
Open in API Reference |
| Remove a tagging rule | DELETE /agents/{agentId}/tags/{tagId} |
Open in API Reference |
| Generate tagging rules with AI | POST /agents/{agentId}/tags/generate |
Open in API Reference |
| Attach knowledge sources | POST /agents/{agentId}/kb-sources |
Open in API Reference |
| Detach one knowledge source | DELETE /agents/{agentId}/kb-sources/{kbSourceId} |
Open in API Reference |
| Detach several knowledge sources | POST /agents/{agentId}/kb-sources/bulk-remove |
Open in API Reference |
| Add a page to the knowledge base | POST /kb-sources/url |
Open in API Reference |
| Add a document | POST /kb-sources/file |
Open in API Reference |
| Import a whole site | POST /kb-sources/bulk-import |
Open in API Reference |
| Check an import | GET /kb-sources/{sourceId} |
Open in API Reference |
| Link a FAQ to an Agent | POST /faqs/{faqId}/link |
Open in API Reference |
| Unlink a FAQ | POST /faqs/{faqId}/unlink |
Open in API Reference |
| Attach a custom function | POST /agents/{agentId}/custom-functions |
Open in API Reference |
| Detach a custom function | DELETE /agents/{agentId}/custom-functions/{customFunctionId} |
Open in API Reference |
| Register an MCP server | POST /mcp-servers |
Open in API Reference |
| List MCP servers | GET /mcp-servers |
Open in API Reference |
| Update an MCP server | PUT /mcp-servers/{serverId} |
Open in API Reference |
| Delete an MCP server | DELETE /mcp-servers/{serverId} |
Open in API Reference |
| Test an MCP connection | POST /mcp-servers/test-connection |
Open in API Reference |
| Attach an MCP server | POST /agents/{agentId}/mcp-servers |
Open in API Reference |
| Detach an MCP server | DELETE /agents/{agentId}/mcp-servers/{mcpServerId} |
Open in API Reference |
| List media | GET /agents/{agentId}/media-library |
Open in API Reference |
| Upload media | POST /agents/{agentId}/media-library |
Open in API Reference |
| Update a media item | PATCH /agents/{agentId}/media-library/{itemId} |
Open in API Reference |
| Delete a media item | DELETE /agents/{agentId}/media-library/{itemId} |
Open in API Reference |
| Generate follow-up messages | POST /agents/{agentId}/template-generation |
Open in API Reference |
| List an Agent’s Entry Points | GET /agents/{agentId}/entry-points |
Open in API Reference |
| Create an Entry Point | POST /agents/{agentId}/entry-points |
Open in API Reference |
| Read channel defaults | GET /entry-points/channel-defaults |
Open in API Reference |
| Point a channel at an Agent | PUT /entry-points/channel-defaults |
Open in API Reference |
| Leave a channel unanswered | DELETE /entry-points/channel-defaults |
Open in API Reference |
| Check routing status | GET /entry-points/routing-status |
Open in API Reference |
List Agents
GET /agents returns every Agent on the account, newest first. It is not paged, and by default each Agent comes back in full. Pass view=summary for a short row per Agent (id, name, active, language, goal, AI tier, counts), and fields=id,name,active to trim the row further. Then read the one you want with Get an Agent.
curl "https://api.dmchamp.com/v1/agents?apiKey=YOUR_API_KEY&view=summary&fields=id,name,active"
- Any
viewvalue other thansummaryreturns400.fieldsonly applies together withview=summary;idis always included and unknown names are ignored. - The summary
goalis cut to its first 200 characters; a trailing ellipsis means it was shortened. - Some responses carry
substrate_campaign_id. It is an internal record kept on older accounts; you never need to act on it, and on newer accounts it isnullor absent.
Create an Agent
Only name is really needed; send whatever configuration you already know alongside it. A new Agent is active by default, but it still answers nobody until you route to it.
curl -X POST "https://api.dmchamp.com/v1/agents?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Listing assistant",
"language": "en",
"scrape_urls": ["https://example.com", "https://example.com/faq"]
}'
{ "success": true, "agent_id": "ag7HkQ2ZpLxR3mNb", "agent_generation_queued": true }
- Building an Agent from your website. Include
scrape_urlsand the platform reads those pages and writes the instructions for you.agent_generation_queued: truetells you that generation started, so you know to poll the Agent for progress. - A
400can also mean the Agent exceeds the configuration size your plan allows. A403means the account may not use one of the settings you sent, for example an AI tier its account provider has not granted, or the account is at its plan’s Agent limit.
Get an Agent
GET /agents/{agentId}. Pass fields=name,active,goal to get back only what you need; id is always included, and names that do not exist on the Agent are ignored rather than rejected. An Agent that is not on your account returns 404.
Update an Agent
PUT /agents/{agentId}: send only the fields you want to change; everything else is left untouched.
curl -X PUT "https://api.dmchamp.com/v1/agents/ag7HkQ2ZpLxR3mNb?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"instructions": "Answer questions about our listings and always offer a viewing.",
"availability.monday": { "start_time": "09:00", "end_time": "17:00" }
}'
- Dotted keys address nested settings leaf by leaf, so
"availability.monday"changes just Monday and leaves the rest of the week alone. - Root fields go live at once. Every field at the root of the body, the instruction fields included (
rules,goal,personality,instructions,conversation_flow,objection_handling,conclude_unless,email_instructionsand the rest), is used from the next reply. It skips the draft and adds no version history entry. To stage a change instead, send{"test_bot.rules": "..."}: it lands in the draft, and publishing puts it live and records a version. - Booking event. Send
event_id(ornullto clear it) to change the bookable event type the Agent books into, orevent_idswith an array to link several at once: the first becomes the primary and[]unlinks everything. The two are mutually exclusive, and theeventfield itself cannot be written. enable_bookingsmust be a real boolean, andbooking_providermust be one ofdefault,zenchef,formitable,opentable,thefork.- Ownership and identity fields are ignored, as is internal run state (generation and optimisation progress). An empty body returns
400with"No fields to update". - Routing is not set here. Use the Entry Point calls, and
PATCH /agents/{agentId}/activeto pause or resume.
Update bot settings
PUT /agents/{agentId}/bot-config is the narrow, focused way to change a handful of conversational settings (instructions, rules, goal, personality, language, AI speed and tier, message cap, human alerts, AI transparency). An Agent has no separate bot section, so the field names are the same ones PUT /agents/{agentId} takes. At least one field is required.
- Changes are live at once, with no draft and no version entry. To stage an edit, use
PUT /agents/{agentId}withtest_bot.keys and publish. - Field names must be plain names (letters, numbers, underscores, hyphens). Dotted paths are rejected with
400here, sobot.goalfails. - Long text counts against the configuration size your plan allows, so a very large instruction set can be refused with
400.
Set active hours
PUT /agents/{agentId}/active-hours sets the hours during which the Agent replies automatically. Outside those windows it stays quiet.
curl -X PUT "https://api.dmchamp.com/v1/agents/ag7HkQ2ZpLxR3mNb/active-hours?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"availability": {
"monday": { "start_time": "09:00", "end_time": "17:00" },
"tuesday": [
{ "start_time": "09:00", "end_time": "12:00" },
{ "start_time": "13:00", "end_time": "17:00" }
]
}
}'
Each weekday takes one window or a list of windows, in 24-hour HH:MM. Days you leave out keep what they had. Any key that is not monday through sunday is rejected with 400 ("Invalid availability keys: funday. ..."), so a typo cannot silently do nothing.
Pause or resume an Agent
PATCH /agents/{agentId}/active with { "active": false } or true. A paused Agent keeps all of its configuration but stops replying immediately; resuming takes effect straight away. active must be a real boolean, anything else returns 400.
Duplicate an Agent
POST /agents/{agentId}/duplicate creates a copy with its configuration preserved and returns the new agent_id. The copy sends nothing until you point a channel or an Entry Point at it. A duplicate counts against your plan’s Agent allowance like a new Agent, so it is refused with 403 at the limit.
Copy an Agent into a sub-account (agencies)
POST /subaccounts/agents/copy copies an Agent from your agency account (or one of your sub-accounts) into another sub-account, deep-copying what it depends on so the copy works on its own there. This is the call for a master Agent every new client should start with. It replaces the deprecated POST /subaccounts/campaigns/copy.
curl -X POST "https://api.dmchamp.com/v1/subaccounts/agents/copy" \
-H "X-API-Key: YOUR_AGENCY_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "agentId": "ag7HkQ2ZpLxR3mNb", "targetUserId": "abc123def456", "newName": "Inbound Instagram Leads" }'
- It names both accounts itself, so it does not take
sub_account_id. It needs an agency key with the team-management area at edit level. - FAQs and knowledge sources come along by default (
copyFaqs); custom functions and MCP servers only withcopyCustomFunctions: true. The media library always comes along. Contacts, WhatsApp templates and connected social posts never do. - The copy arrives paused (
active: false) and with no routing. Resume it withPATCH /agents/{agentId}/activeand point the client’s channels at it withPUT /entry-points/channel-defaults. The API for Agencies page walks through all three calls. - If anything fails part-way, everything already created in the target account is rolled back.
data.agent_idis the new Agent;data.countssays how much was copied.
Delete an Agent
DELETE /agents/{agentId}. The delete is refused with 409 while the Agent is still attached to something that would stop working without it: a broadcast, an Entry Point, or (on older accounts) a campaign. The response lists what holds it in blocking_broadcast_ids, blocking_entry_point_ids and blocking_campaign_ids, so you can detach those and retry.
Drafts: review changes before they go live
Edits made in the editor, any rewrite from Optimize with AI, and fields sent to PUT /agents/{agentId} with the test_bot. prefix are held as an unpublished draft. The live Agent keeps answering with its current configuration until you publish. Fields sent without the prefix, or to bot-config, skip the draft (see Update an Agent).
Publish the draft
curl -X POST "https://api.dmchamp.com/v1/agents/ag7HkQ2ZpLxR3mNb/publish-draft?apiKey=YOUR_API_KEY"
{ "success": true, "agent_id": "ag7HkQ2ZpLxR3mNb", "published_keys": ["instructions", "goal"] }
Publishing moves the draft onto the live configuration, clears the draft and saves a version to the Agent’s history. published_keys lists what changed. Publishing an Agent with no draft returns 400 (“This agent has no unpublished draft.”).
Discard the draft
POST /agents/{agentId}/discard-draft throws the draft away and leaves the live configuration as it is. Safe to call when there is no draft.
Optimize an Agent with AI
POST /agents/{agentId}/optimize rewrites the Agent’s configuration from your feedback (“it keeps offering discounts”, “answers are too long”) and saves the rewrite as a draft, not live.
curl -X POST "https://api.dmchamp.com/v1/agents/ag7HkQ2ZpLxR3mNb/optimize?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "user_feedback": "Keep replies under three sentences." }'
- Send
user_feedback, orthumbs_down_feedbackwith the offendingthumbs_down_messagewhen reacting to a specific bad reply. At least one must carry text. - It returns
202and runs in the background. Read the Agent and watchoptimize_run.status; once it is back toDraft, review the draft, then publish or discard it. - One run at a time per Agent (
409otherwise). It uses AI credits.
Tagging rules
A tagging rule is a tag plus a description of when it applies. During a conversation the Agent reads that description and tags the contact when it fits, which is how tag-driven automations get triggered. A rule can also call a webhook when applied, and ai_can_remove (off by default) lets the Agent take the tag off again.
curl -X POST "https://api.dmchamp.com/v1/agents/ag7HkQ2ZpLxR3mNb/tags?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "tag": { "name": "hot-lead", "description": "Apply when the contact asks about pricing or wants to book a call." } }'
- Without a
tag_id, a rule links to the account tag with the same name, creating it if there is none, so every rule can be addressed by tag id afterwards. - Replacing a rule replaces it wholesale, not merged: send the full rule. The tag it points at is kept even if you leave
tag_idout, so an edit cannot detach the rule from its tag. - Removing a rule only stops the Agent applying the tag. The tag itself, and contacts already carrying it, are untouched.
- Replace and remove return
404when the Agent does not exist or has no rule for that tag. - Generate with AI (
POST /agents/{agentId}/tags/generate) designs a whole rule set from the Agent’s instructions and goal.mode: "merge"(default) adds to the existing rules,replacestarts from scratch. It returns202; watchtag_generation.status, and the rules land in the Agent’stags. One run at a time (409otherwise), and it uses AI credits.
Knowledge sources
Knowledge sources are the pages and documents the platform has read for you. Attaching one to an Agent lets it answer from that content.
Where source ids come from. Add content with POST /kb-sources/url (a page), POST /kb-sources/file (a document) or POST /kb-sources/bulk-import (a whole site). Each returns a source_id you poll with GET /kb-sources/{sourceId} until it is ready. POST /kb-sources/url also takes autoLinkToAgentId, which attaches the source to an Agent as soon as the import finishes, so you can skip the attach call.
curl -X POST "https://api.dmchamp.com/v1/agents/ag7HkQ2ZpLxR3mNb/kb-sources?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "kb_source_ids": ["kb2QwErTyUi9OpAs", "kb6ZxCvBnM4kLjHg"] }'
- Send
kb_source_idsfor a set (what you want after crawling a site) orkb_source_idfor one, not both. - Detach one with
DELETE /agents/{agentId}/kb-sources/{kbSourceId}, or several withPOST /agents/{agentId}/kb-sources/bulk-remove(aPOSTbecause the ids travel in the body). The sources are not deleted and stay available to your other Agents. - Attaching something already attached, or detaching something that is not, changes nothing.
FAQs
FAQs are managed on their own endpoints and linked to an Agent from there: POST /faqs/{faqId}/link with { "agent_id": "ag7HkQ2ZpLxR3mNb" }, and POST /faqs/{faqId}/unlink to take it away again. A FAQ can be shared by any number of Agents, but it is only used by the Agents it is linked to: creating one is not enough. See the FAQs API.
Tools
Custom functions
POST /agents/{agentId}/custom-functions with { "custom_function_id": "..." } lets the Agent call one of your custom functions during conversations. Only functions on the same account can be attached, and attaching one twice changes nothing. DELETE /agents/{agentId}/custom-functions/{customFunctionId} detaches it; the function itself stays available to your other Agents. Manage the functions themselves on /custom-functions, see Custom Functions.
MCP servers
An MCP server is a ready-made bundle of tools your Agent can discover and call on its own (see Connect MCP Servers to Your Bot). Servers are registered once on the account, then attached to whichever Agents should use them. Registering does not give any Agent access.
# 1. Register
curl -X POST "https://api.dmchamp.com/v1/mcp-servers?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Inventory", "url": "https://tools.example.com/mcp", "auth_header_value": "Bearer sk_live_xxx" }'
# 2. Attach to an Agent, using the server_id from step 1
curl -X POST "https://api.dmchamp.com/v1/agents/ag7HkQ2ZpLxR3mNb/mcp-servers?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "mcp_server_id": "ms4TgBnH7yUj2kLp" }'
- Plan gate. MCP servers need the custom functions feature on your plan; without it the account-level
/mcp-serversendpoints return403. Attaching an already registered server to an Agent is not gated. - The
urlmust be reachable over the public internet. On save the platform connects and caches the server’s tool list. A server that cannot be reached still saves, with the reason inlast_errorand an empty tool list, so you can register first and fix connectivity afterwards. auth_type: "oauth2"saves withoauth_connected: falseand no tools. Authorising an OAuth server needs a browser sign-in in the dashboard, not the API.- Secrets never come back. Responses carry
auth_header_value_set(true or false) instead of the credential; OAuth tokens and client secrets stay server-side. - Updating the URL or auth fields re-tests the connection and refreshes the tool list. Deleting a server unlinks it from every Agent and campaign that had it enabled.
- Test a connection with
server_id(tests the saved setup and refreshes its tool list) or an inlineurlplus auth (a pre-save test that stores nothing). A failed connection is not an HTTP error: you get200withsuccess: falseand anerror, so you can show it next to the field being edited. DELETE /agents/{agentId}/mcp-servers/{mcpServerId}detaches a server; it stays registered for your other Agents. Attaching or detaching twice changes nothing.
Media library
The media library holds the files an Agent may send during a conversation: a menu, a price list, a product photo. An Agent can hold at most 50 items.
curl -X POST "https://api.dmchamp.com/v1/agents/ag7HkQ2ZpLxR3mNb/media-library?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"base64Data": "JVBERi0xLjQKJcfs...",
"mimeType": "application/pdf",
"fileName": "spring-menu.pdf",
"title": "Spring menu",
"description": "Send when someone asks what is on the menu."
}'
- Upload is base64 inline (no data-URL prefix), up to 10 MB, and returns once the file is stored, so allow a little longer than a normal request. This body uses camelCase; the update body uses snake_case.
descriptionis the “when should the Agent send this” instruction.sendMessage(trimmed to 500 characters) is the wording the Agent says when sending.maxSendsPerConversationdefaults to1.sendAsVoiceNotestores an audio upload as a WhatsApp voice note and is ignored for other types.- Two things happen automatically: an animated GIF is converted to video so it plays on every channel, and the platform writes a short summary of what is in the file so the Agent knows when it fits.
- A
400covers missing fields, an unsupported type, an empty or oversized file and the 50-item limit. A403means the media library is switched off for the account. - Listing returns items stored on the Agent first, then older items still stored on the campaign the Agent was built from;
media_home(agentorcampaign) says which. Newest first within each group. media_urlexpires after 7 days. Treat an old one as stale rather than broken and re-read the list for a fresh link.- Update (
PATCH) changes metadata only (title,description,send_message,max_sends_per_conversation, which takes a non-negative whole number ornullto clear the limit). To change the file, upload a new item and delete the old one. - Delete removes the item and its stored file. Deleting an item that is already gone succeeds with
deleted: false, so it is safe to retry.
Generate follow-up messages
POST /agents/{agentId}/template-generation writes the Agent’s follow-up messages for you (the nudges it sends when a conversation goes quiet), based on what the Agent is for. type: "all" (default) writes the whole set; cold_only writes only the messages for contacts who never replied.
curl -X POST "https://api.dmchamp.com/v1/agents/ag7HkQ2ZpLxR3mNb/template-generation?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "type": "all" }'
- The
targetfield says how it came back.target: "agent"with200(the usual case): the messages were written during the call; read them back from the Agent’sfollow_up_config.target: "campaign"with202: the work was queued against the campaign incampaign_id; watch that campaign’stemplate_generation_status. cold_onlyneeds an outgoing campaign and is refused with409(reason: "cold_only_requires_campaign") on an Agent without one.- A
403means automatic follow-ups are not switched on for the account. It uses AI credits;400with"Insufficient credits."means the account is out.
Routing conversations to an Agent
An Agent only answers the conversations an Entry Point sends it. Until a channel has one, a first message from someone you have never spoken to is still stored, but nothing picks it up and no assistant replies.
| What you want to do | Call |
|---|---|
| Make an Agent the answerer for a whole channel | PUT /entry-points/channel-defaults with { "channel": "instagram", "agent_id": "AGENT_ID" } |
| Add a narrower rule (keywords, comments, new followers) | POST /agents/{agentId}/entry-points |
| See the rules pointing at one Agent | GET /agents/{agentId}/entry-points |
| See every channel’s default, including one set to nobody | GET /entry-points/channel-defaults |
| Leave a channel with nobody answering | DELETE /entry-points/channel-defaults?channel=instagram |
curl -X POST "https://api.dmchamp.com/v1/agents/ag7HkQ2ZpLxR3mNb/entry-points?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "type": "keyword", "channels": ["whatsapp", "instagram"], "match_config": { "keywords": ["pricing", "quote"] } }'
- Rule types:
keyword(the Agent takes over when the first message contains one ofmatch_config.keywords; at least one is required),instagram_comment/facebook_comment(replies to comments on your posts; the matching channel must be inchannels),instagram_follower(greets new followers) andchannel_default. - Prefer
PUT /entry-points/channel-defaultsfor a channel default: it retires the previous answerer for you, which creating a secondchannel_defaultrule here does not. channelsis required (for examplewhatsapp,whatsapp_web,instagram,messenger,telegram,sms,email,chat_widget,custom_channel). New rules are enabled unless you say otherwise. The Agent in the path always wins, so a rule cannot be created for a different Agent.- Listing an Agent’s Entry Points returns current and retired rules, newest first; a retired one has
enabled: false. - Which rule wins: an ongoing conversation or a manual assignment keeps its Agent; otherwise keyword rules beat comment rules, which beat follower rules, and a channel default is the last resort. Whether these rules decide anything yet on an account is reported by
GET /entry-points/routing-status.
The Entry Points API guide covers the full ladder, one Agent per WhatsApp number, and changing or deleting a rule. See Entry Points for the concept and the Channels API for connecting the channel itself.
Good to know
- Error shape. Agent endpoints return
{ "success": false, "error": "..." }. A404means the Agent, tag rule, media item or MCP server does not exist or belongs to another account. A409means something is in flight or in the way (an optimisation or tag generation running, an Agent still attached,cold_onlywithout a campaign). A change that exceeds your plan’s configuration size is a400, not a403. - The shared codes every endpoint can return (
401,403for no API access,429,500) are listed with retry guidance in Errors & Pagination. - The
/agentsand/mcp-serversendpoints are in the published specification, so you can browse their exact fields and run live requests in the API Reference.
Being in the specification also means the Agent endpoints — and the /mcp-servers endpoints — show up as tools for any AI assistant you connect over MCP.
Related
- AI Agents: what an Agent is, in plain language.
- Entry Points: how conversations get routed to an Agent.
- FAQs API: build and link the knowledge your Agent answers from.
- Channels API: connect the channels an Agent answers on.
- Connect MCP Servers to Your Bot · Custom Functions
- API Reference: the full interactive endpoint explorer.