Docs API reference

LiveKit project

Read the state of the connected LiveKit project and the objects RelayDock keeps in it, run the ownership check again, and resync.

Examples read your API key from RELAYDOCK_API_KEY (see Authentication). Paths are relative to https://api.relaydock.io/api/v1.

Get the LiveKit project

GET/target

Returns your connected LiveKit project: SIP host, API URL, a hint of the API key, its status and the result of the last ownership check. objects lists the inbound trunk, outbound trunk and dispatch rule RelayDock manages for each endpoint. The project is connected or changed in the panel.

Example request

curl "https://api.relaydock.io/api/v1/target" \
  -H "Authorization: Bearer $RELAYDOCK_API_KEY"

Response

200 with a JSON object.

Field Description
sip_hoststringThe project's SIP host (from LiveKit's project settings).
api_urlstringThe project's API URL.
api_key_hintstringFirst 4 characters of the API key.
statusstringconnected, or error when LiveKit rejected the API key or secret (see last_error_code).
last_error_codestringcan be nullWhy the credentials were rejected (livekit.invalid_credentials, livekit.permission_denied); null while connected.
verificationstringOwnership check: unverified, verifying, verified (RelayDock reached the project's SIP host with a test call) or failed (see verification_error).
verification_errorstringcan be nullWhy the last check failed: a LiveKit API error (livekit.invalid_credentials, livekit.permission_denied, livekit.not_found, livekit.unreachable, livekit.error) or the test call's result (livekit.probe_timeout, livekit.sip_unreachable, livekit.probe_rejected, livekit.sip_host_mismatch: the SIP host doesn't belong to this project); null otherwise.
verified_atstring (date-time)can be nullWhen the last check succeeded; null if never.
objectsarray of objectsLiveKit objects per endpoint, oldest endpoint first.
objects[].endpointobjectThe endpoint.
objects[].endpoint.idstring (uuid)Endpoint ID.
objects[].endpoint.namestringEndpoint name.
objects[].endpoint.sip_idstringThe endpoint's SIP ID; the LiveKit objects are named after it.
objects[].inbound_trunk_idstringcan be nullInbound trunk rd-<sip_id>-in; null until set up.
objects[].outbound_trunk_idstringcan be nullOutbound trunk rd-<sip_id>-out; null until set up.
objects[].dispatch_rule_idstringcan be nullDispatch rule rd-<sip_id>-rule; null until set up.
objects[].reconciled_atstring (date-time)can be nullWhen RelayDock last checked the objects; null if never.
objects[].reconcile_statestringcan be nullLast check: ok, fixed (missing or changed objects were restored) or error; null if never.
objects[].provision_statestringThe endpoint's LiveKit setup: waiting_target, pending, ready or error.
json
{
  "sip_host": "5hx0pq3kz1m.sip.livekit.cloud",
  "api_url": "https://acme-agents-4qz8k1.livekit.cloud",
  "api_key_hint": "APIa…",
  "status": "connected",
  "last_error_code": null,
  "verification": "verified",
  "verification_error": null,
  "verified_at": "2026-03-14T09:26:53Z",
  "objects": [
    {
      "endpoint": {
        "id": "3f6c2a1e-8b4d-4c7a-9e21-5d0b7f9a6c13",
        "name": "Telnyx · +12025550123",
        "sip_id": "ep-7k2m9x4q1z"
      },
      "inbound_trunk_id": "ST_hX2c9QmZr4Lp",
      "outbound_trunk_id": "ST_Vb7nK3dW8sTy",
      "dispatch_rule_id": "SDR_4mQx8LzR2nPk",
      "reconciled_at": "2026-03-14T09:26:53Z",
      "reconcile_state": "ok",
      "provision_state": "ready"
    }
  ]
}

Errors

Besides the errors any request can return:

Code Status When
target.not_found404Your team hasn't connected a LiveKit project yet.

Verify the LiveKit project

POST/target/verify

Starts an ownership check in the background: RelayDock checks the API key and secret, then places a short test call to the project's SIP host through temporary LiveKit objects, which it deletes afterwards. Returns 202 at once; poll GET /target until verification is verified or failed. If a check is already queued or running, no second one starts. Limited to 6 requests per minute per team.

Example request

curl -X POST "https://api.relaydock.io/api/v1/target/verify" \
  -H "Authorization: Bearer $RELAYDOCK_API_KEY"

Response

202 with a JSON object.

Field Description
statusstringAlways queued.Default: queued.
json
{
  "status": "queued"
}

Errors

Besides the errors any request can return:

Code Status When
target.not_found404Your team hasn't connected a LiveKit project yet.
rate_limited429More than 6 requests in the current one-minute window for your team (`Retry-After`: 60).

Resync LiveKit objects

POST/target/resync

Queues a check of every enabled endpoint's LiveKit objects: RelayDock recreates missing ones and corrects changed ones, and retries endpoints whose setup failed. Returns 202 at once; poll GET /target (objects[].reconcile_state, provision_state). Limited to 6 requests per minute per team.

Example request

curl -X POST "https://api.relaydock.io/api/v1/target/resync" \
  -H "Authorization: Bearer $RELAYDOCK_API_KEY"

Response

202 with a JSON object.

Field Description
statusstringAlways queued.Default: queued.
json
{
  "status": "queued"
}

Errors

Besides the errors any request can return:

Code Status When
target.not_found404Your team hasn't connected a LiveKit project yet.
rate_limited429More than 6 requests in the current one-minute window for your team (`Retry-After`: 60).