Image App Download 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/image_app_download

Retrieve details for some or all image app download cards associated with the current account.

This card is part of our Mobile App Promotion product suite.

Resource URL

https://ads-api.twitter.com/3/accounts/:account_id/cards/image_app_download

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 image app download cards by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided.

Type: string

Example: 59wiu

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: twitter

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 will be ignored if cursor is specified.

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/3/accounts/18ce54d4x5t/cards/image_app_download?card_ids=59wiu

Example Response

{
  "request": {
    "params": {
      "card_type": "image_app_download",
      "card_ids": [
        "59wiu"
      ],
      "account_id": "18ce54d4x5t"
    }
  },
  "next_cursor": null,
  "data": [
    {
      "name": "image app download card",
      "googleplay_app_id": "com.twitter.android",
      "image_display_height": "418",
      "preview_url": null,
      "id": "59wiu",
      "account_id": "18ce54d4x5t",
      "app_country_code": "US",
      "wide_app_image": "https://pbs.twimg.com/media/DOxqHTWV4AAL7Bk.jpg",
      "created_at": "2018-01-27T00:40:39Z",
      "image_display_width": "800",
      "card_uri": "card://957050688416112640",
      "updated_at": "2018-01-27T00:40:39Z",
      "app_cta": "INSTALL",
      "deleted": false,
      "card_type": "IMAGE_APP_DOWNLOAD"
    }
  ]
}

GET accounts/:account_id/cards/image_app_download/:card_id

Retrieve a specific image app download card associated with the current account.

This card is part of our Mobile App Promotion product suite.

Resource URL

https://ads-api.twitter.com/3/accounts/:account_id/cards/image_app_download/: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 image app download card you are operating with in the request.

Type: string

Example: 59wiu

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/image_app_download/59wiu

Example Response

{
  "request": {
    "params": {
      "card_type": "image_app_download",
      "card_id": "59wiu",
      "account_id": "18ce54d4x5t"
    }
  },
  "data": {
    "name": "image app download card",
    "googleplay_app_id": "com.twitter.android",
    "image_display_height": "418",
    "preview_url": null,
    "id": "59wiu",
    "account_id": "18ce54d4x5t",
    "app_country_code": "US",
    "wide_app_image": "https://pbs.twimg.com/media/DOxqHTWV4AAL7Bk.jpg",
    "created_at": "2018-01-27T00:40:39Z",
    "image_display_width": "800",
    "card_uri": "card://957050688416112640",
    "updated_at": "2018-01-27T00:40:39Z",
    "app_cta": "INSTALL",
    "deleted": false,
    "card_type": "IMAGE_APP_DOWNLOAD"
  }
}

POST accounts/:account_id/cards/image_app_download

Create a new image app download card associated with the current account.

This card is part of our Mobile App Promotion product suite.

Resource URL

https://ads-api.twitter.com/3/accounts/:account_id/cards/image_app_download

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

name
required

The name for the card.

Type: string

Example: image app download card

app_country_code
required

The two-letter ISO code for the country where the app is sold.

Type: string

Example: US

ipad_app_id
sometimes required

The iPad app ID.

Note: At least one of following is required: ipad_app_id, iphone_app_id, or googleplay_app_id.

Note: When not specified, this will be set to to the iphone_app_id value (if provided).

Note: This can be retrieved from the Apple App Store URL.

Type: long

Example: 333903271

iphone_app_id
sometimes required

The iPhone app ID.

Note: At least one of following is required: ipad_app_id, iphone_app_id, or googleplay_app_id.

Note: This can be retrieved from the Apple App Store URL.

Type: long

Example: 333903271

googleplay_app_id
sometimes required

The Google Play application package name.

Note: At least one of following is required: ipad_app_id, iphone_app_id, or googleplay_app_id.

Type: string

Example: com.twitter.android

app_cta
optional

The Call-To-Action (CTA) text for the card button.

Type: enum

Possible values: BOOK, CONNECT, INSTALL, OPEN, ORDER, PLAY, SHOP

ipad_deep_link
optional

A deep link into the iPad app you’re promoting.

Note: Can only be used if an ipad_app_id has been provided.

Note: When not specified, this will be set to to the iphone_deep_link value (if provided).

Type: string

iphone_deep_link
optional

A deep link into the iPhone app you’re promoting.

Note: Can only be used if an iphone_app_id has been provided.

Type: string

googleplay_deep_link
optional

A deep link into the Android app you’re promoting.

Note: Can only be used if a googleplay_app_id has been provided.

Type: string

wide_app_image_media_id
sometimes required

A media_id of an image which will be used instead of the app store’s icon.

This is a write-only field. In the response, the API will provide a Twitter URL for this image.

Note: Required if wide_app_image_media_key is not specified.

Note: A minimum image width of 800px and a width:height aspect ratio of either 1:1 or 1.91:1 is required.

Type: long

Example: 882726458191298561

wide_app_image_media_key
sometimes required

A media_key of a media library image which will be used instead of the app store’s icon.

This is a write-only field. In the response, the API will provide a Twitter URL for this image.

Note: The image must be in the account’s media library.

Note: Required if wide_app_image_media_id is not specified.

Note: A minimum image width of 800px and a width:height aspect ratio of either 1:1 or 1.91:1 is required.

Type: string

Example: 3_931235896644460544

Example Request

POST https://ads-api.twitter.com/3/accounts/18ce54d4x5t/cards/image_app_download?wide_app_image_media_key=3_931235896644460544&name=image app download card&app_country_code=US&googleplay_app_id=com.twitter.android

Example Response

{
  "data": {
    "name": "image app download card",
    "googleplay_app_id": "com.twitter.android",
    "image_display_height": "418",
    "preview_url": null,
    "id": "59wiu",
    "account_id": "18ce54d4x5t",
    "app_country_code": "US",
    "wide_app_image": "https://pbs.twimg.com/media/DOxqHTWV4AAL7Bk.jpg",
    "created_at": "2018-01-27T00:40:39Z",
    "image_display_width": "800",
    "card_uri": "card://957050688416112640",
    "updated_at": "2018-01-27T00:40:39Z",
    "app_cta": "INSTALL",
    "deleted": false,
    "card_type": "IMAGE_APP_DOWNLOAD"
  },
  "request": {
    "params": {
      "wide_app_image_media_key": "3_931235896644460544",
      "name": "image app download card",
      "googleplay_app_id": "com.twitter.android",
      "image_display_height": "418",
      "account_id": "18ce54d4x5t",
      "app_country_code": "US",
      "wide_app_image": "https://pbs.twimg.com/media/DOxqHTWV4AAL7Bk.jpg",
      "image_display_width": "800",
      "app_cta": "INSTALL",
      "card_type": "IMAGE_APP_DOWNLOAD"
    }
  }
}

PUT accounts/:account_id/cards/image_app_download/:card_id

Update the specified image app download card belonging to the current account.

This card is part of our Mobile App Promotion product suite.

Resource URL

https://ads-api.twitter.com/3/accounts/:account_id/cards/image_app_download/: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 image app download card you are operating with in the request.

Type: string

Example: 4hudo

app_country_code
optional

The two-letter ISO code for the country where the app is sold.

Type: string

Example: US

app_cta
optional

The Call-To-Action (CTA) text for the card button.

Type: enum

Possible values: BOOK, CONNECT, INSTALL, OPEN, ORDER, PLAY, SHOP

ipad_app_id
optional

The iPad app ID.

Note: At least one of following is required: ipad_app_id, iphone_app_id, or googleplay_app_id.

Note: When the iphone_app_id is specified and this is not, the iPhone app value will be set.

Note: This can be retrieved from the Apple App Store URL.

Type: long

Example: 333903271

ipad_deep_link
optional

A deep link into the iPad app you’re promoting.

Note: Can only be used if an ipad_app_id has been provided.

Note: When the iphone_deep_link is specified and this is not, the iPhone deep link value will be set.

Type: string

iphone_app_id
optional

The iPhone app ID.

Note: At least one of following is required: ipad_app_id, iphone_app_id, or googleplay_app_id.

Note: This can be retrieved from the Apple App Store URL.

Type: long

Example: 333903271

iphone_deep_link
optional

A deep link into the iPhone app you’re promoting.

Note: Can only be used if an iphone_app_id has been provided.

Type: string

googleplay_app_id
optional

The Google Play application package name.

Note: At least one of following is required: ipad_app_id, iphone_app_id, or googleplay_app_id.

Type: string

Example: com.twitter.android

googleplay_deep_link
optional

A deep link into the Android app you’re promoting.

Note: Can only be used if a googleplay_app_id has been provided.

Type: string

name
optional

The name for the card.

Type: string

Example: image app download card

wide_app_image_media_id
optional

A media_id of an image which will be used instead of the app store’s icon.

This is a write-only field. In the response, the API will provide a Twitter URL for this image.

Note: A minimum image width of 800px and a width:height aspect ratio of either 1:1 or 1.91:1 is required.

Type: long

Example: 882829247282388993

wide_app_image_media_key
optional

A media_key of a media library image which will be used instead of the app store’s icon.

This is a write-only field. In the response, the API will provide a Twitter 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 either 1:1 or 1.91:1 is required.

Type: string

Example: 3_917438348871983104

Example Request

PUT https://ads-api.twitter.com/3/accounts/18ce54d4x5t/cards/image_app_download/59wiu?wide_app_image_media_key=3_917438348871983104

Example Response

{
  "data": {
    "name": "image app download card",
    "image_display_height": "418",
    "preview_url": null,
    "id": "59wiu",
    "account_id": "18ce54d4x5t",
    "wide_app_image": "https://pbs.twimg.com/media/DLtlUUfV4AArIgW.jpg",
    "created_at": "2018-01-27T00:40:39Z",
    "image_display_width": "800",
    "card_uri": "card://957050688416112640",
    "updated_at": "2018-01-27T00:40:39Z",
    "app_cta": "INSTALL",
    "deleted": false,
    "card_type": "IMAGE_APP_DOWNLOAD"
  },
  "request": {
    "params": {
      "wide_app_image_media_key": "3_917438348871983104",
      "image_display_height": "418",
      "account_id": "18ce54d4x5t",
      "card_id": "59wiu",
      "wide_app_image": "https://pbs.twimg.com/media/DLtlUUfV4AArIgW.jpg",
      "image_display_width": "800",
      "card_type": "IMAGE_APP_DOWNLOAD"
    }
  }
}

DELETE accounts/:account_id/cards/image_app_download/:card_id

Permanently delete the specified image app download card belonging to the current account.

Note: This is a hard delete. As a result, it is not possible to retrieve deleted cards.

This card is part of our Mobile App Promotion product suite.

Resource URL

https://ads-api.twitter.com/3/accounts/:account_id/cards/image_app_download/: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 image app download card you are operating with in the request.

Type: string

Example: 4ca39

Example Request

DELETE https://ads-api.twitter.com/3/accounts/18ce54d4x5t/cards/image_app_download/4ca39

Example Response

{
  "data": {
    "name": "img",
    "id": "4ca39",
    "account_id": "18ce54d4x5t",
    "created_at": "2017-06-08T05:18:03Z",
    "updated_at": "2017-08-23T13:20:04Z",
    "deleted": true,
    "card_type": "IMAGE_APP_DOWNLOAD"
  },
  "request": {
    "params": {
      "card_id": "4ca39",
      "card_type": "image_app_download",
      "account_id": "18ce54d4x5t"
    }
  }
}