← Back to Documentation
API Reference
Complete REST API documentation. Base URL: https://api.aployee.com/v1
Authentication
All API requests require two headers:
Authentication
# All requests require the X-Organization-Id header
curl https://api.aployee.com/v1/assistants \
-H "Authorization: Bearer $APLOYEE_KEY" \
-H "X-Organization-Id: org_xxxx"Authorization- Bearer token from dashboardX-Organization-Id- Your organization ID
Endpoints
Assistants
| Method | Endpoint | Description |
|---|---|---|
| POST | /assistants | Create a new assistant |
| GET | /assistants | List all assistants |
| GET | /assistants/:id | Get assistant by ID |
| PATCH | /assistants/:id | Update assistant |
| DELETE | /assistants/:id | Delete assistant |
Calls
| Method | Endpoint | Description |
|---|---|---|
| POST | /calls | Initiate outbound call |
| GET | /calls | List calls with filters |
| GET | /calls/:id | Get call details |
| GET | /calls/:id/live-state | Get live call state |
| GET | /calls/:id/transcript | Get call transcript |
| GET | /calls/:id/timeline | Get call timeline |
| GET | /calls/:id/latency | Get latency breakdown |
Organizations
| Method | Endpoint | Description |
|---|---|---|
| POST | /organizations | Create organization |
| GET | /organizations | List organizations |
| GET | /organizations/:id | Get organization by ID |
Phone Numbers
| Method | Endpoint | Description |
|---|---|---|
| GET | /phone-numbers | List available phone numbers |
| GET | /phone-numbers/:id | Get phone number details |
Health & Info
| Method | Endpoint | Description |
|---|---|---|
| GET | /health | Health check endpoint |
| GET | / | Service info (version, environment) |
Error Handling
All errors return JSON with a consistent structure:
Error Response
{
"error": {
"code": "invalid_request",
"message": "The assistant_id field is required",
"details": {
"field": "assistant_id"
}
}
}| Status | Meaning |
|---|---|
| 400 | Bad request - invalid parameters |
| 401 | Unauthorized - invalid or missing API key |
| 403 | Forbidden - valid key but no permission |
| 404 | Not found - resource doesn't exist |
| 429 | Rate limited - too many requests |
| 500 | Server error - something went wrong |
Rate Limits
Default rate limits by plan:
| Plan | Requests/min | Concurrent Calls |
|---|---|---|
| Free | 60 | 2 |
| Pro | 600 | 20 |
| Enterprise | Custom | Custom |
Rate limit headers are included in every response:
X-RateLimit-Limit- Requests allowed per windowX-RateLimit-Remaining- Requests remainingX-RateLimit-Reset- Unix timestamp when window resets
OpenAPI Specification
The full OpenAPI (Swagger) specification is available at:
- Swagger UI:
https://api.aployee.com/swagger - OpenAPI JSON:
https://api.aployee.com/swagger/v1/swagger.json
Use these to generate client libraries for your language of choice.
Next steps
- • Follow the quickstart guide
- • Configure assistant settings
- • Set up webhook integration