{{ config('app.name') }} API
Build powerful integrations with the {{ config('app.name') }} platform. Manage contacts, conversations, campaigns, and more programmatically.
Quick Start
1. Generate an API Token
Navigate to Settings → Account to create a personal API token. Select the scopes (permissions) your integration needs.
2. Base URL
{{ url('/api/v1') }}
3. Make Your First Request
curl -X GET {{ url('/api/v1/contacts') }} \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json"
Authentication
All API requests require a valid Bearer token sent in the Authorization header.
Authorization: Bearer your-api-token
Tokens are scoped. When you create a token, you select which API sections it can access:
Requests to endpoints outside the token's scopes will receive a 403 Forbidden response.
Rate Limiting
API requests are rate-limited to protect service stability. Default limits:
| Scope | Limit |
|---|---|
| General API | 60 requests/minute |
| Import/Export | 5 requests/minute |
| Campaign Send | 5 requests/minute |
| AI Generate Reply | 10 requests/minute |
| AI Analyze Sentiment | 20 requests/minute |
| KB Scrape | 3 requests/minute |
Rate limit headers are included in every response:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57
Retry-After: 42 // only when rate limited (429)
Errors
The API uses standard HTTP status codes. Errors return a JSON body with details:
| Code | Meaning |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing token |
| 403 | Forbidden - Token lacks required scope |
| 404 | Not Found - Resource does not exist |
| 422 | Validation Error - Check the errors object |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Server Error - Unexpected failure |
{
"message": "Contact not found."
}
// Validation errors (422)
{
"errors": {
"email": ["The email field is required."]
}
}
Contacts
Manage your contact database. Requires contacts scope.
Conversations
Manage inbox conversations. Requires conversations scope.
Campaigns
Create and manage email campaigns. Requires campaigns scope.
Hello!
\"}'", 'response' => '{ "data": {"id": 15, "name": "April Promo", "status": "draft"} }', ]) @include('api-docs._endpoint', [ 'method' => 'POST', 'path' => '/api/v1/campaigns/{id}/send', 'description' => 'Send or schedule a campaign. Rate limited to 5 req/min.', 'params' => [ ['name' => 'scheduled_at', 'type' => 'datetime', 'required' => false, 'desc' => 'ISO 8601 datetime to schedule (omit to send immediately)'], ], 'curl' => "curl -X POST '" . url('/api/v1/campaigns/15/send') . "' \\\n -H 'Authorization: Bearer YOUR_TOKEN' \\\n -H 'Content-Type: application/json'", 'response' => '{ "data": {"id": 15, "status": "sending"} }', ])Workflows
Manage automation workflows. Requires workflows scope.
Knowledge Base
Manage KB documents for AI context. Requires knowledge-base scope.
AI
AI-powered features. Requires ai scope. Stricter rate limits apply.
Analytics
Read-only analytics data. Requires analytics scope.
Canned Responses
Manage saved reply templates. Requires canned-responses scope.
Try It
Test API endpoints directly from this page.