Autenticazione e permessi
Il proprietario o un amministratore del workspace crea una chiave in Impostazioni › Integrazioni › Chiavi API e ne sceglie i permessi. Inviala come token Bearer a ogni richiesta. Il segreto viene mostrato una sola volta; conservalo nel tuo gestore di segreti.
curl https://rexenda.com/api/public/v1/contacts?limit=10 \
-H "Authorization: Bearer rx_live_<prefix>_<secret>"
Permessi
| Permesso | Consente |
| contacts:read | Contatti · lettura |
|---|
| contacts:write | Contatti · scrittura |
|---|
| leads:read | Opportunità · lettura |
|---|
| leads:write | Opportunità · scrittura |
|---|
| events:write | Eventi · scrittura |
|---|
| journeys:write | Percorsi · scrittura |
|---|
| consent:write | Consenso · scrittura |
|---|
| campaigns:read | Campagne · lettura |
|---|
| calls:read | Chiamate · lettura |
|---|
| calls:write | Chiamate · scrittura |
|---|
Errori
Gli errori usano application/problem+json con un codice stabile da gestire nel tuo codice e, per quelli di validazione, il campo non valido.
{ "type": "about:blank", "title": "Validation error", "status": 422,
"code": "invalid_phone", "field": "phone", "traceId": "…" }/leads
GET
/leads
Richiede 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. |
|---|
Restituisce: LeadPage (200)
POST
/leads
Richiede leads:write
Create a lead
| Idempotency-Key | header | Retries with the same key and body return the original response for 24 hours. |
|---|
Corpo: LeadCreateRestituisce: Lead (201)
GET
/leads/{id}
Richiede leads:read
Get a lead
Restituisce: Lead (200)
POST
/leads/{id}/stage
Richiede 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. |
|---|
Corpo: LeadStageUpdateRestituisce: Lead (200)
/calls
GET
/calls
Richiede 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). |
|---|
Restituisce: CallPage (200)
POST
/calls
Richiede 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. |
|---|
Corpo: CallCreateRestituisce: CallStarted (202)
GET
/calls/{id}
Richiede calls:read
Get a call with summary, disposition, transcript and a 5-minute signed recording link
Restituisce: CallDetail (200)
GET
/calls/stats
Richiede 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). |
|---|
Restituisce: CallStats (200)