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.
| 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 |
| Field | Type | Description |
|---|
| enabled | boolean | Always true |
Threads, forum channels and media channels also need the channel_threads client capability.
| Field | Type | Description |
|---|
| active | boolean | Always true |
| config_version | integer | The instance’s threads configuration version, the same for every account |
| 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.
| 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.
GET/v1/experimentsBot
Returns an experiment assignments object for the caller.
| Field | Type | Description |
|---|
| If-None-Match? | string | The ETag from your last response |
Experiment assignments object.
| 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.
| Field | Type | Description |
|---|
| ETag | string | A tag for the response body, sent on 200 and 304 |
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.