Documentation Index
Fetch the complete documentation index at: https://x-preview-mintlify-17c4c782.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
API Reference
Account Media
GET accounts/:account_id/account_media
Retrieve details for some or all account media associated with the current account. Resource URLhttps://ads-api.x.com/12/accounts/:account_id/account_media
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
Scope the response to just the desired account media by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided.
Specifies the number of records to try and retrieve per distinct request.
Min: 1, Max: 1000
Min: 1, Max: 1000
Scope the response to just the account media that match the specified creative types. More than one creative type may be specified by comma-separating enum values.
Possible values:
Possible values:
BANNER, BANNER_TABLET, INTERSTITIAL, INTERSTITIAL_LANDSCAPE, INTERSTITIAL_LANDSCAPE_TABLET, INTERSTITIAL_TABLET, MEDIUM_RECTANGLE, PREROLL, VAST_PREROLLSpecifies a cursor to get the next page of results. See Pagination for more information.
Sorts by supported attribute in ascending or descending order. See Sorting for more information.
Include deleted results in your request.
Include the
Note: This parameter and
total_count response attribute.Note: This parameter and
cursor are exclusive. Requests which include total_count will have lower rate limits (currently 200 per 15 minutes).GET https://ads-api.x.com/12/accounts/18ce54d4x5t/account_media?account_media_ids=3wpx
Example Response
https://ads-api.x.com/12/accounts/:account_id/account_media/:account_media_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the account media you are operating with in the request.
Include deleted results in your request.
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/account_media/2pnfd
Example Response
https://ads-api.x.com/12/accounts/:account_id/account_media/:account_media_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the account media you are operating with in the request.
DELETE https://ads-api.x.com/12/accounts/18ce54d4x5t/account_media/2pnfd
Example Response
Cards
Note: To associate a card with a Tweet, use thecard_uri parameter with either the POST accounts/:account_id/tweet, POST statuses/update, POST accounts/:account_id/scheduled_tweets, or the POST accounts/:account_id/draft_tweets endpoints.
Retrieve details for some or all cards associated with the current account.
Note: This only returns cards that were created using the POST accounts/:account_id/cards endpoint. Cards created using other endpoints are not returned.
Resource URL
https://ads-api.x.com/12/accounts/:account_id/cards
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
Scope the response to just the desired card types by specifying a comma-separated list of enum values.
Possible values:
Possible values:
IMAGE_APP, IMAGE_CAROUSEL_APP, IMAGE_CAROUSEL_WEBSITE, IMAGE_MULTI_DEST_CAROUSEL_WEBSITE, IMAGE_WEBSITE, MIXED_MEDIA_MULTI_DEST_CAROUSEL_WEBSITE, MIXED_MEDIA_SINGLE_DEST_CAROUSEL_APP, MIXED_MEDIA_SINGLE_DEST_CAROUSEL_WEBSITE, VIDEO_APP, VIDEO_CAROUSEL_APP, VIDEO_CAROUSEL_WEBSITE, VIDEO_MULTI_DEST_CAROUSEL_WEBSITE, VIDEO_WEBSITEScope the response to just the desired cards by specifying a comma-separated list of identifiers. Up to 200 card IDs may be provided.
Scope the response to just the desired cards by specifying a comma-separated list of identifiers. Up to 200 card URI values may be provided.
Specifies the number of records to try and retrieve per distinct request.
Min: 1, Max: 200
Min: 1, Max: 200
Specifies a cursor to get the next page of results. See Pagination for more information.
Include legacy website and app cards in the response. Legacy cards are those whose resource URL has the following format: accounts/:account_id/cards/:card_type.
An optional query to scope cards by
Note: This performs case-insensitive prefix matching.
name. Omit this parameter to retrieve all. Maximum length: 80 characters.Note: This performs case-insensitive prefix matching.
Sorts by supported attribute in ascending or descending order. See Sorting for more information.
Include deleted results in your request.
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/cards?count=1
Example Response
https://ads-api.x.com/12/accounts/:account_id/cards/:card_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
The id of the cards.
Include deleted results in your request.
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/cards/1321554298900107264
Example Response
POST accounts/:account_id/cards
Create a new card associated to the specified account. Card create requests only accept JSON POST bodies. TheContent-Type must be set to application/json.
See our Carousels Guide for a detailed usage example.
Resource URL
https://ads-api.x.com/12/accounts/:account_id/cards
Parameters
The JSON POST body must include a card name and an array of components. Components are represented as objects and describe the advertiser-facing attributes of the card.
The following example shows the general structure of the payload (but includes non-working information).
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
The name for the card. Maximum length: 80 characters.
Describes the components to use to create the card. Additional information below. Cannot be specified along with
Note: The order of the components is important.
slides.Note: The order of the components is important.
Use this array of array to create Multi-Destination Carousels. Describes each card as a grouping of components. Each slide should be a complete representation of a card. Cannot be specified along with
Note: The order of each slide is important.
components.Note: The order of each slide is important.
Components
Every component must include atype field which determines the object’s schema. The Ads API supports the following component types, grouped into media- and description-based components.
- Media:
MEDIA: single video or imageSWIPEABLE_MEDIA: between 2-6 videos or images- Description:
DETAILSBUTTON
type key). These are listed in the following table.
Component type | Field | Value type |
|---|---|---|
MEDIA | media_key | string |
SWIPEABLE_MEDIA | media_keys | array of strings |
DETAILS | title destination | string object |
BUTTON | label destination | object object |
BUTTON component in the context of the components array (intentionally omitting the name key). (The ellipses indicate places where more information would need to be specified.)
DETAILS or BUTTON component. Description-based components are rendered under media and have associated destinations, either URLs or mobile apps.
Label
Labels define the text shown on buttons and, therefore, only apply to the BUTTON component. Label objects have two required keys: type and value. The type must be set to ENUM and the value can be one of: BOOK, CONNECT, INSTALL, OPEN, ORDER, PLAY, or SHOP.
Building on the previous example, the following shows the label object within the BUTTON component.
DETAILS or BUTTON components. There are two destination types: WEBSITE or APP.
Note: Website destinations can only be used with DETAILS components and app destinations can only be used with BUTTON components.
Website Destination
The destination type, which determines its schema.
Possible values:
Possible values:
WEBSITEhttps://devcommunity.x.com/c/advertiser-api |
App Destination
| Name | Description |
|---|---|
| type required | The destination type, which determines its schema. Type: enum Possible values: APP |
| country_code required | The ISO 3166-1 alpha-2 two-letter code for the country where the app is sold. Type: string Example: US |
| googleplay_app_id sometimes required | The Google Play application package name. Note: At least one of following is required: ios_app_store_identifier or googleplay_app_id. Type: string Example: com.twitter.android |
The iOS app store identifier.
Note: At least one of following is required:
Note: At least one of following is required:
ios_app_store_identifier or googleplay_app_id.A deep link into the Android app you’re promoting.
Note: Can only be used if an
Note: Can only be used if an
googleplay_app_id has been provided.A deep link into the iOS app you’re promoting.
Note: Can only be used if an
Note: Can only be used if an
ios_app_store_identifier has been provided.POST https://ads-api.x.com/12/accounts/18ce54d4x5t/cards
Content-Type must be set to application/json.
Resource URL
https://ads-api.x.com/12/accounts/:account_id/cards/1321554298900107264
Parameters
The JSON POST body must include the parameters that will be updated. The request will replace each field with the parameters specified within the payload. Components are represented as objects and describe the advertiser-facing attributes of the card.
The following example shows the general structure of the payload (but includes non-working information).
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
The name for the card. Maximum length: 80 characters.
Describes the components to use to update the card. Additional information below. Cannot be specified along with
Note: The order of the components is important.
slides.Note: The order of the components is important.
Use this array of array to update Multi-Destination Carousels. Describes each card as a grouping of components. Each slide should be a complete representation of a card. Cannot be specified along with
Note: The order of each slide is important.
components.Note: The order of each slide is important.
PUT https://ads-api.x.com/12/accounts/18ce54d4x5t/cards/1321554298900107264
https://ads-api.x.com/12/accounts/:account_id/cards/:card_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
The id of the card to be deleted.
DELETE https://ads-api.x.com/12/accounts/18ce54d4x5t/cards/1321554298900107264
Example Response
Cards Fetch
Retrieve multiple cards, bycard_uri, associated with the current account.
Resource URL
https://ads-api.x.com/12/accounts/:account_id/cards/all
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
Scope the response to just the desired cards by specifying a comma-separated list of identifiers. Up to 200 card URI values may be provided.
Include deleted results in your request.
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/cards/all?card_uris=card://1044294149527166979,card://1044301099031658496
Example Response
card_id, associated with the current account.
Resource URL
https://ads-api.x.com/12/accounts/:account_id/cards/all/:card_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the card you are operating with in the request.
Include deleted results in your request.
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/cards/all/508pf
Example Response
Draft Tweets
GET accounts/:account_id/draft_tweets
Retrieve details for some or all Draft Tweets associated with the current account. Resource URLhttps://ads-api.x.com/12/accounts/:account_id/draft_tweets
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
Specifies the number of records to try and retrieve per distinct request.
Min: 1, Max: 200
Min: 1, Max: 200
Specifies a cursor to get the next page of results. See Pagination for more information.
Specify the user to retrieve Draft Tweets for. Defaults to the
FULL promotable user on the account when not set.GET https://ads-api.x.com/12/accounts/18ce54d4x5t/draft_tweets?count=1
Example Response
https://ads-api.x.com/12/accounts/:account_id/draft_tweets/:draft_tweet_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the Draft Tweet you are operating with in the request.
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/draft_tweets/994788364334325760
Example Response
POST accounts/:account_id/draft_tweets
Create a Draft Tweet for the account’s full promotable user (default) or the user specified in theas_user_id parameter.
Resource URL
https://ads-api.x.com/12/accounts/:account_id/draft_tweets
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
The user ID of the advertiser on behalf of whom you are posting the Tweet. The advertiser must grant your handle (or handles) access to their ads account via ads.x.com. This permission allows you to call the API using the OAuth tokens of your own handle rather than the advertiser’s.
The text of your status update. Required if no
media_keys are specified.Associate a card with the Tweet using the
card_uri value from any cards response, if available.Associate media with the Tweet by specifying a comma-separated list of identifiers. Include up to 4 images, 1 animated GIF, or 1 video.
Note: The media asset must be in the account’s Media Library.
Note: The media asset must be in the account’s Media Library.
Whether to create a nullcasted (or “Promoted-only”) Tweet.
The name for the Draft Tweet. Maximum length: 80 characters.
POST https://ads-api.x.com/12/accounts/18ce54d4x5t/draft_tweets?as_user_id=756201191646691328&text=Just setting up my X.
Example Response
https://ads-api.x.com/12/accounts/:account_id/draft_tweets/:draft_tweet_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the Draft Tweet you are operating with in the request.
Associate a card with the Tweet using the
Note: Unset (remove) by specifying the parameter without a value.
card_uri value from any cards response, if available.Note: Unset (remove) by specifying the parameter without a value.
Associate media with the Tweet by specifying a comma-separated list of identifiers. Include up to 4 images, 1 animated GIF, or 1 video.
Note: The media asset must be in the account’s Media Library.
Note: Unset (remove) by specifying the parameter without a value.
Note: The media asset must be in the account’s Media Library.
Note: Unset (remove) by specifying the parameter without a value.
Whether to create a nullcasted (or “Promoted-only”) Tweet.
The text of your status update.
The name for the Draft Tweet. Maximum length: 80 characters.
PUT https://ads-api.x.com/12/accounts/18ce54d4x5t/draft_tweets/994747471329873920?text=just setting up my twttr
Example Response
https://ads-api.x.com/12/accounts/:account_id/draft_tweets/:draft_tweet_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the Draft Tweet you are operating with in the request.
DELETE https://ads-api.x.com/12/accounts/18ce54d4x5t/draft_tweets/994787835663155200
Example Response
POST accounts/:account_id/draft_tweets/preview/:draft_tweet_id
Preview a Draft Tweet on a mobile device. A successful request sends a notification to every device the authenticated user is logged in to. Clicking on the notification opens a timeline that allows the user to see and interact with the Draft Tweet, enabling them to test auto-play, volume, fullscreen, video website card docking, and other behaviors. Note: On-device previews are only visible to the user who receives the notification. Note: Notifications only get sent to X official apps. Resource URLhttps://ads-api.x.com/12/accounts/:account_id/draft_tweets/preview/:draft_tweet_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the Draft Tweet you are operating with in the request.
POST https://ads-api.x.com/12/accounts/18ce54d4x5t/draft_tweets/preview/996132315829948416
Example Response
Image Conversation Cards
Note: To associate a card with a Tweet, use thecard_uri parameter with either the POST accounts/:account_id/tweet, POST statuses/update, or POST accounts/:account_id/scheduled_tweets endpoints.
GET accounts/:account_id/cards/image_conversation
Retrieve details for some or all image conversation cards associated with the current account. Resource URLhttps://ads-api.x.com/12/accounts/:account_id/cards/image_conversation
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
Scope the response to just the desired image conversation cards by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided.
Specifies the number of records to try and retrieve per distinct request.
Min: 1, Max: 1000
Min: 1, Max: 1000
Specifies a cursor to get the next page of results. See Pagination for more information.
An optional query to scope cards by
Note: This performs case-insensitive prefix matching.
name. Omit this parameter to retrieve all. Maximum length: 80 characters.Note: This performs case-insensitive prefix matching.
Sorts by supported attribute in ascending or descending order. See Sorting for more information.
Include deleted results in your request.
Include the
Note: This parameter and
total_count response attribute.Note: This parameter and
cursor are exclusive. Requests which include total_count will have lower rate limits (currently 200 per 15 minutes).GET https://ads-api.x.com/12/accounts/18ce54d4x5t/cards/image_conversation?card_ids=59woh
Example Response
https://ads-api.x.com/12/accounts/:account_id/cards/image_conversation/:card_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the image conversation card you are operating with in the request.
Include deleted results in your request.
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/cards/image_conversation/59woh
Example Response
POST accounts/:account_id/cards/image_conversation
Create a new image conversation card associated with the specified account. See Uploading Media for useful information on uploading images to our endpoints. Resource URLhttps://ads-api.x.com/12/accounts/:account_id/cards/image_conversation
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
The Call-To-Action (CTA) hashtag for the first option. Maximum length: 20 characters (not counting the #).
The Tweet text to be used when the first CTA is clicked.
The media key for an image to be used in this card.
Note: The image must be in the account’s Media Library.
Note: A minimum image width of 800px and a width:height aspect ratio of 1.91:1 is required.
Note: The image must be in the account’s Media Library.
Note: A minimum image width of 800px and a width:height aspect ratio of 1.91:1 is required.
The name for the card.
The text to be displayed after the CTA is clicked. Maximum length: 23 characters.
The Call-To-Action (CTA) hashtag for the second option. Maximum length: 20 characters (not counting the #).
Note: Required if
Note: Required if
title is not set.The Tweet text to be used when the second CTA is clicked.
Note: Required if
Note: Required if
second_cta is set.The title for the card, which appears below the image and above the CTAs. Maximum length: 23 characters.
Note: Required if
Note: Required if
second_cta is not set.The Call-To-Action (CTA) hashtag for the third option. Maximum length: 20 characters (not counting the #).
The Tweet text to be used when the third CTA is clicked.
Note: Required if
Note: Required if
third_cta is set.The Call-To-Action (CTA) hashtag for the fourth option. Maximum length: 20 characters (not counting the #).
The Tweet text to be used when the fourth CTA is clicked.
Note: Required if
Note: Required if
fourth_cta is set.A
Note: The image must be in the account’s media library.
Note: A minimum image width of 800px and a width:height aspect ratio of 5:2 is required.
media_key of an image which will be used in the instant unlock scenario. This is a write-only field. In the response, the API will provide a X URL for this image.Note: The image must be in the account’s media library.
Note: A minimum image width of 800px and a width:height aspect ratio of 5:2 is required.
The URL to be displayed with the thank you text.
POST https://ads-api.x.com/12/accounts/18ce54d4x5t/cards/image_conversation?media_key=3_957113581522141184&name=image conversation card&first_cta=#moon&first_cta_tweet=stars&thank_you_text=thanks&title=Full moon
Example Response
https://ads-api.x.com/12/accounts/:account_id/cards/image_conversation/:card_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the image conversation card you are operating with in the request.
The Call-To-Action (CTA) hashtag for the first option. Maximum length: 20 characters (not counting the #).
The Tweet text to be used when the first CTA is clicked.
The Call-To-Action (CTA) hashtag for the second option. Maximum length: 20 characters (not counting the #).
Note: Required if
Note: Required if
title is not set.The Tweet text to be used when the second CTA is clicked.
Note: Required if
Note: Required if
second_cta is set.The Call-To-Action (CTA) hashtag for the third option. Maximum length: 20 characters (not counting the #).
The Tweet text to be used when the third CTA is clicked.
Note: Required if
Note: Required if
third_cta is set.The Call-To-Action (CTA) hashtag for the fourth option. Maximum length: 20 characters (not counting the #).
The Tweet text to be used when the fourth CTA is clicked.
Note: Required if
Note: Required if
fourth_cta is set.The media key for an image to be used in this card.
Note: The image must be in the account’s Media Library.
Note: A minimum image width of 800px and a width:height aspect ratio of 1.91:1 is required.
Note: The image must be in the account’s Media Library.
Note: A minimum image width of 800px and a width:height aspect ratio of 1.91:1 is required.
The name for the card.
The text to be displayed after the CTA is clicked. Maximum length: 23 characters.
The URL to be displayed with the thank you text.
The title for the card, which appears below the image and above the CTAs. Maximum length: 23 characters.
Note: Required if
Note: Required if
second_cta is not set.A
Note: The image must be in the account’s media library.
Note: A minimum image width of 800px and a width:height aspect ratio of 5:2 is required.
media_key of an image which will be used in the instant unlock scenario. This is a write-only field. In the response, the API will provide a X URL for this image.Note: The image must be in the account’s media library.
Note: A minimum image width of 800px and a width:height aspect ratio of 5:2 is required.
PUT https://ads-api.x.com/12/accounts/18ce54d4x5t/cards/image_conversation/59woh?name=moon card
Example Response
https://ads-api.x.com/12/accounts/:account_id/cards/image_conversation/:card_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the image conversation card you are operating with in the request.
DELETE https://ads-api.x.com/12/accounts/18ce54d4x5t/cards/image_conversation/4i0qe
Example Response
Media Library
GET accounts/:account_id/media_library
Retrieve details for some or all media library objects associated with the current account. Resource URLhttps://ads-api.x.com/12/accounts/:account_id/media_library
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
Specifies the number of records to try and retrieve per distinct request.
Min: 1, Max: 50
Min: 1, Max: 50
Specifies a cursor to get the next page of results. See Pagination for more information.
Scope the response to just the desired media type.
Possible values:
Possible values:
GIF, IMAGE, VIDEOAn optional query to scope resource by
Note: This performs case-insensitive term matching.
Min, Max length:
name, title, file_name, and description fields.Note: This performs case-insensitive term matching.
Min, Max length:
1, 255GET https://ads-api.x.com/12/accounts/18ce54d4x5t/media_library?count=1
Example Response
https://ads-api.x.com/12/accounts/:account_id/media_library/:media_key
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the media library object you are operating with in the request.
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/media_library/13_909110614026444802
Example Response
AMPLIFY_VIDEO media category to the Media Library, it is automatically available as a PREROLL account_media asset.
Resource URL
https://ads-api.x.com/12/accounts/:account_id/media_library
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
The
media_key for the uploaded content. A media_key is returned in the POST media/upload response when a media_category is specified.The description that appears under the video when Tweeted. Maximum length: 200 characters.
This is not rendered in the Tweet by default. To display the video’s
Note: Can only be used with videos.
This is not rendered in the Tweet by default. To display the video’s
description, use the video_description parameter with the POST accounts/:account_id/tweet endpoint.Note: Can only be used with videos.
The file name for the media library object. Maximum length: 255.
The file name can be seen in the media detail of every media asset in the Media Library UI on ads.x.com. This will be empty when the
The file name can be seen in the media detail of every media asset in the Media Library UI on ads.x.com. This will be empty when the
file_name is not set.The name for the media library object. Maximum length: 100.
This is the label under every media asset in the Media Library UI on ads.x.com. The label will be “Untitled” when the
This is the label under every media asset in the Media Library UI on ads.x.com. The label will be “Untitled” when the
name is not set.Specify a poster image for the video using the
Note: Can only be used with videos.
media_key of an uploaded image. If not specified, the first frame will be used.Note: Can only be used with videos.
The title (headline) that appears under the video when Tweeted. Maximum length: 70 characters.
This is not rendered in the Tweet by default. To display the video’s
Note: Can only be used with videos.
This is not rendered in the Tweet by default. To display the video’s
title, use the video_title parameter with the POST accounts/:account_id/tweet endpoint.Note: Can only be used with videos.
POST https://ads-api.x.com/12/accounts/18ce54d4x5t/media_library?media_key=3_931236738554519552
Example Response
https://ads-api.x.com/12/accounts/:account_id/media_library/:media_key
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the media library object you are operating with in the request.
The description that appears under the video when Tweeted. Maximum length: 200 characters.
This is not rendered in the Tweet by default. To display the video’s
Note: Can only be used with videos.
This is not rendered in the Tweet by default. To display the video’s
description, use the video_description parameter with the POST accounts/:account_id/tweet endpoint.Note: Can only be used with videos.
The file name for the media library object. Maximum length: 255.
The file name can be seen in the media detail of every media asset in the Media Library UI on ads.x.com. This will be empty when the
The file name can be seen in the media detail of every media asset in the Media Library UI on ads.x.com. This will be empty when the
file_name is not set.The name for the media library object. Maximum length: 100.
This is the label under every media asset in the Media Library UI on ads.x.com. The label will be “Untitled” when the
This is the label under every media asset in the Media Library UI on ads.x.com. The label will be “Untitled” when the
name is not set.Specify a poster image for the video using the
Note: Can only be used with videos.
media_key of an uploaded image.Note: Can only be used with videos.
The title (headline) that appears under the video when Tweeted. Maximum length: 70 characters.
This is not rendered in the Tweet by default. To display the video’s
Note: Can only be used with videos.
This is not rendered in the Tweet by default. To display the video’s
title, use the video_title parameter with the POST accounts/:account_id/tweet endpoint.Note: Can only be used with videos.
PUT https://ads-api.x.com/12/accounts/18ce54d4x5t/media_library/16_844800354743074820?title=cat GIF&description=in space
Example Response
https://ads-api.x.com/12/accounts/:account_id/media_library/:media_key
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the media library object you are operating with in the request.
DELETE https://ads-api.x.com/12/accounts/18ce54d4x5t/media_library/7_860318603387600896
Example Response
Poll Cards
GET accounts/:account_id/cards/poll
Retrieve details for some or all poll cards associated with the current account. Resource URLhttps://ads-api.x.com/12/accounts/:account_id/cards/poll
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
Scope the response to just the desired poll cards by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided.
Specifies the number of records to try and retrieve per distinct request.
Min: 1, Max: 1000
Min: 1, Max: 1000
Specifies a cursor to get the next page of results. See Pagination for more information.
An optional query to scope cards by
Note: This performs case-insensitive prefix matching.
name. Omit this parameter to retrieve all. Maximum length: 80 characters.Note: This performs case-insensitive prefix matching.
Sorts by supported attribute in ascending or descending order. See Sorting for more information.
Include deleted results in your request.
Include the
Note: This parameter and
total_count response attribute.Note: This parameter and
cursor are exclusive. Requests which include total_count will have lower rate limits (currently 200 per 15 minutes).GET https://ads-api.x.com/12/accounts/18ce54d4x5t/cards/poll?card_ids=57i77
Example Response
https://ads-api.x.com/12/accounts/:account_id/cards/poll/:card_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the poll card you are operating with in the request.
Include deleted results in your request.
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/cards/poll/57i8t
Example Response
POST accounts/:account_id/cards/poll
Create a new poll card associated with the specified account. This endpoint supports creating poll cards with either an image, a video, or no media. Polls with media are referred to as Media Forward Polls. Note: The Media Forward Polls product is in beta and requires thePROMOTED_MEDIA_POLLS account feature.
Note: It is not possible to update (PUT) poll cards.
Resource URL
https://ads-api.x.com/12/accounts/:account_id/cards/poll
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
The amount of time (in minutes) the poll will remain open. After the specified
Note: This starts as soon as the card is created and not when it is added to a Tweet.
Min: 5, Max: 10080
duration_in_minutes, the poll will close and votes will no longer be accepted. This corresponds to end_time in the response.Note: This starts as soon as the card is created and not when it is added to a Tweet.
Min: 5, Max: 10080
The first poll choice. Maximum length: 25 characters.
The name for the card.
The second poll choice. Maximum length: 25 characters.
The fourth poll choice. Maximum length: 25 characters.
Note: The first, second, and third choices must be set when using this parameter.
Note: The first, second, and third choices must be set when using this parameter.
The
Note: The image or video must be in the account’s media library.
Note: A minimum image width of 800px and a width:height aspect ratio of 1.91:1 is required.
media_key of a media library image or video which will be used in this card. This is a write-only field. In the response, the API will provide a X URL for this media.Note: The image or video must be in the account’s media library.
Note: A minimum image width of 800px and a width:height aspect ratio of 1.91:1 is required.
The third poll choice. Maximum length: 25 characters.
Note: The first and second choices must be set when using this parameter.
Note: The first and second choices must be set when using this parameter.
POST https://ads-api.x.com/12/accounts/18ce54d4x5t/cards/poll?duration_in_minutes=10080&first_choice=East&second_choice=West&media_key=13_950589518557540353&name=best coast poll
Example Response
https://ads-api.x.com/12/accounts/:account_id/cards/poll/:card_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the poll card you are operating with in the request.
DELETE https://ads-api.x.com/12/accounts/18ce54d4x5t/cards/poll/57i9t
Example Response
Preroll Call To Actions
GET accounts/:account_id/preroll_call_to_actions
Retrieve details for some or all preroll Call-To-Actions (CTAs) associated with line items under the current account. Resource URLhttps://ads-api.x.com/12/accounts/:account_id/preroll_call_to_actions
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
Scope the response to just the preroll CTAs associated with the specified line items by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided.
Specifies the number of records to try and retrieve per distinct request.
Min: 1, Max: 1000
Min: 1, Max: 1000
Specifies a cursor to get the next page of results. See Pagination for more information.
Scope the response to just the desired preroll CTAs by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided.
Sorts by supported attribute in ascending or descending order. See Sorting for more information.
Include deleted results in your request.
Include the
Note: This parameter and
total_count response attribute.Note: This parameter and
cursor are exclusive. Requests which include total_count will have lower rate limits (currently 200 per 15 minutes).GET https://ads-api.x.com/12/accounts/18ce54d4x5t/preroll_call_to_actions?line_item_ids=8v53k
Example Response
https://ads-api.x.com/12/accounts/:account_id/preroll_call_to_actions/:preroll_call_to_action_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the preroll call to action you are operating with in the request.
Include deleted results in your request.
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/preroll_call_to_actions/8f0
Example Response
POST accounts/:account_id/preroll_call_to_actions
Set the optional Call-to-Action (CTA) for aPREROLL_VIEWS line item.
Resource URL
https://ads-api.x.com/12/accounts/:account_id/preroll_call_to_actions
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
The CTA text for the displayed button within the ad.
Possible values:
Possible values:
GO_TO, SEE_MORE, SHOP, VISIT_SITE, WATCH_NOWThe URL to redirect the user to when the CTA button is clicked.
A reference to the line item you are operating with in the request.
POST https://ads-api.x.com/12/accounts/18ce54d4x5t/preroll_call_to_actions?line_item_id=8v53k&call_to_action=VISIT_SITE&call_to_action_url=https://www.x.com
Example Response
PREROLL_VIEWS line item.
Resource URL
https://ads-api.x.com/12/accounts/:account_id/preroll_call_to_actions/:preroll_call_to_action_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the preroll CTA you are operating with in the request.
The CTA text for the displayed button within the ad.
Possible values:
Possible values:
GO_TO, SEE_MORE, SHOP, VISIT_SITE, WATCH_NOWThe URL to redirect the user to when the CTA button is clicked.
PUT https://ads-api.x.com/12/accounts/18ce54d4x5t/preroll_call_to_actions/8f0?call_to_action=WATCH_NOW
Example Response
https://ads-api.x.com/12/accounts/:account_id/preroll_call_to_actions/:preroll_call_to_action_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the preroll CTA you are operating with in the request.
DELETE https://ads-api.x.com/12/accounts/18ce54d4x5t/preroll_call_to_actions/8f0
Example Response
Scheduled Tweets
GET accounts/:account_id/scheduled_tweets
Retrieve details for some or all Scheduled Tweets associated with the current account. Resource URLhttps://ads-api.x.com/12/accounts/:account_id/scheduled_tweets
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
Specifies the number of records to try and retrieve per distinct request.
Min: 1, Max: 200
Min: 1, Max: 200
Specifies a cursor to get the next page of results. See Pagination for more information.
Specify the user to retrieve Scheduled Tweets for. Defaults to the
FULL promotable user on the account when not set.GET https://ads-api.x.com/12/accounts/18ce54d4x5t/scheduled_tweets?count=1
Example Response
https://ads-api.x.com/12/accounts/:account_id/scheduled_tweets/:scheduled_tweet_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the Scheduled Tweet you are operating with in the request.
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/scheduled_tweets/917438609065623552
Example Response
POST accounts/:account_id/scheduled_tweets
Create a Scheduled Tweet for the account’s full promotable user (default) or the user specified in theas_user_id parameter.
Resource URL
https://ads-api.x.com/12/accounts/:account_id/scheduled_tweets
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
The time, expressed in ISO 8601, that the Tweet should be published (or go live).
Note: Tweets can only be scheduled up to one year in the future.
Note: Tweets should only be scheduled at minute-granularity; seconds will be ignored.
Note: Tweets can only be scheduled up to one year in the future.
Note: Tweets should only be scheduled at minute-granularity; seconds will be ignored.
The user ID of the advertiser on behalf of whom you are posting the Tweet. The advertiser must grant your handle (or handles) access to their ads account via ads.x.com. This permission allows you to call the API using the OAuth tokens of your own handle rather than the advertiser’s.
The text of your status update. Required if no
media_keys are specified.Associate a card with the Tweet using the
card_uri value from any cards response, if available.Associate media with the Tweet by specifying a comma-separated list of identifiers. Include up to 4 images, 1 animated GIF, or 1 video.
Note: The media asset must be in the account’s Media Library.
Note: The media asset must be in the account’s Media Library.
Whether to create a nullcasted (or “Promoted-only”) Tweet.
The name for the Scheduled Tweet. Maximum length: 80 characters.
POST https://ads-api.x.com/12/accounts/18ce54d4x5t/scheduled_tweets?as_user_id=756201191646691328&media_keys=3_917438348871983104&scheduled_at=2018-01-01
Example Response
https://ads-api.x.com/12/accounts/:account_id/scheduled_tweets/:scheduled_tweet_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the Scheduled Tweet you are operating with in the request.
Associate a card with the Tweet using the
Note: Unset (remove) by specifying the parameter without a value.
card_uri value from any cards response, if available.Note: Unset (remove) by specifying the parameter without a value.
Associate media with the Tweet by specifying a comma-separated list of identifiers. Include up to 4 images, 1 animated GIF, or 1 video.
Note: The media asset must be in the account’s Media Library.
Note: Unset (remove) by specifying the parameter without a value.
Note: The media asset must be in the account’s Media Library.
Note: Unset (remove) by specifying the parameter without a value.
Whether to create a nullcasted (or “Promoted-only”) Tweet.
The time, expressed in ISO 8601, that the Tweet should be published (or go live).
The text of your status update.
The name for the Scheduled Tweet. Maximum length: 80 characters.
PUT https://ads-api.x.com/12/accounts/18ce54d4x5t/scheduled_tweets/875057751231037440?text=winter solstice
Example Response
https://ads-api.x.com/12/accounts/:account_id/scheduled_tweets/:scheduled_tweet_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the Scheduled Tweet you are operating with in the request.
DELETE https://ads-api.x.com/12/accounts/18ce54d4x5t/scheduled_tweets/875064008595787776
Example Response
Tweet Previews
GET accounts/:account_id/tweet_previews
Preview published, scheduled, or draft Tweets.- Supports previewing multiple Tweets—up to 200—in a single API request
- Accurate, up-to-date rendering of Tweet layout and style
- Supports all the latest formats and card types
- Returns an iframe
https://ads-api.x.com/12/accounts/:account_id/tweet_previews
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A comma-separated list of identifiers. Up to 200 IDs may be provided.
Note: The IDs should correspond to the specified
Note: The IDs should correspond to the specified
tweet_type. For example, if a Scheduled Tweet ID is passed in and tweet_type=PUBLISHED is specified, a preview for that ID will not be returned.The Tweet type for the specified
Possible values:
tweet_ids.Possible values:
DRAFT, PUBLISHED, SCHEDULEDGET https://ads-api.x.com/12/accounts/18ce54d4x5t/tweet_previews?tweet_ids=1122911801354510336,1102836745790316550&tweet_type=PUBLISHED
Example Response
Tweets
GET accounts/:account_id/tweets
Retrieve Tweet details for the account’s full promotable user (default) or the user specified in theuser_id parameter. This can be any of the promotable users under the account.
Resource URL
https://ads-api.x.com/12/accounts/:account_id/tweets
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
The Tweet type for the specified
Possible values:
tweet_ids.Possible values:
DRAFT, PUBLISHED, SCHEDULEDSpecifies the number of records to try and retrieve per distinct request.
Min: 1, Max: 1000
Min: 1, Max: 1000
Specifies a cursor to get the next page of results. See Pagination for more information.
Whether to filter out mentions and replies from the list of available Tweets.
An optional query to scope Tweets by
Note: This performs case-insensitive prefix matching.
name. Omit this parameter to retrieve all. Maximum length: 80 characters.Note: This performs case-insensitive prefix matching.
Whether to return nullcasted (a.k.a. “Promoted-only”) Tweets, organic Tweets, or both.
Possible values:
Possible values:
ALL, NULLCAST, ORGANICWhether to exclude the user object in the Tweet response. When enabled, the only part of the user object that will be returned is the Tweet’s author’s user ID.
A comma-separated list of identifiers. Up to 200 IDs may be provided.
Note: The IDs should correspond to the specified
Note: The IDs should correspond to the specified
tweet_type. For example, if a Scheduled Tweet ID is passed in, then the tweet_type must be SCHEDULED in order for that Tweet to be returned in the response.Specifies the user to scope Tweets to. Defaults to the
FULL promotable user on the account when not set.GET https://ads-api.x.com/12/accounts/18ce54d4x5t/tweets?tweet_ids=1166476031668015104&tweet_type=PUBLISHED&trim_user=true
Example Response
POST accounts/:account_id/tweet
Create a Tweet for the account’s full promotable user (default) or the user specified in theas_user_id parameter. Both nullcasted (default) and organic Tweet creation is supported. Nullcasted Tweets do not appear in the public timeline and are not served to followers. Either type can be used in campaigns.
If the authenticated user is not the FULL promotable user on this account, determine if they have permission to Tweet on behalf this user by making a request to the GET accounts/:account_id/authenticated_user_access endpoint. A permission of TWEET_COMPOSER indicates that the user may use this endpoint to create nullcasted Tweets on behalf of the FULL promotable user.
When using the upload.x.com endpoint for media, pass in the same user_id value for the additional_owners parameter as the as_user_id value that you pass in to this endpoint.
Resource URL
https://ads-api.x.com/12/accounts/:account_id/tweet
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
The user ID of the advertiser on behalf of whom you are posting the Tweet. The advertiser must grant your handle (or handles) access to their ads account via ads.x.com. This permission allows you to call the API using the OAuth tokens of your own handle rather than the advertiser’s.
The text of your status update. Required if no
media_keys are specified.Associate a card with the Tweet using the
card_uri value from any cards response, if available.Choose who can reply to this Tweet. Anyone mentioned can always reply.
Note: This field will not be returned in the POST request response, but will be returned when making a GET request.
Note: This parameter only works in Ads API v8 and above.
Possible values:
Note: This field will not be returned in the POST request response, but will be returned when making a GET request.
Note: This parameter only works in Ads API v8 and above.
Possible values:
EVERYONE, FOLLOWING, MENTIONED_USERSAssociate media with the Tweet by specifying a comma-separated list of identifiers. Include up to 4 images, 1 animated GIF, or 1 video.
The name for the Tweet. Maximum length: 80 characters.
Whether to create a nullcasted (or “Promoted-only”) Tweet.
Note: Organic Tweets (
Note: Organic Tweets (
nullcast=false) can only be created for the authenticated user.Whether to exclude the user object in the Tweet response. When enabled, the only part of the user object that will be returned is the Tweet’s author’s user ID.
Whether the response should be in compatibility or extended mode. See this for additional information.
Possible values:
Possible values:
compat, extendedThe CTA for the video.
Possible values:
Possible values:
VISIT_SITE, WATCH_NOWThe value for the corresponding CTA on the video.
The description that appears under the video. Maximum length: 200 characters.
The title (headline) that appears under the video. Maximum length: 70 characters.
POST https://ads-api.x.com/12/accounts/18ce54d4x5t/tweet?text=hello, world&as_user_id=756201191646691328&trim_user=true
Example Response
name belonging to the current account.
Resource URL
https://ads-api.x.com/12/accounts/:account_id/tweets/:tweet_id/name
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the Tweet you are operating with in the request.
The name for the Tweet. Maximum length: 80 characters.
PUT https://ads-api.x.com/12/accounts/18ce54d4x5t/tweets/994747471329873920/name?name=new Tweet name
Example Response
Video Conversation Cards
Note: To associate a card with a Tweet, use thecard_uri parameter with either the POST accounts/:account_id/tweet, POST statuses/update, or POST accounts/:account_id/scheduled_tweets endpoints.
GET accounts/:account_id/cards/video_conversation
Retrieve details for some or all video conversation cards associated with the current account. Resource URLhttps://ads-api.x.com/12/accounts/:account_id/cards/video_conversation
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
Scope the response to just the desired video conversation cards by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided.
Specifies the number of records to try and retrieve per distinct request.
Min: 1, Max: 1000
Min: 1, Max: 1000
Specifies a cursor to get the next page of results. See Pagination for more information.
An optional query to scope cards by
Note: This performs case-insensitive prefix matching.
name. Omit this parameter to retrieve all. Maximum length: 80 characters.Note: This performs case-insensitive prefix matching.
Sorts by supported attribute in ascending or descending order. See Sorting for more information.
Include deleted results in your request.
Include the
Note: This parameter and
total_count response attribute.Note: This parameter and
cursor are exclusive. Requests which include total_count will have lower rate limits (currently 200 per 15 minutes).GET https://ads-api.x.com/12/accounts/18ce54d4x5t/cards/video_conversation?card_ids=5a86h
Example Response
https://ads-api.x.com/12/accounts/:account_id/cards/video_conversation/:card_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the video conversation card you are operating with in the request.
Include deleted results in your request.
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/cards/video_conversation/5a86h
Example Response
POST accounts/:account_id/cards/video_conversation
Create a new video conversation card associated with the specified account. See Uploading Media for useful information on uploading images to our endpoints. Resource URLhttps://ads-api.x.com/12/accounts/:account_id/cards/video_conversation
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
The Call-To-Action (CTA) hashtag for the first option. Maximum length: 20 characters (not counting the #).
The Tweet text to be used when the first CTA is clicked.
The media key for a video to be used in this card.
Note: The video must be in the account’s Media Library.
Note: An aspect ratio of 16:9 is required.
Note: The video must be in the account’s Media Library.
Note: An aspect ratio of 16:9 is required.
The name for the card.
The text to be displayed after the CTA is clicked. Maximum length: 23 characters.
The title for the card, which appears below the video and above the CTAs. Maximum length: 23 characters.
Note: Required if
Note: Required if
second_cta is not set.The Call-To-Action (CTA) hashtag for the second option. Maximum length: 20 characters (not counting the #).
Note: Required if
Note: Required if
title is not set.The Tweet text to be used when the second CTA is clicked.
Note: Required if
Note: Required if
second_cta is set.The media key for a poster image to be used in this card. If not specified, the first frame will be used.
Note: The video must be in the account’s Media Library.
Note: The video must be in the account’s Media Library.
The Call-To-Action (CTA) hashtag for the third option. Maximum length: 20 characters (not counting the #).
The Tweet text to be used when the third CTA is clicked.
Note: Required if
Note: Required if
third_cta is set.The Call-To-Action (CTA) hashtag for the fourth option. Maximum length: 20 characters (not counting the #).
The Tweet text to be used when the fourth CTA is clicked.
Note: Required if
Note: Required if
fourth_cta is set.The URL to be displayed with the thank you text.
A
Note: The image must be in the account’s media library.
media_key of an image which will be used in the instant unlock scenario. This is a write-only field. In the response, the API will provide a X URL for this image.Note: The image must be in the account’s media library.
The identifier of a video from the GET accounts/:account_id/media_library endpoint which will be used in the instant unlock scenario.
POST https://ads-api.x.com/12/accounts/18ce54d4x5t/cards/video_conversation?first_cta=#APIs&first_cta_tweet=Ads API&name=video conversation card&thank_you_text=Build it&title=Developers&media_key=13_958388276489895936
Example Response
https://ads-api.x.com/12/accounts/:account_id/cards/video_conversation/:card_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the video conversation card you are operating with in the request.
The Call-To-Action (CTA) hashtag for the first option. Maximum length: 20 characters (not counting the #).
The Tweet text to be used when the first CTA is clicked.
The Call-To-Action (CTA) hashtag for the second option. Maximum length: 20 characters (not counting the #).
Note: Required if
Note: Required if
title is not set.The Tweet text to be used when the second CTA is clicked.
Note: Required if
Note: Required if
second_cta is set.The Call-To-Action (CTA) hashtag for the third option. Maximum length: 20 characters (not counting the #).
The Tweet text to be used when the third CTA is clicked.
Note: Required if
Note: Required if
third_cta is set.The Call-To-Action (CTA) hashtag for the fourth option. Maximum length: 20 characters (not counting the #).
The Tweet text to be used when the fourth CTA is clicked.
Note: Required if
Note: Required if
fourth_cta is set.The media key for a video to be used in this card.
Note: The video must be in the account’s Media Library.
Note: An aspect ratio of 16:9 is required.
Note: The video must be in the account’s Media Library.
Note: An aspect ratio of 16:9 is required.
The name for the card.
The media key for a poster image to be used in this card. If not specified, the first frame will be used.
Note: The video must be in the account’s Media Library.
Note: The video must be in the account’s Media Library.
The text to be displayed after the CTA is clicked. Maximum length: 23 characters.
The URL to be displayed with the thank you text.
The title for the card, which appears below the video and above the CTAs. Maximum length: 23 characters.
Note: Required if
Note: Required if
second_cta is not set.A
Note: The image must be in the account’s media library.
media_key of an image which will be used in the instant unlock scenario. This is a write-only field. In the response, the API will provide a X URL for this image.Note: The image must be in the account’s media library.
The identifier of a video from the GET accounts/:account_id/media_library endpoint which will be used in the instant unlock scenario.
PUT https://ads-api.x.com/12/accounts/18ce54d4x5t/cards/video_conversation/5a86h?name=developers card
Example Response
https://ads-api.x.com/12/accounts/:account_id/cards/video_conversation/:card_id
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests. The specified account must be associated with the authenticated user.
A reference to the video conversation card you are operating with in the request.
DELETE https://ads-api.x.com/12/accounts/18ce54d4x5t/cards/video_conversation/4i0ya
Example Response