Skip to content

API Reference

https://api.chatagent.so/v1
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
GET /conversations

Query parameters:

Parameter Type Description
status string Filter by status: active, resolved, archived
platform string Filter by platform: whatsapp, facebook, instagram
limit integer Results per page (default: 20, max: 100)
offset integer Pagination offset
search string Search in contact name or phone

Response:

{
"data": [
{
"id": "conv_abc123",
"contact": {
"id": "cnt_123",
"name": "John Doe",
"phone": "+1234567890"
},
"platform": "whatsapp",
"status": "active",
"message_count": 5,
"last_message": {
"content": "Thanks for your help!",
"timestamp": "2026-01-15T10:30:00Z"
},
"created_at": "2026-01-15T10:00:00Z"
}
],
"total": 150,
"limit": 20,
"offset": 0
}
GET /conversations/:id
POST /messages

Request body:

{
"conversation_id": "conv_abc123",
"content": "Thanks for your order!",
"type": "text"
}
GET /contacts
GET /contacts/:id
POST /contacts

Request body:

{
"name": "Jane Smith",
"phone": "+0987654321",
"email": "jane@example.com",
"tags": ["vip", "new-customer"]
}
PATCH /contacts/:id
DELETE /contacts/:id
GET /orders
GET /orders/:id
GET /tags
POST /contacts/:id/tags

Request body:

{
"tag": "vip"
}
DELETE /contacts/:id/tags/:tag
POST /workflows/:id/trigger

Request body:

{
"contact_id": "cnt_123",
"data": {
"order_id": "ord_456"
}
}
GET /workflows/:id/runs
Status Code Description
400 bad_request Invalid request body or parameters
401 unauthorized Missing or invalid API key
403 forbidden Key doesn’t have permission
404 not_found Resource doesn’t exist
429 rate_limited Too many requests
500 server_error Internal error

Error response:

{
"error": {
"code": "bad_request",
"message": "Phone number is required",
"details": {
"field": "phone",
"constraint": "required"
}
}
}

All list endpoints support pagination:

GET /conversations?limit=20&offset=40

Response includes:

{
"data": [...],
"total": 150,
"limit": 20,
"offset": 40,
"has_more": true
}