Docs API reference
Activity
The event feed of your team or of one endpoint, and the registration history of a registration endpoint.
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 Notifications.
- GET/eventsList events
- GET/endpoints/{endpoint_id}/eventsList an endpoint's events
- GET/endpoints/{endpoint_id}/registration-historyGet registration history
List events
GET/events
Returns your team's activity feed, newest first: endpoint changes, registration ups and downs, LiveKit setup, rejected calls and billing changes. For the next page, pass the last event's id as before; an empty or short page means you reached the end.
Query parameters
| Field | Description |
|---|---|
limit | Page size, 1–100.Default: 20. |
before | Only events older than this event id: pass the last id of the previous page. |
Example request
curl "https://api.relaydock.io/api/v1/events?limit=20" \
-H "Authorization: Bearer $RELAYDOCK_API_KEY"import os
import requests
response = requests.get(
"https://api.relaydock.io/api/v1/events",
headers={"Authorization": f"Bearer {os.environ['RELAYDOCK_API_KEY']}"},
params={"limit": 20},
timeout=30,
)
response.raise_for_status()
print(response.json())const response = await fetch('https://api.relaydock.io/api/v1/events?limit=20', {
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 array; each item has these fields.
| Field | Description |
|---|---|
id | Event ID; increases over time. Pass the last one as before for the next page. |
kind | What happened, as <area>.<event>, e.g. endpoint.created, endpoint.provisioned, registration.down, registration.up, call.source_rejected, target.verified or billing.plan_changed. New kinds may be added. |
severity | ok, info, warn or bad. |
params | Values for the event's text; the keys depend on kind. |
endpoint | The endpoint the event is about; null for team-wide events. |
endpoint.id | Endpoint ID. |
endpoint.name | Endpoint name (also for deleted endpoints). |
created_at | When it happened. |
[
{
"id": 90211,
"kind": "registration.up",
"severity": "ok",
"params": {
"code": 200,
"expires_in": 300
},
"endpoint": {
"id": "3f6c2a1e-8b4d-4c7a-9e21-5d0b7f9a6c13",
"name": "Telnyx · +12025550123"
},
"created_at": "2026-03-14T09:26:53Z"
}
]Errors
Besides the errors any request can return:
| 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 events
GET/endpoints/{endpoint_id}/events
Returns the events of one endpoint, newest first. For the next page, pass the last event's id as before.
Path parameters
| Field | Description |
|---|---|
endpoint_id | The endpoint's id (UUID), as returned by GET /endpoints. |
Query parameters
| Field | Description |
|---|---|
limit | Page size, 1–200.Default: 50. |
before | Only events older than this event id: pass the last id of the previous page. |
Example request
curl "https://api.relaydock.io/api/v1/endpoints/3f6c2a1e-8b4d-4c7a-9e21-5d0b7f9a6c13/events" \
-H "Authorization: Bearer $RELAYDOCK_API_KEY"import os
import requests
response = requests.get(
"https://api.relaydock.io/api/v1/endpoints/3f6c2a1e-8b4d-4c7a-9e21-5d0b7f9a6c13/events",
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/endpoints/3f6c2a1e-8b4d-4c7a-9e21-5d0b7f9a6c13/events', {
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 array; each item has these fields.
| Field | Description |
|---|---|
id | Event ID; increases over time. Pass the last one as before for the next page. |
kind | What happened, as <area>.<event>, e.g. endpoint.created, endpoint.provisioned, registration.down, registration.up, call.source_rejected, target.verified or billing.plan_changed. New kinds may be added. |
severity | ok, info, warn or bad. |
params | Values for the event's text; the keys depend on kind. |
endpoint | The endpoint the event is about; null for team-wide events. |
endpoint.id | Endpoint ID. |
endpoint.name | Endpoint name (also for deleted endpoints). |
created_at | When it happened. |
[
{
"id": 90211,
"kind": "registration.up",
"severity": "ok",
"params": {
"code": 200,
"expires_in": 300
},
"endpoint": {
"id": "3f6c2a1e-8b4d-4c7a-9e21-5d0b7f9a6c13",
"name": "Telnyx · +12025550123"
},
"created_at": "2026-03-14T09:26:53Z"
}
]Errors
Besides the errors any request can return:
| 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 history
GET/endpoints/{endpoint_id}/registration-history
Returns a registration endpoint's state per hour for the last hours hours (UTC hours, the last one is the current hour) and every state change in that window. A bucket is partial when the registration was both up and down in that hour.
Path parameters
| Field | Description |
|---|---|
endpoint_id | The endpoint's id (UUID), as returned by GET /endpoints. |
Query parameters
| Field | Description |
|---|---|
hours | Window length in hours, 1–168 (7 days).Default: 24. |
Example request
curl "https://api.relaydock.io/api/v1/endpoints/3f6c2a1e-8b4d-4c7a-9e21-5d0b7f9a6c13/registration-history?hours=24" \
-H "Authorization: Bearer $RELAYDOCK_API_KEY"import os
import requests
response = requests.get(
"https://api.relaydock.io/api/v1/endpoints/3f6c2a1e-8b4d-4c7a-9e21-5d0b7f9a6c13/registration-history",
headers={"Authorization": f"Bearer {os.environ['RELAYDOCK_API_KEY']}"},
params={"hours": 24},
timeout=30,
)
response.raise_for_status()
print(response.json())const response = await fetch('https://api.relaydock.io/api/v1/endpoints/3f6c2a1e-8b4d-4c7a-9e21-5d0b7f9a6c13/registration-history?hours=24', {
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 |
|---|---|
buckets | One entry per hour, oldest first; the last is the current hour. |
buckets[].start | Start of the hour. |
buckets[].state | up (registered), down (failed or disabled), partial (both in this hour) or unknown (no data). |
transitions | State changes inside the window, oldest first. |
transitions[].at | When the state changed. |
transitions[].state | The new state, as in registration.state of the endpoint. |
transitions[].sip_code | SIP status of the REGISTER answer, if any. |
transitions[].reason | Failure reason (e.g. auth_failed), if any. |
{
"buckets": [
{
"start": "2026-03-14T09:00:00Z",
"state": "up"
}
],
"transitions": [
{
"at": "2026-03-14T09:26:53Z",
"state": "registered",
"sip_code": 200,
"reason": null
}
]
}Errors
Besides the errors any request can return:
| 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>`. |