Create a new agent
Endpoint
Section titled “Endpoint”POST /v1/agents
Authentication
Section titled “Authentication”Requires Bearer token authentication.
Request Body
Section titled “Request Body”{ "label": "Marketing Automation Bot", "name": "marketing-agent-99", "description": "Handles automated email campaigns and newsletter distribution", "status": "active"}cURL Example
Section titled “cURL Example”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"}'Response
Section titled “Response”{ "id": "string", "tenantId": "string", "label": "string", "name": "string", "description": null, "status": "string", "createdAt": "2025-01-15T10:30:00Z", "updatedAt": "2025-01-15T10:30:00Z"}Error Responses
Section titled “Error Responses”| Status | Code | Description |
|---|---|---|
| 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.