All developer pages

API reference

Webhooks

8 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/event-types

The event catalogue an endpoint can subscribe to.

Scope
webhooks:read
Operation id
listEventTypes

Response

200 JSON with these fields.

Response fields of GET /api/v1/event-types
FieldTypeRequiredConstraints
dataarray of objectYes
data[].typestringYes
data[].summarystringYes
data[].dataarray of stringYes

Errors

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

Example request

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

GET /api/v1/webhook-endpoints

The tenant's webhook endpoints.

Scope
webhooks:read
Operation id
listWebhookEndpoints

Parameters

Parameters of GET /api/v1/webhook-endpoints
NameInTypeRequiredConstraints
limitqueryintegerNo1 to 200
cursorquerystringNoat most 400 characters

Response

200 JSON with these fields.

Response fields of GET /api/v1/webhook-endpoints
FieldTypeRequiredConstraints
dataarray of objectYes
data[].idstring (uuid)Yes
data[].urlstringYes
data[].descriptionstring or nullYes
data[].eventTypesarray of stringYes
data[].statusstringYesone of "active", "disabled"
data[].rotatingbooleanYes
data[].previousSecretExpiresAtstring (date-time) or nullYes
data[].createdAtstring (date-time)Yes
data[].updatedAtstring (date-time)Yes
nextCursorstring or nullYes

Errors

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

Example request

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

POST /api/v1/webhook-endpoints

Subscribe a URL to event types. The signing secret is in this answer only.

Scope
webhooks:write
Operation id
createWebhookEndpoint
Idempotent
Send Idempotency-Key to make a retry safe

Parameters

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

Request body

JSON (Content-Type: application/json).

Request body of POST /api/v1/webhook-endpoints
FieldTypeRequiredConstraints
urlstringYesat most 2000 characters
eventTypesarray of stringYesat least 1 items at most 100 items
descriptionstring or nullNoat most 200 characters

Response

201 JSON with these fields.

Response fields of POST /api/v1/webhook-endpoints
FieldTypeRequiredConstraints
endpointobjectYes
endpoint.idstring (uuid)Yes
endpoint.urlstringYes
endpoint.descriptionstring or nullYes
endpoint.eventTypesarray of stringYes
endpoint.statusstringYesone of "active", "disabled"
endpoint.rotatingbooleanYes
endpoint.previousSecretExpiresAtstring (date-time) or nullYes
endpoint.createdAtstring (date-time)Yes
endpoint.updatedAtstring (date-time)Yes
secretstringYes

Errors

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

Example request

curl -X POST 'https://api.ringura.com/api/v1/webhook-endpoints' \
  -H "Authorization: Bearer $CC_TOKEN" \
  -H 'Idempotency-Key: order-2027-0001' \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "https://crm.example.com/hooks/cc",
  "eventTypes": [
    "example"
  ]
}'

GET /api/v1/webhook-endpoints/{id}

One endpoint.

Scope
webhooks:read
Operation id
getWebhookEndpoint

Parameters

Parameters of GET /api/v1/webhook-endpoints/{id}
NameInTypeRequiredConstraints
idpathstring (uuid)Yes

Response

200 JSON with these fields.

Response fields of GET /api/v1/webhook-endpoints/{id}
FieldTypeRequiredConstraints
idstring (uuid)Yes
urlstringYes
descriptionstring or nullYes
eventTypesarray of stringYes
statusstringYesone of "active", "disabled"
rotatingbooleanYes
previousSecretExpiresAtstring (date-time) or nullYes
createdAtstring (date-time)Yes
updatedAtstring (date-time)Yes

Errors

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

Example request

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

PATCH /api/v1/webhook-endpoints/{id}

Change an endpoint's URL, event types or status.

Scope
webhooks:write
Operation id
updateWebhookEndpoint
Idempotent
Send Idempotency-Key to make a retry safe

Parameters

Parameters of PATCH /api/v1/webhook-endpoints/{id}
NameInTypeRequiredConstraints
idpathstring (uuid)Yes
Idempotency-KeyheaderstringNomatches ^[A-Za-z0-9_.:-]{8,100}$

Request body

JSON (Content-Type: application/json).

Request body of PATCH /api/v1/webhook-endpoints/{id}
FieldTypeRequiredConstraints
urlstringNoat most 2000 characters
eventTypesarray of stringNoat least 1 items at most 100 items
descriptionstring or nullNoat most 200 characters
statusstringNoone of "active", "disabled"

Response

200 JSON with these fields.

Response fields of PATCH /api/v1/webhook-endpoints/{id}
FieldTypeRequiredConstraints
idstring (uuid)Yes
urlstringYes
descriptionstring or nullYes
eventTypesarray of stringYes
statusstringYesone of "active", "disabled"
rotatingbooleanYes
previousSecretExpiresAtstring (date-time) or nullYes
createdAtstring (date-time)Yes
updatedAtstring (date-time)Yes

Errors

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

Example request

curl -X PATCH 'https://api.ringura.com/api/v1/webhook-endpoints/0192f5a0-7c1e-7d3a-9b2e-3f4a5b6c7d8e' \
  -H "Authorization: Bearer $CC_TOKEN" \
  -H 'Idempotency-Key: order-2027-0001' \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "https://crm.example.com/hooks/cc"
}'

POST /api/v1/webhook-endpoints/{id}/rotate-secret

A new signing secret; for 24 hours deliveries are signed under both.

Scope
webhooks:write
Operation id
rotateWebhookSecret
Idempotent
Send Idempotency-Key to make a retry safe

Parameters

Parameters of POST /api/v1/webhook-endpoints/{id}/rotate-secret
NameInTypeRequiredConstraints
idpathstring (uuid)Yes
Idempotency-KeyheaderstringNomatches ^[A-Za-z0-9_.:-]{8,100}$

Response

200 JSON with these fields.

Response fields of POST /api/v1/webhook-endpoints/{id}/rotate-secret
FieldTypeRequiredConstraints
endpointobjectYes
endpoint.idstring (uuid)Yes
endpoint.urlstringYes
endpoint.descriptionstring or nullYes
endpoint.eventTypesarray of stringYes
endpoint.statusstringYesone of "active", "disabled"
endpoint.rotatingbooleanYes
endpoint.previousSecretExpiresAtstring (date-time) or nullYes
endpoint.createdAtstring (date-time)Yes
endpoint.updatedAtstring (date-time)Yes
secretstringYes

Errors

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

Example request

curl -X POST 'https://api.ringura.com/api/v1/webhook-endpoints/0192f5a0-7c1e-7d3a-9b2e-3f4a5b6c7d8e/rotate-secret' \
  -H "Authorization: Bearer $CC_TOKEN" \
  -H 'Idempotency-Key: order-2027-0001'

GET /api/v1/webhook-deliveries

Deliveries, newest first; dead ones are the dead letter.

Scope
webhooks:read
Operation id
listWebhookDeliveries

Parameters

Parameters of GET /api/v1/webhook-deliveries
NameInTypeRequiredConstraints
limitqueryintegerNo1 to 200
cursorquerystringNoat most 400 characters
endpointIdquerystring (uuid)No
statusquerystringNoone of "pending", "sending", "delivered", "dead"

Response

200 JSON with these fields.

Response fields of GET /api/v1/webhook-deliveries
FieldTypeRequiredConstraints
dataarray of objectYes
data[].idstring (uuid)Yes
data[].endpointIdstring (uuid)Yes
data[].eventIdstringYes
data[].eventTypestringYes
data[].statusstringYesone of "pending", "sending", "delivered", "dead"
data[].attemptsintegerYes
data[].nextAttemptAtstring (date-time) or nullYes
data[].lastStatusCodeinteger or nullYes
data[].lastErrorstring or nullYes
data[].deliveredAtstring (date-time) or nullYes
data[].replayOfstring (uuid) or nullYes
data[].createdAtstring (date-time)Yes
nextCursorstring or nullYes

Errors

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

Example request

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

POST /api/v1/webhook-deliveries/{id}/replay

Send a delivered or dead event again, as a new delivery with the same event id.

Scope
webhooks:write
Operation id
replayWebhookDelivery
Idempotent
Send Idempotency-Key to make a retry safe

Parameters

Parameters of POST /api/v1/webhook-deliveries/{id}/replay
NameInTypeRequiredConstraints
idpathstring (uuid)Yes
Idempotency-KeyheaderstringNomatches ^[A-Za-z0-9_.:-]{8,100}$

Response

201 JSON with these fields.

Response fields of POST /api/v1/webhook-deliveries/{id}/replay
FieldTypeRequiredConstraints
idstring (uuid)Yes
endpointIdstring (uuid)Yes
eventIdstringYes
eventTypestringYes
statusstringYesone of "pending", "sending", "delivered", "dead"
attemptsintegerYes
nextAttemptAtstring (date-time) or nullYes
lastStatusCodeinteger or nullYes
lastErrorstring or nullYes
deliveredAtstring (date-time) or nullYes
replayOfstring (uuid) or nullYes
createdAtstring (date-time)Yes

Errors

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

Example request

curl -X POST 'https://api.ringura.com/api/v1/webhook-deliveries/0192f5a0-7c1e-7d3a-9b2e-3f4a5b6c7d8e/replay' \
  -H "Authorization: Bearer $CC_TOKEN" \
  -H 'Idempotency-Key: order-2027-0001'