Creatives
Video Website Cards¶
Note: card_uri
is replacing preview_url
. This moves
associating a card with a Tweet from the Tweet text to a Tweet parameter. To
associate a card with a Tweet, use the card_uri
parameter with either the
POST accounts/:account_id/tweet, POST statuses/update, or
POST accounts/:account_id/scheduled_tweets endpoints. This allows users to
use more characters in their Tweets.
GET accounts/:account_id/cards/video_website¶
Retrieve details for some or all video website cards associated with the current account.
Resource URL¶
https://ads-api.twitter.com/3/accounts/:account_id/cards/video_website
Parameters¶
Name | Description |
---|---|
account_id
required
|
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: |
card_ids
optional
|
Scope the response to just the desired video website cards by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided. Type: string Example: |
count
optional
|
Specifies the number of records to try and retrieve per distinct request. Type: int Default:
200 Min, Max:
1 , 1000 |
cursor
optional
|
Specifies a cursor to get the next page of results. See Pagination for more information. Type: string Example: |
q
optional
|
An optional query to scope cards by Type: string Example: |
sort_by
optional
|
Sorts by supported attribute in ascending or descending order. See Sorting for more information. Type: string Example: |
with_deleted
optional
|
Include deleted results in your request. Type: boolean Default:
false Possible values:
true , false |
with_total_count
optional
|
Include the Note: This parameter will be ignored if Note: Requests which include Type: boolean Default:
false Possible values:
true , false |
Example Request¶
GET https://ads-api.twitter.com/3/accounts/18ce54d4x5t/cards/video_website?card_ids=5a4vf
Example Response¶
{
"request": {
"params": {
"card_type": "video_website",
"card_ids": [
"5a4vf"
],
"account_id": "18ce54d4x5t"
}
},
"next_cursor": null,
"data": [
{
"video_poster_height": "9",
"name": "video website card",
"website_shortened_url": "https://t.co/zadeUSVD18",
"video_height": "9",
"video_url": "https://video.twimg.com/amplify_video/vmap/958224897255211013.vmap",
"content_duration_seconds": "8",
"video_owner_id": "756201191646691328",
"video_content_id": "958224897255211013",
"preview_url": null,
"website_display_url": "developer.twitter.com",
"id": "5a4vf",
"account_id": "18ce54d4x5t",
"video_width": "16",
"video_hls_url": "https://video.twimg.com/amplify_video/958224897255211013/pl/yngoBofLjm-k5hHe.m3u8",
"website_dest_url": "https://developer.twitter.com",
"created_at": "2018-01-30T06:30:01Z",
"card_uri": "card://958225772740714496",
"title": "Twitter Developers",
"website_url": "https://developer.twitter.com",
"updated_at": "2018-01-30T06:30:01Z",
"video_poster_url": "https://pbs.twimg.com/amplify_video_thumb/958224897255211013/img/EnyDab6vErGm4Avd.jpg",
"video_poster_width": "16",
"deleted": false,
"card_type": "VIDEO_WEBSITE"
}
]
}
GET accounts/:account_id/cards/video_website/:card_id¶
Retrieve a specific video website card associated with the current account.
Resource URL¶
https://ads-api.twitter.com/3/accounts/:account_id/cards/video_website/:card_id
Parameters¶
Name | Description |
---|---|
account_id
required
|
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: |
card_id
required
|
A reference to the video website card you are operating with in the request. Type: string Example: |
with_deleted
optional
|
Include deleted results in your request. Type: boolean Default:
false Possible values:
true , false |
Example Request¶
GET https://ads-api.twitter.com/3/accounts/18ce54d4x5t/cards/video_website/5a4vf
Example Response¶
{
"request": {
"params": {
"card_type": "video_website",
"card_id": "5a4vf",
"account_id": "18ce54d4x5t"
}
},
"data": {
"video_poster_height": "9",
"name": "video website card",
"website_shortened_url": "https://t.co/zadeUSVD18",
"video_height": "9",
"video_url": "https://video.twimg.com/amplify_video/vmap/958224897255211013.vmap",
"content_duration_seconds": "8",
"video_owner_id": "756201191646691328",
"video_content_id": "958224897255211013",
"preview_url": null,
"website_display_url": "developer.twitter.com",
"id": "5a4vf",
"account_id": "18ce54d4x5t",
"video_width": "16",
"video_hls_url": "https://video.twimg.com/amplify_video/958224897255211013/pl/yngoBofLjm-k5hHe.m3u8",
"website_dest_url": "https://developer.twitter.com",
"created_at": "2018-01-30T06:30:01Z",
"card_uri": "card://958225772740714496",
"title": "Twitter Developers",
"website_url": "https://developer.twitter.com",
"updated_at": "2018-01-30T06:30:01Z",
"video_poster_url": "https://pbs.twimg.com/amplify_video_thumb/958224897255211013/img/EnyDab6vErGm4Avd.jpg",
"video_poster_width": "16",
"deleted": false,
"card_type": "VIDEO_WEBSITE"
}
}
POST accounts/:account_id/cards/video_website¶
Create a new video website card associated to the specified account.
Resource URL¶
https://ads-api.twitter.com/3/accounts/:account_id/cards/video_website
Parameters¶
Name | Description |
---|---|
account_id
required
|
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: |
name
required
|
The name for the card. Maximum length: 80 characters. Type: string Example: |
title
required
|
The title for the card. Maximum length: 70 characters. Type: string Example: |
video_id
required
|
The identifier of a video from the GET accounts/:account_id/media_library endpoint to be included in the card. Note: An aspect ratio of either 16:9 or 1:1 is required. Type: string Example: |
website_url
required
|
The URL of the website to redirect a user to. Type: string Example: |
Example Request¶
POST https://ads-api.twitter.com/3/accounts/18ce54d4x5t/cards/video_website?name=video website card&title=Twitter Developers&video_id=13_958224897255211013&website_url=https://developer.twitter.com
Example Response¶
{
"data": {
"video_poster_height": "9",
"name": "video website card",
"website_shortened_url": "https://t.co/zadeUSVD18",
"video_height": "9",
"video_url": "https://video.twimg.com/amplify_video/vmap/958224897255211013.vmap",
"content_duration_seconds": "8",
"video_owner_id": "756201191646691328",
"video_content_id": "958224897255211013",
"preview_url": null,
"website_display_url": "developer.twitter.com",
"id": "5a4vf",
"account_id": "18ce54d4x5t",
"video_width": "16",
"video_hls_url": "https://video.twimg.com/amplify_video/958224897255211013/pl/yngoBofLjm-k5hHe.m3u8",
"website_dest_url": "https://developer.twitter.com",
"created_at": "2018-01-30T06:30:01Z",
"card_uri": "card://958225772740714496",
"title": "Twitter Developers",
"website_url": "https://developer.twitter.com",
"updated_at": "2018-01-30T06:30:01Z",
"video_poster_url": "https://pbs.twimg.com/amplify_video_thumb/958224897255211013/img/EnyDab6vErGm4Avd.jpg",
"video_poster_width": "16",
"deleted": false,
"card_type": "VIDEO_WEBSITE"
},
"request": {
"params": {
"video_poster_height": "9",
"name": "video website card",
"website_shortened_url": "https://t.co/zadeUSVD18",
"video_height": "9",
"video_url": "https://video.twimg.com/amplify_video/vmap/958224897255211013.vmap",
"content_duration_seconds": "8",
"video_stream_content_type": "video/mp4; codecs="avc1.42E01E, mp4a.40.2"",
"video_owner_id": "756201191646691328",
"video_content_id": "958224897255211013",
"website_display_url": "developer.twitter.com",
"account_id": "18ce54d4x5t",
"video_width": "16",
"video_hls_url": "https://video.twimg.com/amplify_video/958224897255211013/pl/yngoBofLjm-k5hHe.m3u8",
"website_dest_url": "https://developer.twitter.com",
"title": "Twitter Developers",
"website_url": "https://developer.twitter.com",
"video_poster_url": "https://pbs.twimg.com/amplify_video_thumb/958224897255211013/img/EnyDab6vErGm4Avd.jpg",
"video_poster_width": "16",
"card_type": "VIDEO_WEBSITE"
}
}
}
PUT accounts/:account_id/cards/video_website/:card_id¶
Update the specified video website card belonging to the current account.
Resource URL¶
https://ads-api.twitter.com/3/accounts/:account_id/cards/video_website/:card_id
Parameters¶
Name | Description |
---|---|
account_id
required
|
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: |
card_id
required
|
A reference to the video website card you are operating with in the request. Type: string Example: |
name
optional
|
The name for the card. Maximum length: 80 characters. Type: string Example: |
title
optional
|
The title for the card. Maximum length: 70 characters. Type: string Example: |
video_id
optional
|
The identifier of a video from the GET accounts/:account_id/media_library endpoint to be included in the card. Note: An aspect ratio of either 16:9 or 1:1 is required. Type: string Example: |
website_url
optional
|
The URL of the website to redirect a user to. Type: string Example: |
Example Request¶
PUT https://ads-api.twitter.com/3/accounts/18ce54d4x5t/cards/video_website/5a4vf?name=star card
Example Response¶
{
"data": {
"video_poster_height": "9",
"name": "stars card",
"website_shortened_url": "https://t.co/zadeUSVD18",
"video_height": "9",
"video_url": "https://video.twimg.com/amplify_video/vmap/958224897255211013.vmap",
"content_duration_seconds": "8",
"video_owner_id": "756201191646691328",
"video_content_id": "958224897255211013",
"preview_url": null,
"website_display_url": "developer.twitter.com",
"id": "5a4vf",
"account_id": "18ce54d4x5t",
"video_width": "16",
"video_hls_url": "https://video.twimg.com/amplify_video/958224897255211013/pl/yngoBofLjm-k5hHe.m3u8",
"website_dest_url": "https://developer.twitter.com",
"created_at": "2018-01-30T06:30:01Z",
"card_uri": "card://958225772740714496",
"title": "Twitter Developers",
"website_url": "https://developer.twitter.com",
"updated_at": "2018-01-30T06:47:51Z",
"video_poster_url": "https://pbs.twimg.com/amplify_video_thumb/958224897255211013/img/EnyDab6vErGm4Avd.jpg",
"video_poster_width": "16",
"deleted": false,
"card_type": "VIDEO_WEBSITE"
},
"request": {
"params": {
"account_id": "18ce54d4x5t",
"card_type": "VIDEO_WEBSITE",
"card_id": "5a4vf",
"name": "stars card"
}
}
}
DELETE accounts/:account_id/cards/video_website/:card_id¶
Permanently delete the specified video website card belonging to the current account.
Note: This is a hard delete. As a result, it is not possible to retrieve deleted cards.
Resource URL¶
https://ads-api.twitter.com/3/accounts/:account_id/cards/video_website/:card_id
Parameters¶
Name | Description |
---|---|
account_id
required
|
The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: |
card_id
required
|
A reference to the video website card you are operating with in the request. Type: string Example: |
Example Request¶
DELETE https://ads-api.twitter.com/3/accounts/18ce54d4x5t/cards/video_website/4h053
Example Response¶
{
"data": {
"name": "twitter blog card",
"id": "4h053",
"account_id": "18ce54d4x5t",
"created_at": "2017-07-01T00:23:06Z",
"updated_at": "2017-07-01T00:28:31Z",
"deleted": true,
"card_type": "VIDEO_WEBSITE"
},
"request": {
"params": {
"card_id": "4h053",
"account_id": "18ce54d4x5t"
}
}
}