API Reference
Create an ad creative
/v27.0/act_{ad_account_id}/adcreativeshttps://meta-ads.mimicr.dev · provider: https://graph.facebook.comCreates a creative from an object_story_spec: the Page post with link_data (image) or video_data and a call to action.
- Click-to-WhatsApp:
linkhttps://api.whatsapp.com/sendandcall_to_action {"type":"WHATSAPP_MESSAGE","value":{"app_destination":"WHATSAPP"}}; optionalpage_welcome_message. - Lead ads:
linkhttp://fb.me/andcall_to_action {type: SIGN_UP|LEARN_MORE|…, value: {lead_gen_form_id}}; the form must belong topage_id. - Website:
call_to_action {type: LEARN_MORE|ORDER_NOW|…, value: {link}}.
Creatives are immutable except name and status. Requires ads_management and a role on the ad account. Disabled or closed accounts (status 2, 101) answer (#200) The ad account is disabled. page_id must be a Page the user can advertise on.
In Mimicr, [falha-simulada] in the creative text returns a transient 500 and creates nothing.
Authorization
Bearer token in the Authorization: Bearer <token> header. See Authentication.
Path parameters
ID of the ad account (the path is act_{ad_account_id}).
"100539998049706"Body
application/x-www-form-urlencodedName of the creative.
The post: page_id plus link_data or video_data.
Show child attributes
ID of the Page the post is published as. Required; the user must be able to advertise on it.
A link post (image ad).
Show child attributes
Destination URL. https://api.whatsapp.com/send for click-to-WhatsApp; http://fb.me/ for lead ads.
Primary text of the ad.
Headline.
Link description.
URL of the image. Must be http(s). In Mimicr a URL containing nao-baixa can't be downloaded (3858258).
Hash of an image in the account library. Accepted as an opaque string (the image library is not simulated).
The call-to-action button: {type, value}.
Show child attributes
Type of the button: WHATSAPP_MESSAGE, LEARN_MORE, ORDER_NOW, SIGN_UP, APPLY_NOW, …
105 values
ADD_TO_CARTAPPLY_NOWASK_ABOUT_SERVICESASK_A_QUESTIONASK_FOR_MORE_INFOASK_USAUDIO_CALLBOOK_A_CONSULTATIONBOOK_NOWBOOK_TRAVELBROWSE_SHOPBUYBUY_ACTIVITY_TICKETSBUY_NOWBUY_TICKETSBUY_VIA_MESSAGECALLCALL_MECALL_NOWCHAT_NOWCHAT_WITH_USCONFIRMCONTACTCONTACT_USDONATEDONATE_NOWDOWNLOADEVENT_RSVPFIND_A_GROUPFIND_OUT_MOREFIND_YOUR_GROUPSFOLLOW_NEWS_STORYLINEFOLLOW_PAGEFOLLOW_USERGET_A_QUOTEGET_DETAILSGET_DIRECTIONSGET_IN_TOUCHGET_OFFERGET_OFFER_VIEWGET_PROMOTIONSGET_QUOTEGET_SHOWTIMESGET_STARTEDINQUIRE_NOWINSTALL_APPINSTALL_MOBILE_APPJOIN_CHANNELJOIN_LIVE_VIDEOLEARN_MORELIKE_PAGELISTEN_MUSICLISTEN_NOWMAKE_AN_APPOINTMENTMESSAGE_PAGEMOBILE_DOWNLOADNO_BUTTONOPEN_INSTANT_APPOPEN_LINKORDER_NOWPAY_TO_ACCESSPLAY_GAMEPLAY_GAME_ON_FACEBOOKPURCHASE_GIFT_CARDSRAISE_MONEYRECORD_NOWREFER_FRIENDSREQUEST_TIMESAY_THANKSSEE_MORESEE_SHOPSELL_NOWSEND_A_GIFTSEND_GIFT_MONEYSEND_UPDATESSHARESHOP_NOWSHOP_WITH_AISIGN_UPSOTTO_SUBSCRIBESTART_A_CHATSTART_ORDERSTREAM_NOWSUBSCRIBESWIPE_UP_PRODUCTSWIPE_UP_SHOPTRY_DEMOTRY_ON_WITH_AIUPDATE_APPUSE_APPUSE_MOBILE_APPVIDEO_ANNOTATIONVIDEO_CALLVIEW_CARTVIEW_CHANNELVIEW_IN_CARTVIEW_PRODUCTVISIT_PAGES_FEEDVISIT_WEBSITEWATCH_LIVE_VIDEOWATCH_MOREWATCH_NOWWATCH_VIDEOWHATSAPP_MESSAGEWOODHENGE_SUPPORTButton target: {app_destination: "WHATSAPP"}, {link} or {lead_gen_form_id}.
Show child attributes
WHATSAPP for click-to-WhatsApp ads.
Destination URL of the button.
ID of the lead form of a lead ad. The form must belong to the creative's Page.
Greeting of click-to-WhatsApp ads (VISUAL_EDITOR JSON). Its text becomes referral.welcome_message.text.
Carousel cards.
A video post.
Show child attributes
ID of a video of the account in ready state.
Primary text of the ad.
Headline of the video ad.
Thumbnail URL. A thumbnail (image_url or image_hash) is required.
Hash of an image in the account library. Accepted as an opaque string (the image library is not simulated).
The call-to-action button: {type, value}.
Show child attributes
Type of the button: WHATSAPP_MESSAGE, LEARN_MORE, ORDER_NOW, SIGN_UP, APPLY_NOW, …
105 values
ADD_TO_CARTAPPLY_NOWASK_ABOUT_SERVICESASK_A_QUESTIONASK_FOR_MORE_INFOASK_USAUDIO_CALLBOOK_A_CONSULTATIONBOOK_NOWBOOK_TRAVELBROWSE_SHOPBUYBUY_ACTIVITY_TICKETSBUY_NOWBUY_TICKETSBUY_VIA_MESSAGECALLCALL_MECALL_NOWCHAT_NOWCHAT_WITH_USCONFIRMCONTACTCONTACT_USDONATEDONATE_NOWDOWNLOADEVENT_RSVPFIND_A_GROUPFIND_OUT_MOREFIND_YOUR_GROUPSFOLLOW_NEWS_STORYLINEFOLLOW_PAGEFOLLOW_USERGET_A_QUOTEGET_DETAILSGET_DIRECTIONSGET_IN_TOUCHGET_OFFERGET_OFFER_VIEWGET_PROMOTIONSGET_QUOTEGET_SHOWTIMESGET_STARTEDINQUIRE_NOWINSTALL_APPINSTALL_MOBILE_APPJOIN_CHANNELJOIN_LIVE_VIDEOLEARN_MORELIKE_PAGELISTEN_MUSICLISTEN_NOWMAKE_AN_APPOINTMENTMESSAGE_PAGEMOBILE_DOWNLOADNO_BUTTONOPEN_INSTANT_APPOPEN_LINKORDER_NOWPAY_TO_ACCESSPLAY_GAMEPLAY_GAME_ON_FACEBOOKPURCHASE_GIFT_CARDSRAISE_MONEYRECORD_NOWREFER_FRIENDSREQUEST_TIMESAY_THANKSSEE_MORESEE_SHOPSELL_NOWSEND_A_GIFTSEND_GIFT_MONEYSEND_UPDATESSHARESHOP_NOWSHOP_WITH_AISIGN_UPSOTTO_SUBSCRIBESTART_A_CHATSTART_ORDERSTREAM_NOWSUBSCRIBESWIPE_UP_PRODUCTSWIPE_UP_SHOPTRY_DEMOTRY_ON_WITH_AIUPDATE_APPUSE_APPUSE_MOBILE_APPVIDEO_ANNOTATIONVIDEO_CALLVIEW_CARTVIEW_CHANNELVIEW_IN_CARTVIEW_PRODUCTVISIT_PAGES_FEEDVISIT_WEBSITEWATCH_LIVE_VIDEOWATCH_MOREWATCH_NOWWATCH_VIDEOWHATSAPP_MESSAGEWOODHENGE_SUPPORTButton target: {app_destination: "WHATSAPP"}, {link} or {lead_gen_form_id}.
Show child attributes
WHATSAPP for click-to-WhatsApp ads.
Destination URL of the button.
ID of the lead form of a lead ad. The form must belong to the creative's Page.
A photo post.
A text post.
Instagram account the ad runs as.
An existing post, {page_id}_{post_id}, instead of object_story_spec.
Query string appended to the link.
Creative enhancements (stored only).
Stored.
NONEPOLITICALPOLITICAL_WITH_DIGITALLY_CREATED_MEDIA["validate_only"] runs every validation and returns {"success":true} without writing.
validate_onlyResponses
200The creative.
ID of the new object.
400Error in the Graph envelope: 100/1373054 unparseable call to action, 100/3858258 image couldn't be downloaded, 100/1885252 video not ready, 200 no access to the Page.
Show child attributes
Description of the error.
"(#100) The parameter special_ad_categories is required"OAuthException for most codes (the Marketing API uses it for validation too), GraphMethodException for unknown objects, FacebookApiException for transient errors. In Mimicr, routes outside the integration core answer MimicrNotSimulated with HTTP 501.
"OAuthException"Error code (100 invalid parameter, 190 invalid token, 200 permission, 2635 deprecated version, 613/17/80004 rate limits, …).
100Error subcode with more detail (1885272 budget too low, 463 token expired, …).
1885272Whether retrying the same request may succeed. Present on every Marketing API error; true for codes 1 and 2.
Title of the error, to show to people.
Message of the error, to show to people.
Extra data. blame_field_specs lists the params that caused a validation error.
Show child attributes
Internal support identifier of the request.
"AbCdEf12345"500Transient error: code 2 with is_transient: true. Retry later.
Show child attributes
Description of the error.
"(#100) The parameter special_ad_categories is required"OAuthException for most codes (the Marketing API uses it for validation too), GraphMethodException for unknown objects, FacebookApiException for transient errors. In Mimicr, routes outside the integration core answer MimicrNotSimulated with HTTP 501.
"OAuthException"Error code (100 invalid parameter, 190 invalid token, 200 permission, 2635 deprecated version, 613/17/80004 rate limits, …).
100Error subcode with more detail (1885272 budget too low, 463 token expired, …).
1885272Whether retrying the same request may succeed. Present on every Marketing API error; true for codes 1 and 2.
Title of the error, to show to people.
Message of the error, to show to people.
Extra data. blame_field_specs lists the params that caused a validation error.
Show child attributes
Internal support identifier of the request.
"AbCdEf12345"