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/targetGet the LiveKit project
- POST/target/verifyVerify the LiveKit project
- POST/target/resyncResync LiveKit objects
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"import os
import requests
response = requests.get(
"https://api.relaydock.io/api/v1/target",
headers={"Authorization": f"Bearer {os.environ['RELAYDOCK_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
print(response.json())const response = await fetch('https://api.relaydock.io/api/v1/target', {
headers: {
'Authorization': `Bearer ${process.env.RELAYDOCK_API_KEY}`,
},
})
if (!response.ok)
throw new Error(`${response.status} ${await response.text()}`)
console.log(await response.json())Response
200 with a JSON object.
| Field | Description |
|---|---|
sip_host | The project's SIP host (from LiveKit's project settings). |
api_url | The project's API URL. |
api_key_hint | First 4 characters of the API key. |
status | connected, or error when LiveKit rejected the API key or secret (see last_error_code). |
last_error_code | Why the credentials were rejected (livekit.invalid_credentials, livekit.permission_denied); null while connected. |
verification | Ownership check: unverified, verifying, verified (RelayDock reached the project's SIP host with a test call) or failed (see verification_error). |
verification_error | Why 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_at | When the last check succeeded; null if never. |
objects | LiveKit objects per endpoint, oldest endpoint first. |
objects[].endpoint | The endpoint. |
objects[].endpoint.id | Endpoint ID. |
objects[].endpoint.name | Endpoint name. |
objects[].endpoint.sip_id | The endpoint's SIP ID; the LiveKit objects are named after it. |
objects[].inbound_trunk_id | Inbound trunk rd-<sip_id>-in; null until set up. |
objects[].outbound_trunk_id | Outbound trunk rd-<sip_id>-out; null until set up. |
objects[].dispatch_rule_id | Dispatch rule rd-<sip_id>-rule; null until set up. |
objects[].reconciled_at | When RelayDock last checked the objects; null if never. |
objects[].reconcile_state | Last check: ok, fixed (missing or changed objects were restored) or error; null if never. |
objects[].provision_state | The endpoint's LiveKit setup: waiting_target, pending, ready or error. |
{
"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_found | 404 | Your 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"import os
import requests
response = requests.post(
"https://api.relaydock.io/api/v1/target/verify",
headers={"Authorization": f"Bearer {os.environ['RELAYDOCK_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
print(response.json())const response = await fetch('https://api.relaydock.io/api/v1/target/verify', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.RELAYDOCK_API_KEY}`,
},
})
if (!response.ok)
throw new Error(`${response.status} ${await response.text()}`)
console.log(await response.json())Response
202 with a JSON object.
| Field | Description |
|---|---|
status | Always queued.Default: queued. |
{
"status": "queued"
}Errors
Besides the errors any request can return:
| 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 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"import os
import requests
response = requests.post(
"https://api.relaydock.io/api/v1/target/resync",
headers={"Authorization": f"Bearer {os.environ['RELAYDOCK_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
print(response.json())const response = await fetch('https://api.relaydock.io/api/v1/target/resync', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.RELAYDOCK_API_KEY}`,
},
})
if (!response.ok)
throw new Error(`${response.status} ${await response.text()}`)
console.log(await response.json())Response
202 with a JSON object.
| Field | Description |
|---|---|
status | Always queued.Default: queued. |
{
"status": "queued"
}Errors
Besides the errors any request can return:
| 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). |