The OPSYNC REST API exposes every feature in the platform. All endpoints are prefixed with /v1/ and return standard JSON responses.
The API uses JWT bearer tokens. Exchange your email and password for a token via POST /v1/auth/login, then include the access token on every request:
curl https://api.opsynchub.com/v1/records \
-H "Authorization: Bearer <YOUR_JWT>" \
-H "Content-Type: application/json"Access tokens expire after 15 minutes. Use POST /v1/auth/refresh with your refresh token to get a new pair. Agency plan customers can create long-lived API keys under Settings → API Keys for server-to-server integrations.
Here are the most commonly used endpoints. A full OpenAPI spec is available at /docs on any non-production environment.
| Method | Path | Description |
|---|---|---|
| POST | /v1/auth/login | Exchange email + password for a JWT pair. |
| GET | /v1/records | List records with filters, pagination, search. |
| POST | /v1/records | Create a new record in the Universal Record Engine. |
| PATCH | /v1/records/:id | Update a record, including contact and custom fields. |
| PATCH | /v1/records/:id/stage | Move a record to a new pipeline stage. |
| GET | /v1/campaigns | List campaigns for the authenticated org. |
| POST | /v1/campaigns | Create a new campaign with stages. |
| GET | /v1/activities | List call, email, and SMS activities. |
| POST | /v1/activities | Log a manual activity (call disposition, note, SMS). |
| GET | /v1/reports/dashboard | Fetch dashboard KPIs for the current user. |
| POST | /v1/dialer/start | Start a power dialer session for a campaign. |
| POST | /v1/workflows/:id/execute | Manually execute a workflow against a record. |
curl -X POST https://api.opsynchub.com/v1/records \
-H "Authorization: Bearer <YOUR_JWT>" \
-H "Content-Type: application/json" \
-d '{
"process_type": "sales",
"contact": {
"name": "Jane Smith",
"email": "jane@example.com",
"phone": "+15551234567"
},
"stage": "new",
"custom_fields": { "source": "website" }
}'Configure outbound webhooks under Settings → Webhooks to receive real-time events. Every webhook is signed with HMAC-SHA256 so you can verify authenticity.
| Event | Description |
|---|---|
| record.created | Fired when a record is created via API, import, or UI. |
| record.stage_changed | Fired when a record moves between pipeline stages. |
| call.completed | Fired after call wrap-up, includes disposition and recording URL. |
| qa.completed | Fired when an AI QA review completes with score + breakdown. |
| form.submitted | Fired when a public lead form receives a submission. |
Sample payload for call.completed:
{
"event": "call.completed",
"org_id": "01HG...",
"data": {
"activity_id": "01HH...",
"record_id": "01HG...",
"agent_id": "01HG...",
"duration_seconds": 187,
"disposition": "interested",
"recording_url": "https://storage.opsynchub.com/..."
},
"timestamp": "2026-04-11T12:34:56Z"
}The API enforces two rate-limit windows:
Rate limits are returned in X-RateLimit-Remaining and X-RateLimit-Reset headers. Exceeding either window returns 429. Agency plan customers can request higher limits.