Account Media
GET accounts/:account_id/account_media¶
Retrieve details for some or all account media associated with the current account.
Resource URL¶
https://ads-api.x.com/12/accounts/:account_id/account_media
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_ids optional |
Scope the response to just the desired account media 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 |
creative_types optional |
Scope the response to just the account media that match the specified creative types. More than one creative type may be specified by comma-separating enum values. Type: enum Possible values:
|
cursor optional |
Specifies a cursor to get the next page of results. See Pagination for more information. 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/account_media?account_media_ids=3wpx
Example Response¶
{
"request": {
"params": {
"account_media_ids": [
"3wpx"
],
"account_id": "18ce54d4x5t"
}
},
"next_cursor": null,
"data": [
{
"video_id": "13_771791717175468032",
"media_url": null,
"creative_type": "PREROLL",
"id": "3wpx",
"created_at": "2016-09-02T19:27:52Z",
"updated_at": "2016-09-02T19:27:52Z",
"deleted": false
}
]
}
GET accounts/:account_id/account_media/:account_media_id¶
Retrieve a specific account media object associated with the current account.
Resource URL¶
https://ads-api.x.com/12/accounts/:account_id/account_media/:account_media_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:
|
account_media_id required |
A reference to the account media 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/account_media/2pnfd
Example Response¶
{
"request": {
"params": {
"account_media_id": "2pnfd",
"account_id": "18ce54d4x5t"
}
},
"data": {
"video_id": null,
"media_url": "https://pbs.twimg.com/ad_img/890749735862026242/Up07zMym?format=jpg&name=orig",
"creative_type": "INTERSTITIAL_LANDSCAPE_TABLET",
"id": "2pnfd",
"created_at": "2017-07-28T01:44:41Z",
"updated_at": "2017-07-28T01:44:41Z",
"deleted": false
}
}
DELETE accounts/:account_id/account_media/:account_media_id¶
Delete the specified account media object belonging to the current account.
Resource URL¶
https://ads-api.x.com/12/accounts/:account_id/account_media/:account_media_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:
|
account_media_id required |
A reference to the account media you are operating with in the request. Type: string Example: |
Example Request¶
DELETE https://ads-api.x.com/12/accounts/18ce54d4x5t/account_media/2pnfd
Example Response¶
{
"data": {
"video_id": null,
"media_url": "https://pbs.twimg.com/ad_img/890749735862026242/Up07zMym?format=jpg&name=orig",
"creative_type": "INTERSTITIAL_LANDSCAPE_TABLET",
"id": "2pnfd",
"created_at": "2017-07-28T01:44:41Z",
"updated_at": "2017-08-25T17:16:26Z",
"deleted": true
},
"request": {
"params": {
"account_id": "18ce54d4x5t",
"account_media_id": "2pnfd"
}
}
}