Authenticatie en rechten
De eigenaar of een beheerder van de workspace maakt een sleutel aan in Instellingen › Integraties › API-sleutels en kiest de rechten. Stuur hem bij elk verzoek mee als Bearer-token. Het geheim wordt één keer getoond; bewaar het in je secrets manager.
curl https://rexenda.com/api/public/v1/contacts?limit=10 \
-H "Authorization: Bearer rx_live_<prefix>_<secret>"
Rechten
| Recht | Staat toe |
| contacts:read | Contacten · lezen |
|---|
| contacts:write | Contacten · schrijven |
|---|
| leads:read | Leads · lezen |
|---|
| leads:write | Leads · schrijven |
|---|
| events:write | Gebeurtenissen · schrijven |
|---|
| journeys:write | Journeys · schrijven |
|---|
| consent:write | Toestemming · schrijven |
|---|
| campaigns:read | Campagnes · lezen |
|---|
| calls:read | Gesprekken · lezen |
|---|
| calls:write | Gesprekken · schrijven |
|---|
Fouten
Fouten gebruiken application/problem+json met een stabiele code waarop je kunt reageren en, bij validatiefouten, het veld dat faalde.
{ "type": "about:blank", "title": "Validation error", "status": 422,
"code": "invalid_phone", "field": "phone", "traceId": "…" }/leads
GET
/leads
Vereist leads:read
List leads
| cursor | query | Opaque cursor from `next_cursor`. |
|---|
| limit | query | Page size (1-100, default 25). |
|---|
| contact_id | query | Only this contact's leads. |
|---|
Geeft terug: LeadPage (200)
POST
/leads
Vereist leads:write
Create a lead
| Idempotency-Key | header | Retries with the same key and body return the original response for 24 hours. |
|---|
Body: LeadCreateGeeft terug: Lead (201)
GET
/leads/{id}
Vereist leads:read
Get a lead
Geeft terug: Lead (200)
POST
/leads/{id}/stage
Vereist leads:write
Move a lead to another stage
| id | path | |
|---|
| Idempotency-Key | header | Retries with the same key and body return the original response for 24 hours. |
|---|
Body: LeadStageUpdateGeeft terug: Lead (200)
/calls
GET
/calls
Vereist calls:read
List calls (history)
| cursor | query | Opaque cursor from `next_cursor`. |
|---|
| limit | query | Page size (1-100, default 25). |
|---|
| from | query | Window start (ISO-8601, UTC). Default: 30 days before `to`. Max window 93 days. |
|---|
| to | query | Window end (ISO-8601, UTC, exclusive). Default: now. |
|---|
| queue_id | query | Only calls that went through this queue. |
|---|
| user_id | query | Only calls answered or made by this person. |
|---|
| number_id | query | Only calls of this workspace number. |
|---|
| direction | query | inbound or outbound. |
|---|
| outcome | query | answered, missed, abandoned, voicemail, failed or in_progress. |
|---|
| has_recording | query | Only calls with (true) or without (false) a recording. |
|---|
| q | query | Phone number or contact name (contains). |
|---|
Geeft terug: CallPage (200)
POST
/calls
Vereist calls:write
Click-to-call: ring a workspace user, then dial the number
| Idempotency-Key | header | Retries with the same key and body return the original response for 24 hours. |
|---|
Body: CallCreateGeeft terug: CallStarted (202)
GET
/calls/{id}
Vereist calls:read
Get a call with summary, disposition, transcript and a 5-minute signed recording link
Geeft terug: CallDetail (200)
GET
/calls/stats
Vereist calls:read
Call analytics (also requires the advanced analytics plan feature)
| from | query | Window start (ISO-8601, UTC). Default: 30 days before `to`. Max window 93 days. |
|---|
| to | query | Window end (ISO-8601, UTC, exclusive). Default: now. |
|---|
| queue_id | query | Only calls that went through this queue. |
|---|
| user_id | query | Only calls answered or made by this person. |
|---|
| number_id | query | Only calls of this workspace number. |
|---|
| time_zone | query | IANA time zone for day and hour buckets. Default: the workspace time zone. |
|---|
| service_level_seconds | query | Service level threshold in seconds (1-600, default 20). |
|---|
| abandon_after_seconds | query | Hang-ups while waiting shorter than this are short abandons, not abandons (0-120, default 5). |
|---|
Geeft terug: CallStats (200)