Skip to content

API reference

Webhooks

Markdown

Be called when something happens in your organization, and read the deliveries.

A webhook is a URL Rytiv calls for events of your organization. Each delivery is recorded and can be read back.

Registers a webhook URL.

Auth: API key with full access (a key with scopes cannot call this route). Refused for every agent token (agent-token-credential).

JSON, the shape CreateWebhookRequest of the contract.

Field Type Required Description
url string required 1 to 2048 characters.
events array of email.sent | email.delivered | email.delivery_delayed | email.bounced | email.complained | email.failed | email.received required 1 to any number of items.
curl -X POST "https://api.rytiv.app/v1/webhooks" \
-H "Authorization: Bearer $RYTIV_TOKEN" \
-H "Content-Type: application/json" \
-d '{"url":"<url>","events":["email.sent"]}'

201 with a JSON object carrying secret and the fields of the object the handler builds.

Status Code Meaning
400 bad-request The request is malformed or a field is out of range. error names every field; issues lists them.
401 unauthenticated No API key, or one that does not work.
403 token-scope The key’s scopes do not cover this route.

The organization’s webhooks.

Auth: API key with full access or the scope read. Every class of agent token may call it.

curl -X GET "https://api.rytiv.app/v1/webhooks" \
-H "Authorization: Bearer $RYTIV_TOKEN"

200 with a JSON body.

Status Code Meaning
401 unauthenticated No API key, or one that does not work.
403 token-scope The key’s scopes do not cover this route.

One webhook.

Auth: API key with full access or the scope read. Every class of agent token may call it.

Name Description
id The webhook’s id.
curl -X GET "https://api.rytiv.app/v1/webhooks/<id>" \
-H "Authorization: Bearer $RYTIV_TOKEN"

200 with a JSON body.

Status Code Meaning
401 unauthenticated No API key, or one that does not work.
403 token-scope The key’s scopes do not cover this route.
404 not-found Not found, or not yours. An object of another organization answers like one that does not exist.

Its deliveries with their status.

Auth: API key with full access or the scope read. An agent token of class production needs prodDataRead for it; sandbox and twin may call it.

Name Description
id The object’s id.
Name Description
limit How many entries, at most.
curl -X GET "https://api.rytiv.app/v1/webhooks/<id>/deliveries" \
-H "Authorization: Bearer $RYTIV_TOKEN"

200 with a JSON body.

Status Code Meaning
401 unauthenticated No API key, or one that does not work.
403 token-scope The key’s scopes do not cover this route.
404 not-found Not found, or not yours. An object of another organization answers like one that does not exist.

Removes the webhook.

Auth: API key with full access (a key with scopes cannot call this route). Refused for every agent token (agent-token-credential).

Name Description
id The webhook’s id.
curl -X DELETE "https://api.rytiv.app/v1/webhooks/<id>" \
-H "Authorization: Bearer $RYTIV_TOKEN"

204 with no body.

Status Code Meaning
401 unauthenticated No API key, or one that does not work.
403 token-scope The key’s scopes do not cover this route.
404 not-found Not found, or not yours. An object of another organization answers like one that does not exist.