Developers
API Reference
Full REST API documentation for Custom Agents. Create agents, send messages, manage contacts, and configure webhooks.
Base URL
https://api.customagents.io/v1Authentication
All endpoints require Bearer token authentication:
Authorization: Bearer YOUR_API_KEYAgents
List Agents
GET /v1/agentsReturns a list of all agents on your account.
Response:
{
"data": [
{
"id": "agent_abc123",
"name": "Customer Support",
"email": "support@yourdomain.com",
"status": "active",
"autonomyMode": "auto-respond",
"createdAt": "2025-01-15T10:30:00Z"
}
]
}Create Agent
POST /v1/agentsBody:
{
"name": "Sales Agent",
"instructions": "You are a sales qualification agent...",
"tone": "professional",
"autonomyMode": "draft"
}Get Agent
GET /v1/agents/:idUpdate Agent
PATCH /v1/agents/:idDelete Agent
DELETE /v1/agents/:idMessages
Send Message
POST /v1/messagesBody:
{
"agentId": "agent_abc123",
"to": "customer@example.com",
"subject": "Re: Your inquiry",
"body": "Thanks for reaching out!",
"threadId": "thread_xyz789"
}List Messages
GET /v1/agents/:id/messagesGet Message
GET /v1/messages/:idContacts
List Contacts
GET /v1/agents/:id/contactsGet Contact
GET /v1/contacts/:idUpdate Contact
PATCH /v1/contacts/:idWebhooks
Create Webhook
POST /v1/webhooksBody:
{
"url": "https://yourapp.com/webhook",
"events": ["message.received", "message.sent", "contact.created"]
}See the Webhooks documentation for the full list of events.
Start integrating
Get your API key from the dashboard and start building.