As of May 3, we wanted to share three (3) updates to the Ads API.
The first two listed below relate to identifying the type of creative when pulling from the media_creatives and account_media endpoints, respectively.
The third update is a change related to how we report on the withheld_in_countries field when no value exists.
Creative Type Parameters for media_creatives and account_media
-
media_creatives endpoint update: We will add
creative_type to the response returned from the media_creatives endpoint.
- Available on version 8 and version 9 of the Ads API
- The media_creatives endpoint allows you to retrieve information about pre-roll ads and Twitter Audience Platform display ads.
-
account_media endpoint update: We will add a
creative_types parameter to the account_media endpoint. The account_media endpoint today already returns the creative_type in the response; however, with this update, it is possible to call this endpoint and only get media that is of a specified creative_types. Multiple values can be specified (example below).
- Available on version 8 and version 9 of the Ads API
- The account_media endpoint allows developers to retrieve media details about pre-roll videos and display images.
- Example:
twurl -H ads-api.twitter.com "/9/accounts/18ce54d4x5t/account_media?creative_types=BANNER,PREROLL"
Both of these updates allow you to view the type of creative in an account with more granularity. The possible values that exist for creative_type today are: BANNER, INTERSTITIAL, MEDIUM_RECTANGLE, BANNER_TABLET, INTERSTITIAL_LANDSCAPE, INTERSTITIAL_TABLET, INTERSTITIAL_LANDSCAPE_TABLET, PREROLL, VAST_PREROLL.
What can you do with this new information? It depends on the update.
-
For update 1 (media_creatives), you could offer advertisers the ability to preview their creative down to the line item level by identifying the
creative_type.
-
For update 2 (account_media), you could quickly fetch a specific type of creative - such as pre-roll media - without having to spend time to filter through all results pulled.
Withheld_in_countries Field Update
- Moving forward, we will always return a
withheld_in_countries field in the user portion of a Tweet response, even if the field is empty.
- Previously, we only returned the
withheld_in_countries field when the field was non-empty.
Learn more
-
media_creatives endpoint: More information on this endpoint can be found here.
-
account_media endpoint: More information on this endpoint can be found here.
-
withheld_in_countries field: More information on this field can be found here.
Please let us know if you have any questions.
Twitter Ads API team