Authentifizierung und Berechtigungen
Der Workspace-Inhaber oder ein Admin erstellt unter Einstellungen › Integrationen › API-Schlüssel einen Schlüssel und wählt dessen Berechtigungen. Senden Sie ihn bei jeder Anfrage als Bearer-Token. Das Geheimnis wird nur einmal angezeigt; speichern Sie es in Ihrem Secrets-Manager.
curl https://rexenda.com/api/public/v1/contacts?limit=10 \
-H "Authorization: Bearer rx_live_<prefix>_<secret>"
Berechtigungen
| Berechtigung | Erlaubt |
| contacts:read | Kontakte · lesen |
|---|
| contacts:write | Kontakte · schreiben |
|---|
| leads:read | Leads · lesen |
|---|
| leads:write | Leads · schreiben |
|---|
| events:write | Ereignisse · schreiben |
|---|
| journeys:write | Journeys · schreiben |
|---|
| consent:write | Einwilligung · schreiben |
|---|
| campaigns:read | Kampagnen · lesen |
|---|
| calls:read | Anrufe · lesen |
|---|
| calls:write | Anrufe · schreiben |
|---|
Fehler
Fehler verwenden application/problem+json mit einem stabilen Code, auf den Sie reagieren können, und bei Validierungsfehlern mit dem betroffenen Feld.
{ "type": "about:blank", "title": "Validation error", "status": 422,
"code": "invalid_phone", "field": "phone", "traceId": "…" }/leads
GET
/leads
Erfordert 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. |
|---|
Liefert: LeadPage (200)
POST
/leads
Erfordert leads:write
Create a lead
| Idempotency-Key | header | Retries with the same key and body return the original response for 24 hours. |
|---|
Inhalt: LeadCreateLiefert: Lead (201)
GET
/leads/{id}
Erfordert leads:read
Get a lead
Liefert: Lead (200)
POST
/leads/{id}/stage
Erfordert 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. |
|---|
Inhalt: LeadStageUpdateLiefert: Lead (200)
/calls
GET
/calls
Erfordert 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). |
|---|
Liefert: CallPage (200)
POST
/calls
Erfordert 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. |
|---|
Inhalt: CallCreateLiefert: CallStarted (202)
GET
/calls/{id}
Erfordert calls:read
Get a call with summary, disposition, transcript and a 5-minute signed recording link
Liefert: CallDetail (200)
GET
/calls/stats
Erfordert 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). |
|---|
Liefert: CallStats (200)