โจ Create a Campaign
Creates a new campaign.๐ค Request Example
curl -X POST https://betaapi.audiohook.com/v2/companies/:companyUUID/campaigns \
-H "Authorization: Bearer ${API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"request_headers": [
{ "name": "X-Request-Header", "value": "Header value" }
],
"body": {
"draft": false,
"campaign_type": 1,
"name": "Test campaign Docs",
"pacing": 5,
"status": false,
"budget_type": 1,
"budget_value": 1,
"start_date": "2023-02-15",
"end_date": "2023-02-16",
"advertiser_id": "test-advertiser-uuid"
}
}'
๐ HTTP Request
POST /v2/companies/:companyUUID/campaigns
๐งพ Body Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| draft | โ | boolean | Draft mode enabled or not. |
| campaign_type | โ | int | Type of campaign: 1 - Impression, 2 - CPA. |
| name | โ | string | Name of the campaign. |
| pacing | โ | int | Pacing strategy: 1 to 6. |
| status | โ | boolean | If the campaign is active. |
| budget_type | โ | int | Budget type: 1 - Dollars, 2 - Impressions. |
| budget_value | โ | int | Budget amount. |
| start_date | โ | string | Start date (format: Y-M-D). |
| end_date | โ | string | End date (format: Y-M-D). |
| advertiser_id | โ | string | UUID of advertiser. |
| audiences | โ | array | Selected audience list. |
| dayparting_enabled | โ | boolean | Whether dayparting is enabled. |
| dayparting | โ | array | Dayparting info. |
| geo_ui | โ | array | Geographic targeting list. |
| google_places | โ | array | Google Places API raw info. |
| devices_enabled | โ | boolean | Whether device targeting is enabled. |
| brand_safety_filter | โ | object | Brand safety preferences. |
| creatives | โ | array | Creative weights or priorities. |
| auto_optimized | โ | boolean | Auto optimization flag. |
| conversion_type | โ | int | Conversion type. |
| conversion_value | โ | float | Conversion value. |
| goal_optimization | โ | string | Optimization goal: no, partial, full. |

