Docs API reference

Test calls

Place an outbound test call through an endpoint, listen for an inbound call, and read the result step by step.

Examples read your API key from RELAYDOCK_API_KEY (see Authentication). Paths are relative to https://api.relaydock.io/api/v1. For the concepts behind these operations, read Test calls and inbound checks.

Start a test call

POST/endpoints/{endpoint_id}/test-calls

LiveKit calls to through the endpoint's outbound trunk from caller, and the endpoint's agent joins the call; it rings for up to 30 seconds and lasts at most 2 minutes. Returns 202 in queued: poll GET /test-calls/{test_call_id} until state is completed or failed; steps show how far the call got. Test calls don't count as usage, but your carrier and LiveKit may charge for them. Limited to 5 per 10 minutes and 100 per 24 hours per team, shared by test calls and inbound checks.

Path parameters

Field Description
endpoint_idstring (uuid)requiredThe endpoint's id (UUID), as returned by GET /endpoints.

Request body

Field Description
tostringrequiredNumber to call: +E.164, or an extension on registration endpoints. Spaces, dashes and parentheses are ignored; a leading 00 is read as +.1–32 characters.
callerstringnullableCaller number: one of the endpoint's outbound_numbers. Default: the first one.Up to 32 characters.

Example request

Call from the endpoint's first outbound number
curl -X POST "https://api.relaydock.io/api/v1/endpoints/3f6c2a1e-8b4d-4c7a-9e21-5d0b7f9a6c13/test-calls" \
  -H "Authorization: Bearer $RELAYDOCK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+12025550147"
  }'
Call from a given outbound number
curl -X POST "https://api.relaydock.io/api/v1/endpoints/3f6c2a1e-8b4d-4c7a-9e21-5d0b7f9a6c13/test-calls" \
  -H "Authorization: Bearer $RELAYDOCK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+12025550147",
    "caller": "+12025550123"
  }'

Response

202 with a JSON object.

Field Description
idstring (uuid)Test call ID.
endpoint_idstring (uuid)The endpoint tested.
calleestringTest call: the number called. Inbound check: the endpoint's first number (empty if it has none).
callerstringTest call: the caller number. Inbound check: empty.
statestringTest call: queued, dialing, answered (waiting for RelayDock's call record), then completed or failed. Inbound check: waiting, then completed or failed. completed and failed are final.
stepsarray of objectsThe steps, in order.
steps[].keystringTest call steps: livekit.dial, edge.auth, carrier.answer, call.end. Inbound check steps: carrier.invite, edge.auth, livekit.answer, call.end. edge.auth is RelayDock's own check of the call.
steps[].statusstringpending (not reached yet), ok, bad or skipped (an earlier step failed). One of: pending, ok, bad, skipped.
steps[].codeintegercan be nullSIP status of the step, if any.
steps[].detailstringcan be nullOn bad: RelayDock's reason (e.g. source-not-allowed), LiveKit's error or the other side's reason. On a successful call.end: the talk time in seconds.
steps[].atstring (date-time)can be nullWhen the step finished; null while pending.
steps[].extraobjectcan be nullInbound checks only: source_ip of a call RelayDock rejected, and dialed when the carrier called a number that isn't on the endpoint.
result_codeintegercan be nullFinal SIP status; null until known.
errorstringcan be nullWhy it failed: RelayDock's reason (e.g. source-not-allowed, unknown-number), a LiveKit error code (e.g. livekit.unreachable), test_call.endpoint_not_ready, or inbound.no_call (no call arrived in time); null otherwise.
created_atstring (date-time)When it was started.
updated_atstring (date-time)Last change.
directionstringoutbound (test call) or inbound (inbound check).Default: outbound.
expires_atstring (date-time)can be nullInbound check: end of the listening window. Test call: null.
numbersarray of stringInbound check: the endpoint's numbers to call. Test call: empty.Default: [].
json
{
  "id": "9d2e6f41-3c8b-4a7e-b5d0-1e6f2a9c7b38",
  "endpoint_id": "3f6c2a1e-8b4d-4c7a-9e21-5d0b7f9a6c13",
  "callee": "+12025550147",
  "caller": "+12025550123",
  "state": "completed",
  "steps": [
    {
      "key": "edge.auth",
      "status": "pending",
      "code": null,
      "detail": null,
      "at": "2026-03-14T09:26:53Z",
      "extra": null
    }
  ],
  "result_code": 200,
  "error": null,
  "created_at": "2026-03-14T11:02:07Z",
  "updated_at": "2026-03-14T11:02:31Z",
  "direction": "outbound",
  "expires_at": null,
  "numbers": []
}

Errors

Besides the errors any request can return:

Code Status When
endpoint.not_found404No endpoint with this `id` exists in your team, or it was deleted.
test_call.endpoint_not_ready409The 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_error422A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`.
test_call.invalid_number422`to` isn't +E.164 (registration endpoints also accept a 2–15 digit extension).
test_call.invalid_caller422`caller` isn't in the endpoint's `outbound_numbers`.
rate_limited429Your 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_limited429Your team opened 5 test calls and inbound checks in the current 10-minute window (`Retry-After`: 600).

Start an inbound check

POST/endpoints/{endpoint_id}/inbound-checks

Listens for one real incoming call on the endpoint until expires_at: call one of numbers from any phone (on a registration endpoint, the number your carrier routes to it). Returns 202 in waiting: poll GET /test-calls/{test_call_id} until completed (LiveKit answered the call) or failed (error says why, e.g. inbound.no_call when nothing arrived). The call counts toward usage like any other. Limited to 5 per 10 minutes and 100 per 24 hours per team, shared by test calls and inbound checks.

Path parameters

Field Description
endpoint_idstring (uuid)requiredThe endpoint's id (UUID), as returned by GET /endpoints.

Example request

curl -X POST "https://api.relaydock.io/api/v1/endpoints/3f6c2a1e-8b4d-4c7a-9e21-5d0b7f9a6c13/inbound-checks" \
  -H "Authorization: Bearer $RELAYDOCK_API_KEY"

Response

202 with a JSON object.

Field Description
idstring (uuid)Test call ID.
endpoint_idstring (uuid)The endpoint tested.
calleestringTest call: the number called. Inbound check: the endpoint's first number (empty if it has none).
callerstringTest call: the caller number. Inbound check: empty.
statestringTest call: queued, dialing, answered (waiting for RelayDock's call record), then completed or failed. Inbound check: waiting, then completed or failed. completed and failed are final.
stepsarray of objectsThe steps, in order.
steps[].keystringTest call steps: livekit.dial, edge.auth, carrier.answer, call.end. Inbound check steps: carrier.invite, edge.auth, livekit.answer, call.end. edge.auth is RelayDock's own check of the call.
steps[].statusstringpending (not reached yet), ok, bad or skipped (an earlier step failed). One of: pending, ok, bad, skipped.
steps[].codeintegercan be nullSIP status of the step, if any.
steps[].detailstringcan be nullOn bad: RelayDock's reason (e.g. source-not-allowed), LiveKit's error or the other side's reason. On a successful call.end: the talk time in seconds.
steps[].atstring (date-time)can be nullWhen the step finished; null while pending.
steps[].extraobjectcan be nullInbound checks only: source_ip of a call RelayDock rejected, and dialed when the carrier called a number that isn't on the endpoint.
result_codeintegercan be nullFinal SIP status; null until known.
errorstringcan be nullWhy it failed: RelayDock's reason (e.g. source-not-allowed, unknown-number), a LiveKit error code (e.g. livekit.unreachable), test_call.endpoint_not_ready, or inbound.no_call (no call arrived in time); null otherwise.
created_atstring (date-time)When it was started.
updated_atstring (date-time)Last change.
directionstringoutbound (test call) or inbound (inbound check).Default: outbound.
expires_atstring (date-time)can be nullInbound check: end of the listening window. Test call: null.
numbersarray of stringInbound check: the endpoint's numbers to call. Test call: empty.Default: [].
json
{
  "id": "9d2e6f41-3c8b-4a7e-b5d0-1e6f2a9c7b38",
  "endpoint_id": "3f6c2a1e-8b4d-4c7a-9e21-5d0b7f9a6c13",
  "callee": "+12025550147",
  "caller": "+12025550123",
  "state": "completed",
  "steps": [
    {
      "key": "edge.auth",
      "status": "pending",
      "code": null,
      "detail": null,
      "at": "2026-03-14T09:26:53Z",
      "extra": null
    }
  ],
  "result_code": 200,
  "error": null,
  "created_at": "2026-03-14T11:02:07Z",
  "updated_at": "2026-03-14T11:02:31Z",
  "direction": "outbound",
  "expires_at": null,
  "numbers": []
}

Errors

Besides the errors any request can return:

Code Status When
endpoint.not_found404No endpoint with this `id` exists in your team, or it was deleted.
inbound_check.disabled409The endpoint is disabled.
inbound_check.no_number409The endpoint is a trunk without numbers.
inbound_check.pending409Another inbound check on this endpoint hasn't expired yet.
validation_error422A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`.
rate_limited429Your 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_limited429Your team opened 5 test calls and inbound checks in the current 10-minute window (`Retry-After`: 600).

Get a test call

GET/test-calls/{test_call_id}

Returns a test call or inbound check with its steps. Poll every few seconds until state is completed or failed. Test calls and inbound checks are kept for 90 days.

Path parameters

Field Description
test_call_idstring (uuid)requiredThe test call's or inbound check's id.

Example request

curl "https://api.relaydock.io/api/v1/test-calls/9d2e6f41-3c8b-4a7e-b5d0-1e6f2a9c7b38" \
  -H "Authorization: Bearer $RELAYDOCK_API_KEY"

Response

200 with a JSON object.

Field Description
idstring (uuid)Test call ID.
endpoint_idstring (uuid)The endpoint tested.
calleestringTest call: the number called. Inbound check: the endpoint's first number (empty if it has none).
callerstringTest call: the caller number. Inbound check: empty.
statestringTest call: queued, dialing, answered (waiting for RelayDock's call record), then completed or failed. Inbound check: waiting, then completed or failed. completed and failed are final.
stepsarray of objectsThe steps, in order.
steps[].keystringTest call steps: livekit.dial, edge.auth, carrier.answer, call.end. Inbound check steps: carrier.invite, edge.auth, livekit.answer, call.end. edge.auth is RelayDock's own check of the call.
steps[].statusstringpending (not reached yet), ok, bad or skipped (an earlier step failed). One of: pending, ok, bad, skipped.
steps[].codeintegercan be nullSIP status of the step, if any.
steps[].detailstringcan be nullOn bad: RelayDock's reason (e.g. source-not-allowed), LiveKit's error or the other side's reason. On a successful call.end: the talk time in seconds.
steps[].atstring (date-time)can be nullWhen the step finished; null while pending.
steps[].extraobjectcan be nullInbound checks only: source_ip of a call RelayDock rejected, and dialed when the carrier called a number that isn't on the endpoint.
result_codeintegercan be nullFinal SIP status; null until known.
errorstringcan be nullWhy it failed: RelayDock's reason (e.g. source-not-allowed, unknown-number), a LiveKit error code (e.g. livekit.unreachable), test_call.endpoint_not_ready, or inbound.no_call (no call arrived in time); null otherwise.
created_atstring (date-time)When it was started.
updated_atstring (date-time)Last change.
directionstringoutbound (test call) or inbound (inbound check).Default: outbound.
expires_atstring (date-time)can be nullInbound check: end of the listening window. Test call: null.
numbersarray of stringInbound check: the endpoint's numbers to call. Test call: empty.Default: [].
json
{
  "id": "9d2e6f41-3c8b-4a7e-b5d0-1e6f2a9c7b38",
  "endpoint_id": "3f6c2a1e-8b4d-4c7a-9e21-5d0b7f9a6c13",
  "callee": "+12025550147",
  "caller": "+12025550123",
  "state": "completed",
  "steps": [
    {
      "key": "edge.auth",
      "status": "pending",
      "code": null,
      "detail": null,
      "at": "2026-03-14T09:26:53Z",
      "extra": null
    }
  ],
  "result_code": 200,
  "error": null,
  "created_at": "2026-03-14T11:02:07Z",
  "updated_at": "2026-03-14T11:02:31Z",
  "direction": "outbound",
  "expires_at": null,
  "numbers": []
}

Errors

Besides the errors any request can return:

Code Status When
test_call.not_found404No test call or inbound check with this `id` exists in your team.
validation_error422A parameter or body field doesn't match the schema; `fields` maps each one to `validation.<type>`.