Skip to main content
POST
Create Media metadata

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
id
string
required

The media id the metadata is attached to.

Pattern: ^[0-9]{1,19}$
metadata
object

User-defined metadata to associate with the media.

Response

The request has succeeded.

data
object
errors
object[]