Skip to main content
POST
Initialize Chat Media Upload

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

FlowAuthorization Code
Authorization URL
https://api.x.com/2/oauth2/authorize
Token URL
https://api.x.com/2/oauth2/token
Scopes1
media.write
Upload media, such as photos and videos, on your behalf.

Body

application/json

Request body for initializing a Chat media upload.

conversation_id
string

XChat conversation identifier for the upload.

Example:

"1603419216513746946:1603419216513746946"

total_bytes
integer

Total size of the media upload in bytes.

Required range: x >= 0

Response

The request has succeeded.

Response from initializing a Chat media upload.

data
object