Custom Agents
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/v1

Authentication

All endpoints require Bearer token authentication:

Authorization: Bearer YOUR_API_KEY

Agents

List Agents

GET /v1/agents

Returns 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/agents

Body:

{
  "name": "Sales Agent",
  "instructions": "You are a sales qualification agent...",
  "tone": "professional",
  "autonomyMode": "draft"
}

Get Agent

GET /v1/agents/:id

Update Agent

PATCH /v1/agents/:id

Delete Agent

DELETE /v1/agents/:id

Messages

Send Message

POST /v1/messages

Body:

{
  "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/messages

Get Message

GET /v1/messages/:id

Contacts

List Contacts

GET /v1/agents/:id/contacts

Get Contact

GET /v1/contacts/:id

Update Contact

PATCH /v1/contacts/:id

Webhooks

Create Webhook

POST /v1/webhooks

Body:

{
  "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.