Video Website Cards

Note: 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.

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/8/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: 18ce54d4x5t

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: 5a4vf

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: 8x7v00oow

q
optional

An optional query to scope cards by name. Omit this parameter to retrieve all. Maximum length: 80 characters.

Type: string

Example: dtc

sort_by
optional

Sorts by supported attribute in ascending or descending order. See Sorting for more information.

Type: string

Example: created_at-asc

with_deleted
optional

Include deleted results in your request.

Type: boolean

Default: false
Possible values: true, false
with_total_count
optional

Include the total_count response attribute.

Note: This parameter and cursor are exclusive.

Note: Requests which include total_count will have lower rate limits, currently set at 200 per 15 minutes.

Type: boolean

Default: false
Possible values: true, false

Example Request

GET https://ads-api.twitter.com/8/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",
      "media_url": "https://video.twimg.com/amplify_video/vmap/958224897255211013.vmap",
      "content_duration_seconds": "8",
      "video_owner_id": "756201191646691328",
      "media_key": "13_958224897255211013",
      "website_display_url": "developer.twitter.com",
      "id": "5a4vf",
      "video_width": "16",
      "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",
      "poster_media_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/8/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: 18ce54d4x5t

card_id
required

A reference to the video website card you are operating with in the request.

Type: string

Example: 5a4vf

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/8/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",
    "media_url": "https://video.twimg.com/amplify_video/vmap/958224897255211013.vmap",
    "content_duration_seconds": "8",
    "video_owner_id": "756201191646691328",
    "media_key": "13_958224897255211013",
    "website_display_url": "developer.twitter.com",
    "id": "5a4vf",
    "video_width": "16",
    "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",
    "poster_media_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/8/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: 18ce54d4x5t

media_key
required

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 either 16:9 or 1:1 is required.

Type: string

Example: 13_1168079965037467209

name
required

The name for the card. Maximum length: 80 characters.

Type: string

Example: video website card

title
required

The title for the card. Maximum length: 70 characters.

Type: string

Example: Twitter Developers

website_url
required

The URL of the website to redirect a user to.

Type: string

Example: https://developer.twitter.com

Example Request

POST https://ads-api.twitter.com/8/accounts/18ce54d4x5t/cards/video_website?name=video website card&title=Twitter Developers&media_key=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",
    "media_url": "https://video.twimg.com/amplify_video/vmap/958224897255211013.vmap",
    "content_duration_seconds": "8",
    "video_owner_id": "756201191646691328",
    "media_key": "13_958224897255211013",
    "website_display_url": "developer.twitter.com",
    "id": "5a4vf",
    "video_width": "16",
    "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",
    "poster_media_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",
      "media_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",
      "media_key": "13_958224897255211013",
      "website_display_url": "developer.twitter.com",
      "account_id": "18ce54d4x5t",
      "video_width": "16",
      "website_dest_url": "https://developer.twitter.com",
      "title": "Twitter Developers",
      "website_url": "https://developer.twitter.com",
      "poster_media_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/8/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: 18ce54d4x5t

card_id
required

A reference to the video website card you are operating with in the request.

Type: string

Example: 5a4vf

media_key
optional

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 either 16:9 or 1:1 is required.

Type: string

Example: 13_1168079965037467209

name
optional

The name for the card. Maximum length: 80 characters.

Type: string

Example: star card

title
optional

The title for the card. Maximum length: 70 characters.

Type: string

Example: The Official Twitter Blog

website_url
optional

The URL of the website to redirect a user to.

Type: string

Example: https://blog.twitter.com

Example Request

PUT https://ads-api.twitter.com/8/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",
    "media_url": "https://video.twimg.com/amplify_video/vmap/958224897255211013.vmap",
    "content_duration_seconds": "8",
    "video_owner_id": "756201191646691328",
    "media_key": "13_958224897255211013",
    "website_display_url": "developer.twitter.com",
    "id": "5a4vf",
    "video_width": "16",
    "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",
    "poster_media_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/8/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: 18ce54d4x5t

card_id
required

A reference to the video website card you are operating with in the request.

Type: string

Example: 48fj0

Example Request

DELETE https://ads-api.twitter.com/8/accounts/18ce54d4x5t/cards/video_website/4h053

Example Response

{
  "data": {
    "name": "twitter blog card",
    "id": "4h053",
    "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"
    }
  }
}

Was this document helpful?

Thank you for the feedback. We’re really glad we could help!

Thank you for the feedback. How could we improve this document?

Thank you for the feedback. Your comments will help us improve our documents in the future.