Create agent
curl --request POST \
--url https://prod-platform-core-api.20x.business/api/v1/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"agent_persona_id": "<string>"
}
'import requests
url = "https://prod-platform-core-api.20x.business/api/v1/agents"
payload = {
"name": "<string>",
"agent_persona_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', agent_persona_id: '<string>'})
};
fetch('https://prod-platform-core-api.20x.business/api/v1/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Agents
Create agent
Create a new AI voice agent
POST
/
agents
Create agent
curl --request POST \
--url https://prod-platform-core-api.20x.business/api/v1/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"agent_persona_id": "<string>"
}
'import requests
url = "https://prod-platform-core-api.20x.business/api/v1/agents"
payload = {
"name": "<string>",
"agent_persona_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', agent_persona_id: '<string>'})
};
fetch('https://prod-platform-core-api.20x.business/api/v1/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Creates a minimal agent from a persona. The prompt, voice, and other behavior
settings are configured afterward via Patch update agent.
Body parameters
string
required
Agent display name, 1–120 characters.
string
required
A persona ID to initialize the agent with — list available personas via
GET /prompts/personas.curl -X POST https://prod-platform-core-api.20x.business/api/v1/agents \
-H "Authorization: Bearer $AGENTIC_OS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Sales Voice Agent",
"agent_persona_id": "c7a840e6-..."
}'
requests.post(
"https://prod-platform-core-api.20x.business/api/v1/agents",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"name": "Sales Voice Agent",
"agent_persona_id": "c7a840e6-...",
},
)
await fetch("https://prod-platform-core-api.20x.business/api/v1/agents", {
method: "POST",
headers: {
Authorization: `Bearer ${API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Sales Voice Agent",
agent_persona_id: "c7a840e6-...",
}),
});
Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Support Agent",
"is_active": true
}
The response’s
id is the agent’s channel id, used for most endpoints
(calls, campaigns, patching). Some endpoints — like generating a prompt — use
the agent’s underlying brain id instead, returned as agent_id or
brain.id on this same response.
