Curator API: Create an Ad
POST https://api.curator.io/v1.3/ads adds an ad to one of your feeds. The request needs your API key, and your plan must include API access. Only HTTPS is supported.
Authentication
Send your Curator API key (find it in the Curator Dashboard) in one of three ways: as a query string (?api_key=API_KEY), as a Basic auth header with the API key as the username, or as a Bearer token (Authorization: Bearer API_KEY, with Bearer capitalised). You can only add ads to feeds in the account the key belongs to.
Example request
curl -X POST "https://api.curator.io/v1.3/ads" \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{"feed_id": "FEED_ID", "name": "Summer sale", "text": "20% off this week", "status": "active", "click_action": "goto-url", "url": "https://example.com/sale", "position_start": 3, "position_repeats": false}'Parameters
Send parameters as JSON or form fields.
Parameter | Description |
|---|---|
| The API ID of the feed to show the ad in. |
| The ad's internal name. Only the first 50 characters are kept. |
| The ad's text. |
|
|
|
|
| The link to open. Required when |
| The position in the feed where the ad first appears, as a whole number. Each of your ads needs a different |
| Whether the ad repeats: |
| How many posts apart the ad repeats. Required when |
| The ad's title. Only the first 50 characters are kept. |
|
|
| Image URL ending in |
| Video URL ending in |
| Image size in pixels. |
| The network to style the ad as. Default |
Response
A 200 response with the new ad (described in Curator API: Get Ads) in data. The feed's cached responses are cleared, so the ad shows up straight away.
Errors
Status | When | Body |
|---|---|---|
401 | The API key is missing or not valid. |
|
403 | Your plan does not include API access. |
|
422 | A required parameter is missing or not allowed, |
|
429 | When rate limiting is enabled, more than 60 requests per minute. |
|