All developer pages

API reference

Leads

1 operations. Base URL: https://api.ringura.com/api/v1. Authenticate with a bearer token that carries the scope named on each operation.

POST /api/v1/leads

A new lead for a speed-to-lead source: top of its campaign's hopper and its sequence's first step due now; dialled or messaged at once when the gate allows.

Scope
leads:write
Operation id
createLead
Idempotent
Send Idempotency-Key to make a retry safe

Parameters

Parameters of POST /api/v1/leads
NameInTypeRequiredConstraints
Idempotency-KeyheaderstringNomatches ^[A-Za-z0-9_.:-]{8,100}$

Request body

JSON (Content-Type: application/json).

Request body of POST /api/v1/leads
FieldTypeRequiredConstraints
sourceIdstring (uuid)Yes
phonestringYes4-32 characters
defaultCountrystringNomatches ^[A-Z]{2}$
namestringNoat most 200 characters
emailstringNoat most 320 characters
externalIdstringNo1-200 characters
consentbooleanNo
timeZonestringNoat most 64 characters
fieldsobjectNofree-form object

Response

201 JSON with these fields.

Response fields of POST /api/v1/leads
FieldTypeRequiredConstraints
eventobjectYes
event.idstring (uuid)Yes
event.sourceIdstring (uuid)Yes
event.leadIdstring (uuid)Yes
event.viastringYes
event.externalIdstring or nullYes
event.receivedAtstring (date-time)Yes
event.targetSecondsintegerYes
event.firstActionstring or nullYes
event.firstActionAtstring (date-time) or nullYes
event.secondsnumber or nullYes
event.metboolean or nullYes
duplicatebooleanYes

Errors

400, 401, 403, 404, 409, 422, 429. What each status means

Example request

curl -X POST 'https://api.ringura.com/api/v1/leads' \
  -H "Authorization: Bearer $CC_TOKEN" \
  -H 'Idempotency-Key: order-2027-0001' \
  -H 'Content-Type: application/json' \
  -d '{
  "sourceId": "0192f5a0-7c1e-7d3a-9b2e-3f4a5b6c7d8e",
  "phone": "+441632960000"
}'