All developer pages

API reference

Analytics

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

GET /api/v1/exports

Recent exports, newest first.

Scope
analytics:read
Operation id
listExports

Parameters

Parameters of GET /api/v1/exports
NameInTypeRequiredConstraints
limitqueryintegerNo1 to 200
datasetquerystringNoone of "conversations", "work_items", "dial_attempts", "outcomes", "insights"

Response

200 JSON with these fields.

Response fields of GET /api/v1/exports
FieldTypeRequiredConstraints
dataarray of objectYes
data[].idstring (uuid)Yes
data[].datasetstringYesone of "conversations", "work_items", "dial_attempts", "outcomes", "insights"
data[].formatstringYesone of "csv", "jsonl", "parquet"
data[].statusstringYesone of "queued", "running", "ready", "failed", "expired"
data[].viastringNoone of "console", "api"
data[].cursorAfterstring or nullYes
data[].rowsintegerYes
data[].bytesintegerYes
data[].hasMorebooleanYes
data[].nextCursorstring or nullYes
data[].snapshotUntilstring (date-time) or nullNo
data[].errorstring or nullNo
data[].createdAtstring (date-time)Yes
data[].finishedAtstring (date-time) or nullNo
data[].expiresAtstring (date-time) or nullNo

Errors

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

Example request

curl -X GET 'https://api.ringura.com/api/v1/exports' \
  -H "Authorization: Bearer $CC_TOKEN"

POST /api/v1/exports

Queue an export of a dataset (conversations, work_items, dial_attempts, outcomes, insights) as CSV, JSON lines or Parquet. Start from a time (since), from the watermark of a previous export (cursor), or from the beginning. It is built asynchronously; an export.ready webhook (or polling GET /exports/{id}) says when to download.

Scope
analytics:read
Operation id
createExport
Idempotent
Send Idempotency-Key to make a retry safe

Parameters

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

Request body

JSON (Content-Type: application/json).

Request body of POST /api/v1/exports
FieldTypeRequiredConstraints
datasetstringYesone of "conversations", "work_items", "dial_attempts", "outcomes", "insights"
formatstringNoone of "csv", "jsonl", "parquet"
cursorstringNoat most 100 characters
sincestring (date-time)No

Response

202 JSON with these fields.

Response fields of POST /api/v1/exports
FieldTypeRequiredConstraints
idstring (uuid)Yes
datasetstringYesone of "conversations", "work_items", "dial_attempts", "outcomes", "insights"
formatstringYesone of "csv", "jsonl", "parquet"
statusstringYesone of "queued", "running", "ready", "failed", "expired"
viastringNoone of "console", "api"
cursorAfterstring or nullYes
rowsintegerYes
bytesintegerYes
hasMorebooleanYes
nextCursorstring or nullYes
snapshotUntilstring (date-time) or nullNo
errorstring or nullNo
createdAtstring (date-time)Yes
finishedAtstring (date-time) or nullNo
expiresAtstring (date-time) or nullNo

Errors

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

Example request

curl -X POST 'https://api.ringura.com/api/v1/exports' \
  -H "Authorization: Bearer $CC_TOKEN" \
  -H 'Idempotency-Key: order-2027-0001' \
  -H 'Content-Type: application/json' \
  -d '{
  "dataset": "conversations"
}'

GET /api/v1/exports/{id}

One export: its status, size, row count and the watermark to start the next pull from.

Scope
analytics:read
Operation id
getExport

Parameters

Parameters of GET /api/v1/exports/{id}
NameInTypeRequiredConstraints
idpathstring (uuid)Yes

Response

200 JSON with these fields.

Response fields of GET /api/v1/exports/{id}
FieldTypeRequiredConstraints
idstring (uuid)Yes
datasetstringYesone of "conversations", "work_items", "dial_attempts", "outcomes", "insights"
formatstringYesone of "csv", "jsonl", "parquet"
statusstringYesone of "queued", "running", "ready", "failed", "expired"
viastringNoone of "console", "api"
cursorAfterstring or nullYes
rowsintegerYes
bytesintegerYes
hasMorebooleanYes
nextCursorstring or nullYes
snapshotUntilstring (date-time) or nullNo
errorstring or nullNo
createdAtstring (date-time)Yes
finishedAtstring (date-time) or nullNo
expiresAtstring (date-time) or nullNo

Errors

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

Example request

curl -X GET 'https://api.ringura.com/api/v1/exports/0192f5a0-7c1e-7d3a-9b2e-3f4a5b6c7d8e' \
  -H "Authorization: Bearer $CC_TOKEN"

GET /api/v1/exports/{id}/download

The finished export as text/csv, application/x-ndjson or application/vnd.apache.parquet. X-Export-Watermark carries the watermark for the next pull and X-Export-Has-More says to pull again at once.

Scope
analytics:read
Operation id
downloadExport

Parameters

Parameters of GET /api/v1/exports/{id}/download
NameInTypeRequiredConstraints
idpathstring (uuid)Yes

Response

200 A string. Also available as text/csv, application/x-ndjson, application/vnd.apache.parquet.

Errors

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

Example request

curl -X GET 'https://api.ringura.com/api/v1/exports/0192f5a0-7c1e-7d3a-9b2e-3f4a5b6c7d8e/download' \
  -H "Authorization: Bearer $CC_TOKEN"