Experiments
An experiment is an instance-wide rollout that decides whether an account gets a feature. One request returns every experiment for the caller, along with how often to poll for changes. Ignore experiments you don’t know and treat a missing one as off.
Experiment assignments object
Section titled “Experiment assignments object”Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| poll_interval_seconds | integer | Seconds to wait before the next poll (60-86400) |
| poll_jitter_percent | integer | The largest random offset to the wait, as a percentage of it (0-50) |
| assignments | assignment map object | One entry per experiment |
Assignment map object
Section titled “Assignment map object”Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| pro_page? | Pro page assignment object | The caller’s Pro page assignment |
| channel_threads? | channel threads assignment object | The caller’s channel threads assignment |
| voice_p2p? | peer-to-peer voice assignment object | The caller’s peer-to-peer voice assignment |
| guild_visits? | guild visits assignment object | The caller’s guild visits assignment |
| voice_room? | voice room assignment object | Which 3D voice room features are on for the caller |
Pro page assignment object
Section titled “Pro page assignment object”Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| enabled | boolean | Always true |
Channel threads assignment object
Section titled “Channel threads assignment object”Threads, forum channels and media channels also need the channel_threads client capability.
Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| active | boolean | Always true |
| config_version | integer | The instance’s threads configuration version, the same for every account |
Peer-to-peer voice assignment object
Section titled “Peer-to-peer voice assignment object”Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| enabled | boolean | Whether the caller can start a peer-to-peer voice call |
| max_participants | integer | The most participants a peer-to-peer call allows (2-4) |
The instance admin sets the rollout in the peer-to-peer voice configuration. If it lists rollout countries, the sampled share of accounts only includes requests from those countries, based on the request’s IP address, so the same account can get a different answer on another network. A join to a peer-to-peer call that already has max_participants people is refused as full.
Guild visits assignment object
Section titled “Guild visits assignment object”Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| enabled | boolean | Whether the caller can visit a guild before joining it |
The instance admin sets the rollout in the guild visits configuration.
Voice room assignment object
Section titled “Voice room assignment object”The instance voice room switches as they reach the caller. The rollout reaches a caller on the always-on list or in the sampled share of accounts, and never one on the never-on list. A caller the rollout doesn’t reach gets every switch off. Every switch is off until the instance admin turns it on.
Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| rooms | boolean | Whether a voice channel with a room theme opens as a 3D room |
| games | boolean | Whether table games can be played, never true while rooms is false |
| cameras?1 | boolean | Whether the 3D room shows cameras on avatars, never true while rooms is false |
| avatars?1 | boolean | Whether people show as 3D characters in the room, never true while rooms is false |
| walk?1 | boolean | Whether characters can walk around the room, never true while avatars is false |
| watch?1 | boolean | Whether people can play a shared YouTube video on the room TV, never true while rooms is false |
| stage?1 | boolean | Whether the room shows the stage bots run, never true while rooms is false |
| fights?1 | boolean | Whether room tournaments and arm wrestling run, never true while rooms is false. Arm wrestling also needs games |
| watch_since? | integer | Server time in milliseconds when room TV videos last came on. A video written before it is stale, and when it is absent none is |
| default_room_theme?1 | ?string | The room theme of voice channels that have none of their own, null for no default |
1 Read a missing field as false, or null for default_room_theme, as from an older server.
Get experiment assignments
Section titled “Get experiment assignments”GET/v1/experimentsReturns an experiment assignments object for the caller.
Request headers
Section titled “Request headers”| Field | Type | Description |
|---|---|---|
| If-None-Match? | string | The ETag from your last response |
Response body
Section titled “Response body”Experiment assignments object.
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | response body | The assignments were returned |
| 304 | empty | If-None-Match matched the current ETag |
The rate limit is 60 requests per 10 seconds, on the default bucket.
Response headers
Section titled “Response headers”| Field | Type | Description |
|---|---|---|
| ETag | string | A tag for the response body, sent on 200 and 304 |
Polling
Section titled “Polling”Call this route when a session starts and again every poll_interval_seconds, with a random offset of up to poll_jitter_percent either way. Send the last ETag in If-None-Match, and keep your current assignments when you get a 304. Until you get a 200, use 300 seconds with 15 percent jitter.