← 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 dashboard
  • X-Organization-Id - Your organization ID

Endpoints

Assistants

MethodEndpointDescription
POST/assistantsCreate a new assistant
GET/assistantsList all assistants
GET/assistants/:idGet assistant by ID
PATCH/assistants/:idUpdate assistant
DELETE/assistants/:idDelete assistant

Calls

MethodEndpointDescription
POST/callsInitiate outbound call
GET/callsList calls with filters
GET/calls/:idGet call details
GET/calls/:id/live-stateGet live call state
GET/calls/:id/transcriptGet call transcript
GET/calls/:id/timelineGet call timeline
GET/calls/:id/latencyGet latency breakdown

Organizations

MethodEndpointDescription
POST/organizationsCreate organization
GET/organizationsList organizations
GET/organizations/:idGet organization by ID

Phone Numbers

MethodEndpointDescription
GET/phone-numbersList available phone numbers
GET/phone-numbers/:idGet phone number details

Health & Info

MethodEndpointDescription
GET/healthHealth 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"
    }
  }
}
StatusMeaning
400Bad request - invalid parameters
401Unauthorized - invalid or missing API key
403Forbidden - valid key but no permission
404Not found - resource doesn't exist
429Rate limited - too many requests
500Server error - something went wrong

Rate Limits

Default rate limits by plan:

PlanRequests/minConcurrent Calls
Free602
Pro60020
EnterpriseCustomCustom

Rate limit headers are included in every response:

  • X-RateLimit-Limit - Requests allowed per window
  • X-RateLimit-Remaining - Requests remaining
  • X-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