POST request to the /act_<AD_ACCOUNT_ID>/adcreatives endpoint. The important parameters include the name of the ad, message, image or video URLs, call_to_action (CTA) buttons, and destination URLs.curl -X POST \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/adcreatives \
-F 'name=Sample Creative' \
-F 'object_story_spec={
"page_id": "YOUR_PAGE_ID",
"link_data": {
"message": "Check out our new product!",
"link": "https://www.example.com/product",
"caption": "Our New Product",
"picture": "https://www.example.com/image.jpg",
"call_to_action": {
"type": "SHOP_NOW"
}
}
}' \
-F 'access_token=<ACCESS_TOKEN>'
object_story_spec specifies the format being used for the ad story and includes linking details for a link ad, along with associated metadata.| Name | Description |
|---|---|
name | The name of the ad. |
object_story_spec | The specifications of the ad creative. |