Skip to content
Fluxer API

Calls

A call is the live voice session of a direct message or group direct message. You join and leave one by sending Voice State Update, and Call Create, Call Update and Call Delete publish its state.

Every route here is user-only and needs a direct message or group direct message that includes you as a recipient. A channel you can't see returns 404 UNKNOWN_CHANNEL, and a channel of another type returns 400 INVALID_CHANNEL_TYPE_FOR_CALL.

Says whether you can ring the other recipients of a channel.

FieldTypeDescription
ringable1booleanWhether you can start an audible ring in this channel
silent2booleanWhether a new call notifies the other recipient without ringing

1 False when you're already connected to the call, when your account tier can't make this kind of call, or when the other recipient's incoming call flags exclude you.

2 Always false in a group direct message and whenever ringable is false.

{
"ringable": true,
"silent": false
}
GET/v1/channels/{channel_id}/call

Returns a call eligibility object. In a direct message, the result follows the other recipient's incoming call flags.

StatusBodyCondition
200call eligibility objectEligibility was returned

The rate limit is 60 requests per 10 seconds, on the channel:call:get::channel_id bucket.

PATCH/v1/channels/{channel_id}/call

Changes the RTC region of an active call, even if you aren't connected to it. Setting region on a peer-to-peer call moves it to a voice server for the rest of the call. Sends Call Update when the region changes, and a new Voice Server Update to each connected participant.

FieldTypeDescription
region?1?stringThe ID of the RTC region to select (1-64 characters)
latitude?stringNot used, but must be 1-32 characters when sent
longitude?stringNot used, but must be 1-32 characters when sent

1 Null or automatic selects automatic routing. Leave it out to change nothing.

StatusBodyCondition
204emptyThe region was updated, or no change was requested
400error responseINVALID_FORM_BODY with INVALID_OR_RESTRICTED_RTC_REGION when the region is unknown or restricted
404error responseNO_ACTIVE_CALL when the channel has no call

The rate limit is 10 requests per 10 seconds, on the channel:call:update::channel_id bucket.

POST/v1/channels/{channel_id}/call/ring

Starts a call, or adds recipients to the ringing set of an active call. Fluxer rings a recipient only when Get call eligibility would return ringable true and silent false for them, and it skips the others without an error. In a direct message you can ring only the other recipient.

A new call sends Call Create and Message Create for its call message. Ringing into an active call sends Call Update. Anyone whose channel was closed gets Channel Create.

FieldTypeDescription
recipients?1array[snowflake]The IDs of the recipients to ring
latitude?stringNot used, but must be 1-32 characters when sent
longitude?stringNot used, but must be 1-32 characters when sent

1 Omit it to ring every other recipient. An empty array starts the call and rings nobody.

StatusBodyCondition
204emptyThe ring request was accepted
400error responseINVALID_FORM_BODY with USER_NOT_IN_CHANNEL when a recipient isn't in the channel or is you
400error responseCANNOT_SEND_MESSAGES_TO_USER when you can't message the other recipient
400error responseCALL_ALREADY_EXISTS when another request started the call at the same time
403error responseNEW_CONVERSATIONS_LIMITED under the new conversation limit
403error responseUNCLAIMED_ACCOUNT_CANNOT_SEND_DIRECT_MESSAGES or DIRECT_MESSAGE_EMAIL_VERIFICATION_REQUIRED when your account tier can't send direct messages

Each recipient rings for 30 seconds, and a call nobody joins ends when the ringing stops, with Call Delete.

The rate limit is 5 requests per 10 seconds, on the channel:call:ring::channel_id bucket.

POST/v1/channels/{channel_id}/call/stop-ringing

Removes recipients from the ringing set of an active call. Sends Call Update when the set changes.

FieldTypeDescription
recipients?1array[snowflake]The IDs of the recipients to stop ringing
latitude?stringNot used, but must be 1-32 characters when sent
longitude?stringNot used, but must be 1-32 characters when sent

1 Omit it to stop ringing yourself, which declines an incoming call.

StatusBodyCondition
204emptyThe ringing set was updated
404error responseNO_ACTIVE_CALL when the channel has no call

The rate limit is 20 requests per 10 seconds, on the channel:call:stop_ringing::channel_id bucket.

POST/v1/channels/{channel_id}/call/end

Does nothing and returns 204 for any channel ID. A call ends when its last participant leaves, and you leave by sending Voice State Update with a null channel.

StatusBodyCondition
204emptyThe request was accepted

The rate limit is 10 requests per 10 seconds, on the channel:call:update::channel_id bucket.