POST
/
2
/
media
/
metadata
/
create
curl --request POST \
  --url https://api.x.com/2/media/metadata/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "allow_download_status": {
    "allow_download": "true"
  },
  "alt_text": {
    "text": "dancing cat"
  },
  "found_media_origin": {
    "id": "<string>",
    "provider": "giphy"
  },
  "media_id": "1146654567674912769",
  "sticker_info": {
    "stickers": [
      {
        "aspect_ratio": 123,
        "group_annotation_id": 123,
        "id": "<string>",
        "sticker_set_annotation_id": 123,
        "transform_a": 123,
        "transform_b": 123,
        "transform_c": 123,
        "transform_d": 123,
        "transform_tx": 123,
        "transform_ty": 123
      }
    ]
  },
  "upload_source": {
    "text": "<string>"
  }
}'
{
  "data": {
    "associated_metadata": {
      "allow_download_status": {
        "allow_download": "true"
      },
      "alt_text": {
        "text": "dancing cat"
      },
      "found_media_origin": {
        "id": "<string>",
        "provider": "giphy"
      },
      "sticker_info": {
        "stickers": [
          {
            "aspect_ratio": 123,
            "group_annotation_id": 123,
            "id": "<string>",
            "sticker_set_annotation_id": 123,
            "transform_a": 123,
            "transform_b": 123,
            "transform_c": 123,
            "transform_d": 123,
            "transform_tx": 123,
            "transform_ty": 123
          }
        ]
      },
      "upload_source": {
        "text": "<string>"
      }
    },
    "id": "1146654567674912769"
  },
  "errors": [
    {
      "detail": "<string>",
      "status": 123,
      "title": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json
media_id
string
required

The unique identifier of this Media.

allow_download_status
object
alt_text
object
found_media_origin
object
sticker_info
object
upload_source
object

Response

200
application/json
The request has succeeded.
data
object
errors
object[]