Skip to content
Go To Dashboard

Create a new agent

POST /v1/agents

Requires Bearer token authentication.

{
"label": "Marketing Automation Bot",
"name": "marketing-agent-99",
"description": "Handles automated email campaigns and newsletter distribution",
"status": "active"
}
Terminal window
curl -X POST "https://api.sapiom.ai/v1/agents" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"label": "Marketing Automation Bot",
"name": "marketing-agent-99",
"description": "Handles automated email campaigns and newsletter distribution",
"status": "active"
}'
{
"id": "string",
"tenantId": "string",
"label": "string",
"name": "string",
"description": null,
"status": "string",
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-01-15T10:30:00Z"
}
StatusCodeDescription
400-Invalid request data or agent name already exists
401-Unauthorized - invalid or missing JWT token
403-Forbidden - insufficient permissions

See API Introduction for error handling details.