Media Creatives
media-creatives

Media Creatives

GET accounts/:account_id/media_creatives

Retrieve details for some or all media creatives associated with the current account.

Resource URL

https://ads-api.x.com/12/accounts/:account_id/media_creatives

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

campaign_id
optional

Scope the response to just the media creatives associated with the specified campaign.

Type: string

Example: 8gdx6

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

line_item_ids
optional

Scope the response to just the media creatives associated with the specified line items by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided.

Type: string

Example: 8v7jo

media_creative_ids
optional

Scope the response to just the desired media creatives by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided.

Type: string

Example: 1bzq3

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.x.com/12/accounts/18ce54d4x5t/media_creatives?media_creative_ids=1bzq3

Example Response

{
  "request": {
    "params": {
      "account_id": "18ce54d4x5t",
      "media_creative_ids": [
        "1bzq3"
      ]
    }
  },
  "next_cursor": null,
  "data": [
    {
      "line_item_id": "8v7jo",
      "landing_url": "https://dev.twitter.com",
      "creative_type": "INTERSTITIAL_LANDSCAPE_TABLET",
      "id": "1bzq3",
      "entity_status": "ACTIVE",
      "created_at": "2017-07-05T06:00:42Z",
      "account_media_id": "10miy",
      "updated_at": "2019-01-11T20:21:26Z",
      "approval_status": "ACCEPTED",
      "deleted": false
    }
  ]
}

GET accounts/:account_id/media_creatives/:media_creative_id

Retrieves details for a specific media creative associated with the current account.

Resource URL

https://ads-api.x.com/12/accounts/:account_id/media_creatives/:media_creative_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

media_creative_id
required

A reference to the media creative you are operating with in the request.

Type: string

Example: 43853bhii885

with_deleted
optional

Include deleted results in your request.

Type: boolean

Default: false
Possible values: true, false

Example Request

GET https://ads-api.x.com/12/accounts/18ce54d4x5t/media_creatives/1bzq3

Example Response

{
  "request": {
    "params": {
      "media_creative_id": "1bzq3",
      "account_id": "18ce54d4x5t"
    }
  },
  "data": {
    "line_item_id": "8v7jo",
    "landing_url": "https://dev.twitter.com",
    "creative_type": "INTERSTITIAL_LANDSCAPE_TABLET",
    "id": "1bzq3",
    "entity_status": "ACTIVE",
    "created_at": "2017-07-05T06:00:42Z",
    "account_media_id": "10miy",
    "updated_at": "2019-01-11T20:21:26Z",
    "approval_status": "ACCEPTED",
    "deleted": false
  }
}

POST accounts/:account_id/media_creatives

Associate an account media object with the specified line item.

Use this endpoint to promote in-stream ads (when the account media creative_type is PREROLL) or image ads (such as BANNER or INTERSTITIAL) on the Twitter Audience Platform.

Note: In order to add media assets to the Account Media resource, use the POST accounts/:account_id/media_library endpoint.

Resource URL

https://ads-api.x.com/12/accounts/:account_id/media_creatives

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

account_media_id
required

A reference to the account media entity you are operating with in the request.

Type: string

Example: 10miy

line_item_id
required

A reference to the line item you are operating with in the request.

Type: string

Example: 8v7jo

landing_url
sometimes required

The URL of the website to direct a user to. This should only be used with TAP images (or "display creatives"). This value will be ignored if used with preroll assets. To associate a URL with a preroll asset, use the POST accounts/:account_id/preroll_call_to_actions endpoint.

Note: Required when the line item's objective is set to WEBSITE_CLICKS.

Type: string

Example: https://blog.twitter.com/

Example Request

POST https://ads-api.x.com/12/accounts/18ce54d4x5t/media_creatives?line_item_id=8v7jo&account_media_id=10miy

Example Response

{
  "request": {
    "params": {
      "line_item_id": "8v7jo",
      "account_media_id": "10miy",
      "account_id": "18ce54d4x5t"
    }
  },
  "data": {
    "line_item_id": "8v7jo",
    "landing_url": "https://dev.twitter.com",
    "creative_type": "INTERSTITIAL_LANDSCAPE_TABLET",
    "id": "1bzq3",
    "entity_status": "ACTIVE",
    "created_at": "2017-07-05T06:00:42Z",
    "account_media_id": "10miy",
    "updated_at": "2019-01-11T20:21:26Z",
    "approval_status": "ACCEPTED",
    "deleted": false
  }
}

DELETE accounts/:account_id/media_creatives/:media_creative_id

Delete the specified media creative belonging to the current account.

Resource URL

https://ads-api.x.com/12/accounts/:account_id/media_creatives/:media_creative_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

media_creative_id
required

A reference to the media creative you are operating with in the request.

Type: string

Example: 1bzq3

Example Request

DELETE https://ads-api.x.com/12/accounts/18ce54d4x5t/media_creatives/1bzq3

Example Response

{
  "request": {
    "params": {
      "media_creative_id": "1bzq3",
      "account_id": "18ce54d4x5t"
    }
  },
  "data": {
    "line_item_id": "8v7jo",
    "landing_url": "https://dev.twitter.com",
    "creative_type": "INTERSTITIAL_LANDSCAPE_TABLET",
    "id": "1bzq3",
    "entity_status": "ACTIVE",
    "created_at": "2017-07-05T06:00:42Z",
    "account_media_id": "10miy",
    "updated_at": "2021-04-16T21:02:55Z",
    "approval_status": "ACCEPTED",
    "deleted": true
  }
}