Create up to 50 ads from creator content in existing ad sets; each row is checked and created on its own
POST
/api/public/v1/meta_ads/bulkQueuedWorks now; what it creates waits for the Meta connection to publish.
Operation id bulkCreateMetaAds
Request
curl
curl -X POST "https://creator.growthdept.ai/api/public/v1/meta_ads/bulk" \
-H "Authorization: Bearer gdc_..." \
-H "Content-Type: application/json" \
-d '{"ads":[{"copy_template_id":1024,"creative":{"call_to_action":"string","content_submission_version_id":1024,"description":"string","headline":"string","identity_display":"string","link_url":"https://example.com/p/1","page_id":"string","primary_text":"string","require_instagram":true,"social_post_id":"string","tts_external_id":"string","tts_username":"Example name","url_tags":"https://example.com/p/1"},"launch_state":"paused","meta_ad_account_id":1024,"meta_ad_set_id":1024,"meta_partnership_ad_request_id":1024,"name":"Example name"}]}'Parameters
| Name | In | Type | Notes |
|---|---|---|---|
| organization_id | query | integer |
Request body
| Field | Type | Notes |
|---|---|---|
| ads | array of object | required |
| ads[].[].copy_template_id | integer | |
| ads[].[].creative | object | required |
| ads[].[].creative.call_to_action | string | required |
| ads[].[].creative.content_submission_version_id | integer | |
| ads[].[].creative.description | string | |
| ads[].[].creative.headline | string | required |
| ads[].[].creative.identity_display | string | |
| ads[].[].creative.link_url | string | required |
| ads[].[].creative.page_id | string | |
| ads[].[].creative.primary_text | string | required |
| ads[].[].creative.require_instagram | boolean | |
| ads[].[].creative.social_post_id | string | |
| ads[].[].creative.tts_external_id | string | |
| ads[].[].creative.tts_username | string | |
| ads[].[].creative.url_tags | string | |
| ads[].[].launch_state | string | One of pausedactive |
| ads[].[].meta_ad_account_id | integer | required |
| ads[].[].meta_ad_set_id | integer | required |
| ads[].[].meta_partnership_ad_request_id | integer | |
| ads[].[].name | string | required |
Example
{
"ads": [
{
"copy_template_id": 1024,
"creative": {
"call_to_action": "string",
"content_submission_version_id": 1024,
"description": "string",
"headline": "string",
"identity_display": "string",
"link_url": "https://example.com/p/1",
"page_id": "string",
"primary_text": "string",
"require_instagram": true,
"social_post_id": "string",
"tts_external_id": "string",
"tts_username": "Example name",
"url_tags": "https://example.com/p/1"
},
"launch_state": "paused",
"meta_ad_account_id": 1024,
"meta_ad_set_id": 1024,
"meta_partnership_ad_request_id": 1024,
"name": "Example name"
}
]
}Responses
207Success
| Field | Type | Notes |
|---|---|---|
| results | array of object | |
| results[].[].data | object | |
| results[].[].data.meta_ad_id | integer | |
| results[].[].data.state | string | |
| results[].[].data.status | string | |
| results[].[].error | object | |
| results[].[].error.code | string | |
| results[].[].error.details | object | |
| results[].[].error.message | string | |
| results[].[].error.user_message | string | |
| results[].[].index | integer | |
| results[].[].success | boolean | |
| success | boolean | |
| summary | object | |
| summary.failed | integer | |
| summary.succeeded | integer | |
| summary.total | integer |
Example
{
"results": [
{
"data": {
"meta_ad_id": 1024,
"state": "string",
"status": "string"
},
"error": {
"code": "MAYA15",
"details": {},
"message": "string",
"user_message": "string"
},
"index": 3,
"success": true
}
],
"success": true,
"summary": {
"failed": 3,
"succeeded": 3,
"total": 3
}
}Errors: 401403404422429with an error and usually a message. See errors.
Example values are made up from each field's type and name.