ऑथेंटिकेशन और अनुमतियाँ
वर्कस्पेस का मालिक या कोई एडमिन सेटिंग्स › इंटीग्रेशन › API कुंजियाँ में कुंजी बनाता है और उसकी अनुमतियाँ चुनता है। हर रिक्वेस्ट पर इसे Bearer टोकन के रूप में भेजें। सीक्रेट एक ही बार दिखता है; इसे अपने सीक्रेट मैनेजर में रखें।
curl https://rexenda.com/api/public/v1/contacts?limit=10 \
-H "Authorization: Bearer rx_live_<prefix>_<secret>"
अनुमतियाँ
| अनुमति | अनुमति देता है |
| contacts:read | संपर्क · पढ़ें |
|---|
| contacts:write | संपर्क · लिखें |
|---|
| leads:read | लीड · पढ़ें |
|---|
| leads:write | लीड · लिखें |
|---|
| events:write | इवेंट · लिखें |
|---|
| journeys:write | जर्नी · लिखें |
|---|
| consent:write | सहमति · लिखें |
|---|
| campaigns:read | अभियान · पढ़ें |
|---|
| calls:read | कॉल · पढ़ें |
|---|
| calls:write | कॉल · लिखें |
|---|
त्रुटियाँ
त्रुटियाँ application/problem+json का उपयोग करती हैं, जिसमें एक स्थिर कोड होता है जिस पर आप निर्णय ले सकते हैं, और वैलिडेशन त्रुटियों में वह फ़ील्ड जो विफल हुआ।
{ "type": "about:blank", "title": "Validation error", "status": 422,
"code": "invalid_phone", "field": "phone", "traceId": "…" }/leads
GET
/leads
आवश्यक 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. |
|---|
लौटाता है: LeadPage (200)
POST
/leads
आवश्यक leads:write
Create a lead
| Idempotency-Key | header | Retries with the same key and body return the original response for 24 hours. |
|---|
बॉडी: LeadCreateलौटाता है: Lead (201)
GET
/leads/{id}
आवश्यक leads:read
Get a lead
लौटाता है: Lead (200)
POST
/leads/{id}/stage
आवश्यक 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. |
|---|
बॉडी: LeadStageUpdateलौटाता है: Lead (200)
/calls
GET
/calls
आवश्यक 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). |
|---|
लौटाता है: CallPage (200)
POST
/calls
आवश्यक 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. |
|---|
बॉडी: CallCreateलौटाता है: CallStarted (202)
GET
/calls/{id}
आवश्यक calls:read
Get a call with summary, disposition, transcript and a 5-minute signed recording link
लौटाता है: CallDetail (200)
GET
/calls/stats
आवश्यक 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). |
|---|
लौटाता है: CallStats (200)