Getting Started
Introduction to the NexaDesk REST API
The NexaDesk API is a REST API that gives you programmatic access to your leads, contacts, and conversations. Use it to build integrations, sync data with other tools, or automate workflows.
Base URL
All API requests use this base URL:
https://chats.nexadesk.ai/api/v1/external
Authentication
Every request requires an API key passed as a Bearer token in the Authorization header:
Authorization: Bearer fc_live_xxxxxxxxxxxx
See Authentication for details on creating and managing API keys.
Request Format
- Content-Type:
application/jsonfor POST and PATCH requests - Method: GET for reads, POST for creates, PATCH for updates, DELETE for deletes
- Query parameters: Used for filtering, sorting, and pagination on GET requests
Response Format
All responses follow this envelope format:
{
"success": true,
"data": { ... },
"pagination": {
"has_more": false,
"next_cursor": null,
"total_count": 42,
"limit": 50
}
}
For single-resource responses (create, update, get by ID), data is an object. For list endpoints, data is an array.
Error responses follow this format:
{
"success": false,
"error": "Description of what went wrong"
}
Pagination
List endpoints support cursor-based pagination:
| Parameter | Default | Description |
|---|---|---|
limit | 50 | Results per page (max 100) |
cursor | — | Cursor from previous response's next_cursor |
page | 1 | Offset-based fallback (if not using cursors) |
Use the next_cursor value from the response to fetch the next page.
Sorting
Most list endpoints accept a sort parameter in the format field:direction:
GET /api/v1/external/leads?sort=created_at:desc
Common sort fields: created_at, updated_at, name.
Rate Limits
- 100 requests per minute per API key
- Rate limit headers are included in every response:
X-RateLimit-Limit— Maximum requests per windowX-RateLimit-Remaining— Remaining requests in current windowX-RateLimit-Reset— Unix timestamp when the window resets
When rate limited, you receive a 429 Too Many Requests response.
HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad request (validation error) |
| 401 | Unauthorized (invalid or missing API key) |
| 403 | Forbidden (insufficient scope) |
| 404 | Resource not found |
| 409 | Conflict (duplicate resource) |
| 429 | Rate limited |
| 500 | Internal server error |
Available Endpoints
| Resource | Endpoints |
|---|---|
| Leads | GET, POST, PATCH, DELETE |
| Contacts | GET, POST, PATCH, DELETE |
| Conversations | GET, PATCH |
| Webhooks | Outbound event delivery |

