API Documentation

Integrate Staffley with your applications using our REST API.

Overview

The Staffley API allows you to programmatically access your call data, leads, and configure webhooks for real-time notifications. Our API follows REST conventions and returns JSON responses.

All API requests must be authenticated using your API key. You can find your API key in your Staffley dashboard under Settings > API.

Base URL

https://api.staffley.ai/v1

Authentication

Include your API key in the Authorization header of every request:

Request Header
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Endpoints

GET
/api/v1/calls

List all calls for your account

GET
/api/v1/calls/:id

Get details for a specific call

GET
/api/v1/leads

List all captured leads

POST
/api/v1/webhooks

Create a new webhook subscription

DELETE
/api/v1/webhooks/:id

Delete a webhook subscription

Webhooks

Receive real-time notifications when calls are completed. Configure webhooks to POST data to your server.

Example Webhook Payload
{
  "event": "call.completed",
  "timestamp": "2026-03-14T10:30:00Z",
  "data": {
    "call_id": "call_abc123",
    "duration": 180,
    "caller_name": "John Smith",
    "caller_phone": "+44 7700 900123",
    "caller_email": "john@example.com",
    "summary": "Enquiry about booking a service",
    "transcript_url": "https://api.staffley.ai/v1/calls/call_abc123/transcript"
  }
}

Response Examples

GET /api/v1/calls200 OK
{
  "data": [
    {
      "id": "call_abc123",
      "created_at": "2026-03-14T10:30:00Z",
      "duration": 180,
      "status": "completed",
      "caller": {
        "name": "John Smith",
        "phone": "+44 7700 900123",
        "email": "john@example.com"
      },
      "summary": "Enquiry about booking a service",
      "sentiment": "positive"
    }
  ],
  "meta": {
    "total": 156,
    "page": 1,
    "per_page": 20
  }
}

Ready to Get Started?

Sign up for Staffley to get your API key and start building.