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:
|
campaign_id optional |
Scope the response to just the media creatives associated with the specified campaign. 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:
|
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: |
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: |
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 and
Note: Requests
which include 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:
|
media_creative_id required |
A reference to the media creative 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.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:
|
account_media_id required |
A reference to the account media entity you are operating with in the request. Type: string Example:
|
line_item_id required |
A reference to the line item you are operating with in the request. Type: string Example: |
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 Type: string Example: |
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:
|
media_creative_id required |
A reference to the media creative you are operating with in the request. Type: string Example: |
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
}
}