REST API
Manage leads, calls, messages, campaigns and appointments from your own applications.
Base URL
Every REST request goes to the address below. The OAuth and MCP endpoints sit at the root of the domain.
https://api.speakline.io/api/v1Authentication
Requests carry an API key or an OAuth access token in the Authorization header as Bearer.
API key
Created in the dashboard under Settings › API keys. A key is limited to the permissions of the member who created it and the scopes you choose; it is shown once, can have an expiry date and can be revoked at any time. Available on plans that include API access.
OAuth 2.1
For applications that connect to other people's accounts. It uses the authorization code flow with PKCE (S256) required. Access tokens last one hour and refresh tokens 90 days, renewed on every use. People see and remove the apps they connected under Connected apps in the dashboard.
| Endpoint | Purpose |
|---|---|
GET /oauth/authorize | Authorization and consent screen |
POST /oauth/token | Issues and refreshes tokens |
POST /oauth/revoke | Revokes a token |
GET /.well-known/oauth-authorization-server | Authorization server metadata |
Authorization: Bearer sk_live_…Responses and errors
Successful responses return the result in data. On errors, the HTTP status code names the problem and the body is a JSON object with a description.
| Status | Meaning |
|---|---|
400 | Invalid request |
401 | Not authenticated: missing or invalid key or token |
402 | The plan does not include the feature or a usage limit was reached |
403 | Not permitted |
404 | Not found |
422 | Validation failed |
429 | Rate limit exceeded |
{
"success": true,
"data": { … }
}Pagination
Lists are paginated with page (starting at 1) and page_size (default 25, at most 100). The response holds items, total, page, page_size and pages. Busy lists also support cursor paging (next_cursor, has_more).
curl "https://api.speakline.io/api/v1/leads?page=2&page_size=50" \
-H "Authorization: Bearer $SPEAKLINE_API_KEY"Rate limits
- With an API key: 20 requests per second and 1,200 per minute.
- Above the limit, a
429response comes withRetry-AfterandX-RateLimit-*headers. - Request bodies can be up to 32 MB.
Main endpoints
Paths are relative to the base URL.
| Method | Path | Purpose |
|---|---|---|
GET | /automation/me | Checks the API key and the workspace |
GET | /leads | Lists leads |
POST | /leads | Creates a lead |
GET | /leads/{id} | One lead in detail |
PATCH | /leads/{id} | Updates a lead |
POST | /voice/calls/send | Starts or schedules a call by a voice agent |
GET | /voice/calls | Lists calls |
GET | /voice/calls/{id} | One call in detail |
POST | /conversations | Sends a message |
GET | /campaigns | Lists campaigns |
POST | /campaigns/{id}/leads | Adds people to a campaign |
POST | /appointments | Books an appointment |
GET | /appointments/calendars | Lists connected calendars |
GET | /voicemails | Lists voicemails |
GET | /agents | Lists voice agents |
GET | /channels | Lists messaging channels |
GET | /numbers | Lists phone numbers |
GET | /webhooks/events | The webhook event catalogue |
POST | /automation/hooks | Creates an event subscription (REST hook) |
DELETE | /automation/hooks/{id} | Deletes an event subscription |
Example request
Creates a lead. The phone number is written in E.164 format.
curl https://api.speakline.io/api/v1/leads \
-H "Authorization: Bearer $SPEAKLINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"full_name": "Emma Clarke",
"phone": "+442079460344",
"email": "emma@example.com",
"source": "api",
"language": "en"
}'