Admin voice
A voice region is a group of LiveKit servers. Squad places each new voice session in a region, then on a server inside it.
Changes
Заголовок раздела «Changes»Each API node reloads the configuration shortly after a write. A write never moves or disconnects a session that is already connected.
Placement eligibility
Заголовок раздела «Placement eligibility»Regions and servers have the same eligibility fields, and a session can use a server only when it is active and both the server and its region admit the session.
| Field | Rule |
|---|---|
| allowed_user_ids | When the list is not empty, only the accounts in it are admitted |
| allowed_guild_ids | Admits only these guilds, or lets them skip vip_only and required_guild_features when those are set |
| vip_only | The guild needs the VIP_VOICE guild feature |
| required_guild_features | The guild needs at least one of the listed features |
When allowed_guild_ids, vip_only or required_guild_features is set, calls in direct messages and group direct messages can’t use that region or server.
Admin voice region object
Заголовок раздела «Admin voice region object»You pick the id when you create the region, and you can’t change it later. A channel’s rtc_region is this ID.
Structure
Заголовок раздела «Structure»| Field | Type | Description |
|---|---|---|
| id | string | The ID of the region (1-64 characters) |
| name | string | The name shown for the region in a client (1-100 characters) |
| emoji | string | The emoji shown for the region (1-64 characters) |
| latitude | number | The latitude placement measures distance from |
| longitude | number | The longitude placement measures distance from |
| is_default1 | boolean | Whether automatic placement falls back to this region |
| hidden | boolean | Whether the region is left out of the region lists clients show, while placement still uses it |
| vip_only | boolean | Whether the guild needs VIP_VOICE |
| required_guild_features | array[string] | Guild features that admit a guild (max 100) |
| allowed_guild_ids | array[snowflake] | The guilds admitted without other guild checks (max 1000) |
| allowed_user_ids | array[snowflake] | The only accounts allowed to use the region, when not empty (max 1000) |
| created_at | ?ISO8601 timestamp | When the region was created |
| updated_at | ?ISO8601 timestamp | When the region last changed |
| servers? | array[Admin voice server object] | The servers in the region, when include_servers is true |
1 To change the default, turn the flag off on the old default region too.
Example
Заголовок раздела «Example»{ "id": "europe-north", "name": "Northern Europe", "emoji": "🇸🇪", "latitude": 59.33, "longitude": 18.06, "is_default": true, "hidden": false, "vip_only": false, "required_guild_features": [], "allowed_guild_ids": [], "allowed_user_ids": [], "created_at": "2026-02-11T08:14:00.000Z", "updated_at": "2026-08-02T17:45:31.000Z"}Admin voice server object
Заголовок раздела «Admin voice server object»A voice server is one LiveKit deployment in one region, identified by its region_id and server_id. To move a server to another region, delete it and create it again. You send api_key and api_secret when you create or update a server, and no read returns them.
Structure
Заголовок раздела «Structure»| Field | Type | Description |
|---|---|---|
| region_id | string | The ID of the region the server belongs to (1-64 characters) |
| server_id | string | The ID of the server, unique inside its region (1-64 characters) |
| endpoint | string | The LiveKit ws:// or wss:// URL that clients connect to |
| latitude | ?number | The latitude used for this server, or null to use the region’s |
| longitude | ?number | The longitude used for this server, or null to use the region’s |
| is_active | boolean | Whether new sessions can be placed on the server |
| soft_connection_limit | ?integer | The connection count at which placement prefers the region’s other servers, or null for none (1-2147483647) |
| notes | ?string | Admin notes about the server, or null for none |
| vip_only | boolean | Whether the guild needs VIP_VOICE |
| required_guild_features | array[string] | Guild features that admit a guild (max 100) |
| allowed_guild_ids | array[snowflake] | The guilds admitted without other guild checks (max 1000) |
| allowed_user_ids | array[snowflake] | The only accounts allowed to use the server, when not empty (max 1000) |
| internal_endpoint | ?string | The http:// or https:// URL the API uses for the LiveKit control API and health checks, or null to use endpoint |
| draining | boolean | Whether new calls go to other servers while calls already on this one keep going |
| public_ipv4 | ?string | The public IPv4 address LiveKit gives to clients, or null when none is known |
| public_ipv6 | ?string | The public IPv6 address LiveKit gives to clients, or null when none is known |
| health | health object | The server’s health as the API node that handled the request last saw it |
| duplicate_api_key | boolean | Whether another server uses the same api_key |
| created_at | ?ISO8601 timestamp | When the server was created |
| updated_at | ?ISO8601 timestamp | When the server last changed |
Voice server health object
Заголовок раздела «Voice server health object»| Field | Type | Description |
|---|---|---|
| status | string | up, down, or unknown before the first check |
| checked_at | ?ISO8601 timestamp | When the last check ran, or null before the first |
| error | ?string | The status code or short transport error of the last failed check |
Health checks
Заголовок раздела «Health checks»Every API node checks every active server on its own.
| Check | Value |
|---|---|
| Interval | FLUXER_VOICE_HEALTH_INTERVAL_MS, 15 seconds by default |
| Request | GET on internal_endpoint, or on endpoint when it is null |
| Down | After 2 failed checks in a row |
| Up | After 1 passing check |
- Placement sends no new calls to a server that is down, unless every server it could pick is down.
- A call pinned to a server that is down moves on its next join.
- A check of a public endpoint that resolves to a private address doesn’t run, and the status stays
unknown.
Draining
Заголовок раздела «Draining»A server with draining set gets no new calls. Calls already on it keep going, and people who join those calls are still placed on it. rexctl sets it while it upgrades or removes a server. Unlike is_active false, draining never splits a call in two.
Soft connection limits
Заголовок раздела «Soft connection limits»soft_connection_limit is the connection count at which placement starts to prefer the region’s other servers, and it never refuses a session. The count comes from Get voice state counts. Each API node refreshes it every 15 seconds, and a burst of joins between refreshes can go past the limit. The limit is checked when a channel’s first session is placed, and later joins to that channel use the same server.
Hidden regions
Заголовок раздела «Hidden regions»A region with hidden set is left out of List RTC regions and out of rtc_regions in Ready, so nobody can pick it in a client. Placement still uses it. People for whom it is the nearest region get calls there, and a channel or call already set to it keeps using it.
Setting a channel’s rtc_region or a call’s region to a hidden region returns 400 INVALID_FORM_BODY with INVALID_OR_RESTRICTED_RTC_REGION. Sending the region the channel or call already uses is accepted, so saving other channel settings never clears it. Setting the region to null or automatic always works. To send no new calls to a region at all, set draining on its servers.
List voice regions
Заголовок раздела «List voice regions»/v1/admin/voice/regionsReturns every Admin voice region object, sorted by name. You need voice:region:list.
Query parameters
Заголовок раздела «Query parameters»| Field | Type | Description |
|---|---|---|
| include_servers? | boolean | Whether to include each region’s servers (default false) |
Response body
Заголовок раздела «Response body»| Field | Type | Description |
|---|---|---|
| regions | array[Admin voice region object] | Every configured region |
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | response body | The regions were returned |
The rate limit is 200 requests per minute, on the admin:lookup bucket.
Get voice region
Заголовок раздела «Get voice region»/v1/admin/voice/regions/{region_id}Returns one Admin voice region object. You need voice:region:list.
Query parameters
Заголовок раздела «Query parameters»| Field | Type | Description |
|---|---|---|
| include_servers? | boolean | Whether to include the region’s servers (default true) |
Response body
Заголовок раздела «Response body»| Field | Type | Description |
|---|---|---|
| region | ?Admin voice region object | The region, or null |
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | response body | The region was looked up, and region is null when none has the ID |
The rate limit is 200 requests per minute, on the admin:lookup bucket.
Create voice region
Заголовок раздела «Create voice region»/v1/admin/voice/regionsCreates a region, and an id already in use overwrites that region. You need voice:region:create.
JSON body
Заголовок раздела «JSON body»| Field | Type | Description |
|---|---|---|
| id | string | The ID of the region (1-64 characters) |
| name | string | The name shown for the region in a client (1-100 characters) |
| emoji | string | The emoji shown for the region (1-64 characters) |
| latitude | number | The latitude placement measures distance from |
| longitude | number | The longitude placement measures distance from |
| is_default? | boolean | Whether automatic placement falls back to this region (default false) |
| hidden? | boolean | Whether to leave the region out of the region lists clients show (default false) |
| vip_only? | boolean | Whether the guild needs VIP_VOICE (default false) |
| required_guild_features? | array[string] | Guild features that admit a guild (max 100) |
| allowed_guild_ids? | array[snowflake] | The guilds admitted without other guild checks (max 1000) |
| allowed_user_ids? | array[snowflake] | The only accounts allowed to use the region, when not empty (max 1000) |
Response body
Заголовок раздела «Response body»| Field | Type | Description |
|---|---|---|
| region | Admin voice region object | The created region |
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | response body | The region was created |
The rate limit is 100 requests per minute, on the admin:guild:modify bucket.
Update voice region
Заголовок раздела «Update voice region»/v1/admin/voice/regions/{region_id}Updates a region, and an array you send replaces the stored one. You need voice:region:update.
JSON body
Заголовок раздела «JSON body»| Field | Type | Description |
|---|---|---|
| name? | string | The name shown for the region in a client (1-100 characters) |
| emoji? | string | The emoji shown for the region (1-64 characters) |
| latitude? | number | The latitude placement measures distance from |
| longitude? | number | The longitude placement measures distance from |
| is_default? | boolean | Whether automatic placement falls back to this region |
| hidden? | boolean | Whether to leave the region out of the region lists clients show |
| vip_only? | boolean | Whether the guild needs VIP_VOICE |
| required_guild_features? | array[string] | Guild features that admit a guild (max 100) |
| allowed_guild_ids? | array[snowflake] | The guilds admitted without other guild checks (max 1000) |
| allowed_user_ids? | array[snowflake] | The only accounts allowed to use the region, when not empty (max 1000) |
Response body
Заголовок раздела «Response body»| Field | Type | Description |
|---|---|---|
| region | Admin voice region object | The updated region |
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | response body | The region was updated |
| 404 | error response | UNKNOWN_VOICE_REGION when no region has the ID |
The rate limit is 100 requests per minute, on the admin:guild:modify bucket.
Delete voice region
Заголовок раздела «Delete voice region»/v1/admin/voice/regions/{region_id}Deletes a region and every server in it. Sessions on those servers stay connected, but Squad can’t mute or disconnect them. You need voice:region:delete.
Response body
Заголовок раздела «Response body»| Field | Type | Description |
|---|---|---|
| success | boolean | Always true |
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | response body | The region was deleted |
| 404 | error response | UNKNOWN_VOICE_REGION when no region has the ID |
The rate limit is 100 requests per minute, on the admin:guild:modify bucket.
List voice servers
Заголовок раздела «List voice servers»/v1/admin/voice/regions/{region_id}/serversReturns every Admin voice server object in a region. You need voice:server:list.
Response body
Заголовок раздела «Response body»| Field | Type | Description |
|---|---|---|
| servers | array[Admin voice server object] | The servers in the region, empty when the region doesn’t exist |
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | response body | The servers were returned |
The rate limit is 200 requests per minute, on the admin:lookup bucket.
Get voice server
Заголовок раздела «Get voice server»/v1/admin/voice/regions/{region_id}/servers/{server_id}Returns one Admin voice server object. You need voice:server:list.
Response body
Заголовок раздела «Response body»| Field | Type | Description |
|---|---|---|
| server | ?Admin voice server object | The server, or null |
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | response body | The server was looked up, and server is null when none matches |
The rate limit is 200 requests per minute, on the admin:lookup bucket.
Create voice server
Заголовок раздела «Create voice server»/v1/admin/voice/regions/{region_id}/serversAdds a server to a region. You need voice:server:create.
JSON body
Заголовок раздела «JSON body»| Field | Type | Description |
|---|---|---|
| server_id | string | The ID of the server, unique inside the region (1-64 characters) |
| endpoint | string | The LiveKit ws:// or wss:// URL that clients connect to |
| api_key | string | The LiveKit API key (1-256 characters) |
| api_secret | string | The LiveKit API secret (1-256 characters) |
| latitude?1 | ?number | The latitude used for this server, or null to use the region’s |
| longitude?1 | ?number | The longitude used for this server, or null to use the region’s |
| is_active? | boolean | Whether new sessions can be placed on the server (default true) |
| soft_connection_limit? | ?integer | The connection count at which placement prefers the region’s other servers, or null for none (1-2147483647) |
| notes? | ?string | Admin notes about the server, trimmed, with an empty value stored as null (max 2000 characters) |
| vip_only? | boolean | Whether the guild needs VIP_VOICE (default false) |
| required_guild_features? | array[string] | Guild features that admit a guild (max 100) |
| allowed_guild_ids? | array[snowflake] | The guilds admitted without other guild checks (max 1000) |
| allowed_user_ids? | array[snowflake] | The only accounts allowed to use the server, when not empty (max 1000) |
| internal_endpoint? | ?string | The http:// or https:// URL the API uses for the control API and health checks (max 512 characters) |
| draining? | boolean | Whether new calls go to other servers (default false) |
| public_ipv4? | ?string | The public IPv4 address LiveKit gives to clients, for the admin panel |
| public_ipv6? | ?string | The public IPv6 address LiveKit gives to clients, for the admin panel |
1 Send both coordinates or neither
Response body
Заголовок раздела «Response body»| Field | Type | Description |
|---|---|---|
| server | Admin voice server object | The created server |
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | response body | The server was created |
| 404 | error response | UNKNOWN_VOICE_REGION when no region has the ID |
| 409 | error response | VOICE_SERVER_ID_IN_USE for a taken ID, or VOICE_SERVER_API_KEY_IN_USE for a taken key |
The rate limit is 100 requests per minute, on the admin:guild:modify bucket.
Update voice server
Заголовок раздела «Update voice server»/v1/admin/voice/regions/{region_id}/servers/{server_id}Updates a server, and an array you send replaces the stored one. You need voice:server:update.
JSON body
Заголовок раздела «JSON body»| Field | Type | Description |
|---|---|---|
| endpoint? | string | The LiveKit ws:// or wss:// URL that clients connect to |
| api_key? | string | The LiveKit API key (1-256 characters) |
| api_secret? | string | The LiveKit API secret (1-256 characters) |
| latitude?1 | ?number | The latitude used for this server, or null to use the region’s |
| longitude?1 | ?number | The longitude used for this server, or null to use the region’s |
| is_active? | boolean | Whether new sessions can be placed on the server |
| soft_connection_limit? | ?integer | The connection count at which placement prefers the region’s other servers, or null for none (1-2147483647) |
| notes? | ?string | Admin notes about the server, trimmed, with null or an empty value clearing them (max 2000 characters) |
| vip_only? | boolean | Whether the guild needs VIP_VOICE |
| required_guild_features? | array[string] | Guild features that admit a guild (max 100) |
| allowed_guild_ids? | array[snowflake] | The guilds admitted without other guild checks (max 1000) |
| allowed_user_ids? | array[snowflake] | The only accounts allowed to use the server, when not empty (max 1000) |
| internal_endpoint? | ?string | The http:// or https:// URL the API uses for the control API and health checks, or null to use endpoint |
| draining? | boolean | Whether new calls go to other servers |
| public_ipv4? | ?string | The public IPv4 address LiveKit gives to clients, or null to clear it |
| public_ipv6? | ?string | The public IPv6 address LiveKit gives to clients, or null to clear it |
1 Send both coordinates or neither, and send both as null to use the region’s coordinates
Response body
Заголовок раздела «Response body»| Field | Type | Description |
|---|---|---|
| server | Admin voice server object | The updated server |
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | response body | The server was updated |
| 404 | error response | UNKNOWN_VOICE_SERVER when no server matches |
| 409 | error response | VOICE_SERVER_API_KEY_IN_USE when another server uses the new key |
The rate limit is 100 requests per minute, on the admin:guild:modify bucket.
Delete voice server
Заголовок раздела «Delete voice server»/v1/admin/voice/regions/{region_id}/servers/{server_id}Deletes a server and its stored credentials. Sessions on it stay connected, but Squad can’t mute or disconnect them. You need voice:server:delete.
Response body
Заголовок раздела «Response body»| Field | Type | Description |
|---|---|---|
| success | boolean | Always true |
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | response body | The server was deleted |
| 404 | error response | UNKNOWN_VOICE_SERVER when no server matches |
The rate limit is 100 requests per minute, on the admin:guild:modify bucket.
Create voice server test token
Заголовок раздела «Create voice server test token»/v1/admin/voice/regions/{region_id}/servers/{server_id}/test-tokenSigns a LiveKit token for a hidden, audio-only participant in a throwaway room whose name starts with rexctl-test-. The token works for 60 seconds. rexctl voice test uses it to test a server from outside its network, and Squad ignores webhooks for these rooms. You need voice:server:update.
Response body
Заголовок раздела «Response body»| Field | Type | Description |
|---|---|---|
| token | string | The LiveKit token |
| endpoint | string | The server’s endpoint |
| room | string | The name of the throwaway room |
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | response body | The token was signed |
| 404 | error response | UNKNOWN_VOICE_SERVER when no server matches |
The rate limit is 100 requests per minute, on the admin:guild:modify bucket.
Voice join tokens
Заголовок раздела «Voice join tokens»A join token lets one machine register one voice server with Join a voice server.
| Property | Value |
|---|---|
| Format | fvj_, the token ID, an underscore and a 43 character secret |
| Stored | Only a hash of the secret |
| Uses | One |
| Lifetime | 60 seconds to 24 hours, 1 hour by default |
| Listed | Until 7 days after it expires |
Voice join token object
Заголовок раздела «Voice join token object»| Field | Type | Description |
|---|---|---|
| token_id | snowflake | The ID of the token |
| status | string | pending, used, expired or revoked |
| created_at | ISO8601 timestamp | When the token was created |
| expires_at | ISO8601 timestamp | When the token stops working |
| used_at | ?ISO8601 timestamp | When a server joined with it |
| used_server_id | ?string | The server that joined with it |
| revoked_at | ?ISO8601 timestamp | When it was revoked |
| region_id | ?string | The region preset, or null to let Squad pick |
| region_name | ?string | The name of the new region the join creates, or null |
| server_id | ?string | The server ID preset, or null |
| hostname | ?string | The hostname the endpoint must use, or null |
| notes | ?string | The notes for the new server, or null |
Create voice join token
Заголовок раздела «Create voice join token»/v1/admin/voice/join-tokensCreates a join token and the command to run on the voice machine. You need voice:join_token:create. Every preset wins over what the joining machine sends.
JSON body
Заголовок раздела «JSON body»| Field | Type | Description |
|---|---|---|
| region_id? | ?string | An existing region, or the ID of a new region with region_name (lowercase letters, digits and dashes, 1-64 characters) |
| region_name? | ?string | The name of a new region the join creates (1-100 characters) |
| region_emoji? | ?string | The emoji of the new region (1-64 characters) |
| region_latitude? | ?number | The latitude of the new region, with region_longitude (-90 to 90) |
| region_longitude? | ?number | The longitude of the new region, with region_latitude (-180 to 180) |
| server_id? | ?string | The server ID (lowercase letters, digits and dashes, 1-64 characters) |
| hostname? | ?string | The hostname the endpoint must use |
| internal_endpoint? | ?string | The URL the API uses for the control API and health checks of the new server |
| soft_connection_limit? | ?integer | The soft connection limit of the new server |
| notes? | ?string | The notes of the new server (max 2000 characters) |
| vip_only? | boolean | Restricts the new server to VIP_VOICE guilds (default false) |
| required_guild_features? | array[string] | Guild features that admit a guild to the new server (max 100) |
| allowed_guild_ids? | array[snowflake] | Guilds admitted to the new server (max 1000) |
| allowed_user_ids? | array[snowflake] | The only accounts allowed on the new server (max 1000) |
| expires_in_seconds? | integer | Seconds until the token stops working (60-86400, default 3600) |
A new region from region_name gets region_latitude and region_longitude. Without them, it gets the location of the server that joins.
Response body
Заголовок раздела «Response body»| Field | Type | Description |
|---|---|---|
| token_id | snowflake | The ID of the token |
| token | string | The token, which no other response returns |
| expires_at | ISO8601 timestamp | When the token stops working |
| command | string | The install command to run on the voice machine |
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | response body | The token was created |
| 400 | error response | region_latitude or region_longitude comes without the other, or without region_name |
| 404 | error response | UNKNOWN_VOICE_REGION when no region has the ID in region_id and region_name is empty |
The rate limit is 100 requests per minute, on the admin:guild:modify bucket.
List voice join tokens
Заголовок раздела «List voice join tokens»/v1/admin/voice/join-tokensLists the tokens of the last 7 days, newest first, without their secrets. You need voice:join_token:list.
Response body
Заголовок раздела «Response body»| Field | Type | Description |
|---|---|---|
| tokens | array[voice join token object] | The tokens |
The rate limit is on the admin:lookup bucket.
Revoke voice join token
Заголовок раздела «Revoke voice join token»/v1/admin/voice/join-tokens/{token_id}Stops a pending token from working. You need voice:join_token:revoke.
Response body
Заголовок раздела «Response body»| Field | Type | Description |
|---|---|---|
| success | boolean | Always true |
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | {"success": true} | The token was revoked |
| 401 | error response | VOICE_JOIN_TOKEN_INVALID when the token is unknown, used, expired or revoked |
TURN server object
Заголовок раздела «TURN server object»A TURN server from FLUXER_LIVEKIT_TURN_SERVERS on the instance. rexctl puts the list in the LiveKit configuration of a voice server, and it’s empty when the setting is.
Structure
Заголовок раздела «Structure»| Field | Type | Description |
|---|---|---|
| host | string | The hostname or IPv4 address of the TURN server |
| port | integer | The port of the TURN server |
| protocol | string | udp, tcp or tls |
| username? | string | A fixed TURN username |
| credential? | string | A fixed TURN password |
| secret? | string | The shared secret LiveKit signs short-lived credentials with |
| ttl? | integer | The lifetime of the signed credentials in seconds |
An entry has either username and credential or secret and ttl.
Preview a voice join
Заголовок раздела «Preview a voice join»/v1/voice/join/previewShows what a join would choose, without using the token. The voice machine sends it with Authorization: VoiceJoin followed by a join token.
JSON body
Заголовок раздела «JSON body»| Field | Type | Description |
|---|---|---|
| public_ipv4? | ?string | The public IPv4 address of the voice machine |
| public_ipv6? | ?string | The public IPv6 address of the voice machine |
| region_id? | string | An existing region the operator asked for |
| cpu_count? | integer | The CPU count of the voice machine (1-4096) |
| memory_bytes? | integer | The memory of the voice machine in bytes |
| rexctl_version? | string | The version of rexctl on the voice machine (max 64 characters) |
Squad looks up one address in GeoIP, the first of public_ipv4, public_ipv6 and the address the request comes from.
Response body
Заголовок раздела «Response body»| Field | Type | Description |
|---|---|---|
| server_id | string | The suggested server ID, or the token’s preset |
| server_id_pinned | boolean | Whether the token sets the server ID |
| region | join region object | The region the join would use |
| latitude | ?number | The latitude from GeoIP, rounded to 0.1 degrees |
| longitude | ?number | The longitude from GeoIP, rounded to 0.1 degrees |
| hostname | ?string | The token’s hostname preset, or null |
| suggested_hostname | string | A hostname under the instance’s domain |
| soft_connection_limit | ?integer | The token’s soft connection limit preset, or null |
| webhook_url | string | The URL the server sends LiveKit webhooks to |
| api_code_version | integer | The version of the API server code |
| release | string | The Squad release of the API, or empty for a development build |
| expires_at | ISO8601 timestamp | When the token stops working |
| turn_servers | array[TURN server object] | The instance’s TURN servers |
Join region object
Заголовок раздела «Join region object»| Field | Type | Description |
|---|---|---|
| id | string | The ID of the region |
| name | string | The name of the region |
| distance_km | ?number | The distance from the voice machine, or null without GeoIP data |
| new | boolean | Whether the join creates the region |
| source | string | token, requested, nearest or default |
Region choice
Заголовок раздела «Region choice»Squad takes the first region that applies, and source says which one it used.
- The token’s region, as
token. - An existing region in
region_id, asrequested. - The existing region nearest to the machine, as
nearest, when the instance has a GeoIP database. - The default region, as
default.
It never creates a region unless the token has a new one.
The rate limit is 10 requests per minute for each address, on the voice:join bucket.
Join a voice server
Заголовок раздела «Join a voice server»/v1/voice/joinRegisters the server and uses the token. The voice machine sends it with Authorization: VoiceJoin followed by a join token.
JSON body
Заголовок раздела «JSON body»| Field | Type | Description |
|---|---|---|
| endpoint | string | The public wss:// URL of the server (max 512 characters). A host that is an IP address must be IPv4. A server with only IPv6 needs a hostname |
| api_key | string | A LiveKit API key no other server uses (1-256 characters) |
| api_secret | string | Its secret (32-256 characters) |
| server_id? | string | The server ID, ignored when the token has one |
| region_id? | string | An existing region, ignored when the token has one |
| latitude?1 | number | The server’s latitude (-90 to 90) |
| longitude?1 | number | The server’s longitude (-180 to 180) |
| soft_connection_limit? | integer | Ignored when the token has one (1-2147483647) |
| public_ipv4? | string | The machine’s public IPv4 address, for GeoIP and the admin panel |
| public_ipv6? | string | The machine’s public IPv6 address, for GeoIP and the admin panel |
1 Send both coordinates or neither
- Squad resolves the endpoint’s host and refuses it when any address is private, unless
FLUXER_VOICE_JOIN_ALLOW_PRIVATE_ENDPOINTSis true. - It connects to the addresses it checked, one after another until one responds.
GETon the endpoint’s path must returnOKwithin 10 seconds, with a certificate Squad trusts.- The room service must accept the key and secret.
- Squad saves the server, active and not draining, and the token stops working.
Response body
Заголовок раздела «Response body»| Field | Type | Description |
|---|---|---|
| server_id | string | The ID of the new server |
| region_id | string | The region of the new server |
| endpoint | string | The endpoint of the new server |
| webhook_url | string | The URL the server sends LiveKit webhooks to |
| node_url | string | The URL of the voice node routes for this server |
| turn_servers | array[TURN server object] | The instance’s TURN servers |
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | response body | The server joined |
| 400 | error response | VOICE_JOIN_ENDPOINT_INVALID when the endpoint isn’t wss://, uses an IPv6 address, a private address or another hostname than the token’s |
| 400 | error response | VOICE_JOIN_ENDPOINT_UNREACHABLE when the endpoint didn’t return OK, with the status or error in detail |
| 400 | error response | VOICE_JOIN_KEY_MISMATCH when the server refused the key and secret |
| 401 | error response | VOICE_JOIN_TOKEN_INVALID when the token is unknown or has been used, has expired or was revoked |
| 404 | error response | UNKNOWN_VOICE_REGION when no region has the ID in region_id |
| 409 | error response | VOICE_JOIN_TOKEN_BUSY when another join with the token is running |
| 409 | error response | VOICE_SERVER_ID_IN_USE when another server has the ID |
| 409 | error response | VOICE_SERVER_API_KEY_IN_USE when another server uses the key |
A failed join leaves the token unused, and the same machine can try again.
The rate limit is 10 requests per minute for each address, on the voice:join bucket.
Voice node routes
Заголовок раздела «Voice node routes»A server that joined manages its own row with the node routes. Each request takes Authorization: Bearer followed by an HS256 JWT signed with the server’s API secret.
Token claims
Заголовок раздела «Token claims»| Claim | Value |
|---|---|
| iss | The server’s API key |
| aud | fluxer-voice-node |
| method | The method of the request |
| path | /voice/node |
| exp | A time in the future, at most 5 minutes ahead |
| iat? | When present, a time that isn’t in the future |
| sha256 | The base64 SHA-256 of the body, or an empty string for GET and DELETE |
Squad allows 60 seconds of clock difference either way. It refuses tokens with a video grant, and LiveKit participant tokens and webhooks signed with the same secret don’t work here.
| Status | Body | Condition |
|---|---|---|
| 401 | error response | VOICE_NODE_UNKNOWN when no server has the key in iss, usually because an admin deleted it |
| 401 | error response | VOICE_NODE_SIGNATURE_INVALID when the signature or a claim is wrong, or an admin changed the server’s secret |
| 401 | error response | VOICE_NODE_TOKEN_EXPIRED when the signature matches, and exp or iat is outside the allowed time. The clock of the voice machine is usually off |
The rate limit is 60 requests per minute, on the voice:node bucket.
Get voice node
Заголовок раздела «Get voice node»/v1/voice/nodeReturns the server that signed the request.
Response body
Заголовок раздела «Response body»| Field | Type | Description |
|---|---|---|
| region_id | string | The region of the server |
| server_id | string | The ID of the server |
| endpoint | string | The endpoint of the server |
| latitude | ?number | The server’s latitude |
| longitude | ?number | The server’s longitude |
| is_active | boolean | Whether an admin keeps the server turned on |
| draining | boolean | Whether placement sends new calls elsewhere |
| soft_connection_limit | ?integer | The soft connection limit, or null |
| public_ipv4 | ?string | The public IPv4 address the server last reported, or null |
| public_ipv6 | ?string | The public IPv6 address the server last reported, or null |
| turn_servers | array[TURN server object] | The instance’s TURN servers |
| features1 | array[string] | What the API supports for voice servers |
| health | health object | The server’s health as the API node that handled the request last saw it |
1 server_addresses means Update voice node takes public_ipv4 and public_ipv6
Update voice node
Заголовок раздела «Update voice node»/v1/voice/nodeChanges the server that signed the request and returns it like Get voice node.
JSON body
Заголовок раздела «JSON body»| Field | Type | Description |
|---|---|---|
| endpoint? | string | A new public wss:// endpoint (max 512 characters) |
| draining? | boolean | Whether placement sends new calls elsewhere |
| latitude?1 | ?number | The server’s latitude (-90 to 90) |
| longitude?1 | ?number | The server’s longitude (-180 to 180) |
| soft_connection_limit? | ?integer | The soft connection limit (1-2147483647) |
| public_ipv4? | string | The public IPv4 address, or an empty string to clear it |
| public_ipv6? | string | The public IPv6 address, or an empty string to clear it |
1 Send both coordinates or neither
Endpoint changes
Заголовок раздела «Endpoint changes»- Squad checks a new endpoint the same way as a join.
- When the server has an internal endpoint, Squad also tries the new public endpoint and logs a warning when it doesn’t respond, without refusing the change.
- A new endpoint must keep the token’s hostname.
What a server can’t change
Заголовок раздела «What a server can’t change»- A soft connection limit the token set.
- Its region, its restrictions,
internal_endpointoris_active. A server an admin turned off stays off.
Delete voice node
Заголовок раздела «Delete voice node»/v1/voice/nodeRemoves the server that signed the request and returns 204.