Docs API
Errors
Every error is JSON with a stable code that your code can branch on, and a readable message for people.
The error body
{"code": "endpoint.not_found", "message": "Endpoint not found"}codeis stable: compare it, not the message. Codes have the form<area>.<error>.messageis English text for logs and people.- Every response has an
X-Request-IDheader. Include it when you write to support; a 500 response also has it asrequest_idin the body.
Validation errors
A request that doesn't match the schema returns 422 validation_error. fields maps each field path to the kind of problem, validation. followed by the validator's type:
{
"code": "validation_error",
"message": "Request validation failed",
"fields": {
"registration.username": "validation.missing",
"registration.expires": "validation.less_than_equal"
}
} Checks that need RelayDock's rules return their own code with the same fields map, for example a number that isn't +E.164:
{
"code": "number.invalid",
"message": "Numbers must be written as +E.164, e.g. +4930123456",
"fields": {"trunk.numbers.0": "number.invalid"}
}Errors any request can return
| Code | Status | When |
|---|---|---|
auth.required | 401 | No Authorization: Bearer header. |
auth.invalid_api_key | 401 | The key is unknown or revoked. |
tenant.invalid_header | 400 | X-RelayDock-Tenant isn't a team ID. |
tenant.forbidden | 403 | X-RelayDock-Tenant names a team other than the key's. |
tenant.suspended | 403 | A change (POST, PATCH, DELETE) on a suspended team. Reading still works. |
tenant.deleting | 403 | A change on a team whose deletion is scheduled. Reading and exporting still work. |
validation_error | 422 | The request doesn't match the schema; see above. |
rate_limited | 429 | Too many requests. Wait the number of seconds in the Retry-After header. |
not_found | 404 | The path doesn't exist. |
method_not_allowed | 405 | The path exists but not with this method. |
internal_error | 500 | Something failed on RelayDock's side. Retry later and send the request_id to support if it repeats. |
Errors of each operation
The reference lists these with each operation too.
Get the LiveKit projectGET /target
| Code | Status | When |
|---|---|---|
target.not_found | 404 | Your team hasn't connected a LiveKit project yet. |
Verify the LiveKit projectPOST /target/verify
| Code | Status | When |
|---|---|---|
target.not_found | 404 | Your team hasn't connected a LiveKit project yet. |
rate_limited | 429 | More than 6 requests in the current one-minute window for your team (`Retry-After`: 60). |
Resync LiveKit objectsPOST /target/resync
| Code | Status | When |
|---|---|---|
target.not_found | 404 | Your team hasn't connected a LiveKit project yet. |
rate_limited | 429 | More than 6 requests in the current one-minute window for your team (`Retry-After`: 60). |
List endpointsGET /endpoints
| Code | Status | When |
|---|---|---|
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |
Add an endpointPOST /endpoints
| Code | Status | When |
|---|---|---|
endpoint.plan_limit | 409 | Your plan's endpoint limit is reached (the message names your plan and its limit). |
number.taken | 409 | A number is already on another endpoint, in any team. Numbers are compared in every format carriers send. |
endpoint.digest_username_taken | 409 | `trunk.digest_username` is already used by another trunk, in any team. |
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |
endpoint.invalid_provider | 422 | `provider` isn't a template `code` from `GET /provider-templates`. |
endpoint.invalid_agent_name | 422 | `agent_name` doesn't start with a letter or digit, or has characters other than letters, digits, `.`, `_` and `-`. |
endpoint.registration_required | 422 | `kind` is `registration` but `registration` is missing. |
endpoint.trunk_required | 422 | `kind` is `trunk` but `trunk` is missing. |
endpoint.registrar_required | 422 | `registration.registrar_host` is empty and the provider template has no registrar. |
endpoint.invalid_host | 422 | A registrar, SIP domain or outbound host isn't a host name or IPv4 address (registrar and outbound hosts also can't be private, loopback or reserved addresses). |
endpoint.invalid_username | 422 | A SIP user name has spaces, non-ASCII characters or one of `< > " @ : ; ?`. |
endpoint.password_required | 422 | `trunk.digest_username` is set but `trunk.digest_password` is missing. |
number.invalid | 422 | `registration.number` or an entry in `trunk.numbers` isn't a +E.164 number. |
endpoint.invalid_cidr | 422 | An entry in `source_ips` isn't an IP address or CIDR block, or is a private, loopback or reserved block. |
endpoint.cidr_too_broad | 422 | An entry in `source_ips` is wider than /16 (IPv4) or /32 (IPv6). |
endpoint.source_ips_required | 422 | `registration.source_ips` is empty or `null`, and neither the template nor the registrar's DNS gave an address. |
endpoint.invalid_outbound_number | 422 | An entry in `outbound_numbers` isn't +E.164. Registration endpoints also accept a 2–15 digit extension; the message then mentions it. |
endpoint.digest_incomplete | 422 | `trunk.digest_password` is set without `trunk.digest_username`. |
endpoint.trunk_auth_required | 422 | A trunk needs `trunk.source_ips`, a `trunk.digest_username`, or both. |
endpoint.outbound_auth_required | 422 | `trunk.outbound.auth_type` is `digest` but the user name (or, with the message "Digest password is required", the password) is missing. |
Get an endpointGET /endpoints/{endpoint_id}
| Code | Status | When |
|---|---|---|
endpoint.not_found | 404 | No endpoint with this `id` exists in your team, or it was deleted. |
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |
Update an endpointPATCH /endpoints/{endpoint_id}
| Code | Status | When |
|---|---|---|
endpoint.not_found | 404 | No endpoint with this `id` exists in your team, or it was deleted. |
number.taken | 409 | A number is already on another endpoint, in any team. Numbers are compared in every format carriers send. |
endpoint.digest_username_taken | 409 | `trunk.digest_username` is already used by another trunk, in any team. |
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |
endpoint.invalid_provider | 422 | `provider` isn't a template `code` from `GET /provider-templates`. |
endpoint.invalid_agent_name | 422 | `agent_name` doesn't start with a letter or digit, or has characters other than letters, digits, `.`, `_` and `-`. |
endpoint.registrar_required | 422 | `registration.registrar_host` is empty and the provider template has no registrar. |
endpoint.invalid_host | 422 | A registrar, SIP domain or outbound host isn't a host name or IPv4 address (registrar and outbound hosts also can't be private, loopback or reserved addresses). |
endpoint.invalid_username | 422 | A SIP user name has spaces, non-ASCII characters or one of `< > " @ : ; ?`. |
endpoint.password_required | 422 | A new `trunk.digest_username` was sent without `trunk.digest_password`, and no password is stored. |
number.invalid | 422 | `registration.number` or an entry in `trunk.numbers` isn't a +E.164 number. |
endpoint.invalid_cidr | 422 | An entry in `source_ips` isn't an IP address or CIDR block, or is a private, loopback or reserved block. |
endpoint.cidr_too_broad | 422 | An entry in `source_ips` is wider than /16 (IPv4) or /32 (IPv6). |
endpoint.source_ips_required | 422 | `registration.source_ips` is empty or `null`, and neither the template nor the registrar's DNS gave an address. |
endpoint.invalid_outbound_number | 422 | An entry in `outbound_numbers` isn't +E.164. Registration endpoints also accept a 2–15 digit extension; the message then mentions it. |
endpoint.digest_incomplete | 422 | `trunk.digest_password` is set without `trunk.digest_username`. |
endpoint.trunk_auth_required | 422 | A trunk needs `trunk.source_ips`, a `trunk.digest_username`, or both. |
endpoint.outbound_auth_required | 422 | `trunk.outbound.auth_type` is `digest` but the user name (or, with the message "Digest password is required", the password, when none is stored) is missing. |
rate_limited | 429 | More than 30 updates in the current one-minute window for your team (`Retry-After`: 60). |
Delete an endpointDELETE /endpoints/{endpoint_id}
| Code | Status | When |
|---|---|---|
endpoint.not_found | 404 | No endpoint with this `id` exists in your team, or it was deleted. |
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |
Get an ElevenLabs endpoint's SIP passwordPOST /endpoints/{endpoint_id}/platform-password
| Code | Status | When |
|---|---|---|
endpoint.not_found | 404 | No endpoint with this `id` exists in your team, or it was deleted. |
endpoint.no_platform_password | 409 | The endpoint is a LiveKit endpoint; only ElevenLabs endpoints have a SIP password to enter on the platform. |
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |
rate_limited | 429 | More than 20 requests in the current one-minute window for your team (`Retry-After`: 60). |
Retry a registrationPOST /endpoints/{endpoint_id}/retry-registration
| Code | Status | When |
|---|---|---|
endpoint.not_found | 404 | No endpoint with this `id` exists in your team, or it was deleted. |
endpoint.not_registration | 409 | The endpoint is a trunk. |
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |
rate_limited | 429 | More than 6 retries in the current one-minute window for your team (`Retry-After`: 60). |
List eventsGET /events
| Code | Status | When |
|---|---|---|
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |
List an endpoint's eventsGET /endpoints/{endpoint_id}/events
| Code | Status | When |
|---|---|---|
endpoint.not_found | 404 | No endpoint with this `id` exists in your team, or it was deleted. |
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |
Get registration historyGET /endpoints/{endpoint_id}/registration-history
| Code | Status | When |
|---|---|---|
endpoint.not_found | 404 | No endpoint with this `id` exists in your team, or it was deleted. |
endpoint.not_registration | 409 | The endpoint is a trunk. |
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |
List callsGET /calls
| Code | Status | When |
|---|---|---|
calls.invalid_cursor | 400 | `cursor` isn't a `next_cursor` value from a previous page. |
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |
Export calls as CSVGET /calls/export
| Code | Status | When |
|---|---|---|
calls.invalid_range | 400 | `from` is not earlier than `to`. |
calls.range_too_wide | 400 | `from` and `to` are more than 31 days apart. |
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |
rate_limited | 429 | More than 10 exports in the current one-hour window for your team (`Retry-After`: 3600). |
Get a callGET /calls/{call_id}
| Code | Status | When |
|---|---|---|
call.not_found | 404 | No call record with this `id` exists in your team. |
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |
Get the usage overviewGET /usage/overview
| Code | Status | When |
|---|---|---|
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |
Get monthly usageGET /usage/monthly
| Code | Status | When |
|---|---|---|
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |
Start a test callPOST /endpoints/{endpoint_id}/test-calls
| Code | Status | When |
|---|---|---|
endpoint.not_found | 404 | No endpoint with this `id` exists in your team, or it was deleted. |
test_call.endpoint_not_ready | 409 | The endpoint must be enabled, set up in LiveKit (`provision_state` `ready`, with an outbound trunk) and have an outbound number, and your LiveKit project must be connected. |
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |
test_call.invalid_number | 422 | `to` isn't +E.164 (registration endpoints also accept a 2–15 digit extension). |
test_call.invalid_caller | 422 | `caller` isn't in the endpoint's `outbound_numbers`. |
rate_limited | 429 | Your team opened 100 test calls and inbound checks in the last 24 hours. `Retry-After` is the time until the oldest one leaves the window. |
rate_limited | 429 | Your team opened 5 test calls and inbound checks in the current 10-minute window (`Retry-After`: 600). |
Start an inbound checkPOST /endpoints/{endpoint_id}/inbound-checks
| Code | Status | When |
|---|---|---|
endpoint.not_found | 404 | No endpoint with this `id` exists in your team, or it was deleted. |
inbound_check.disabled | 409 | The endpoint is disabled. |
inbound_check.no_number | 409 | The endpoint is a trunk without numbers. |
inbound_check.pending | 409 | Another inbound check on this endpoint hasn't expired yet. |
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |
rate_limited | 429 | Your team opened 100 test calls and inbound checks in the last 24 hours. `Retry-After` is the time until the oldest one leaves the window. |
rate_limited | 429 | Your team opened 5 test calls and inbound checks in the current 10-minute window (`Retry-After`: 600). |
Get a test callGET /test-calls/{test_call_id}
| Code | Status | When |
|---|---|---|
test_call.not_found | 404 | No test call or inbound check with this `id` exists in your team. |
validation_error | 422 | A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`. |