Campaigns
Get a list of Campaigns
get
/campaigns
Query Parameters
| limit int |
The number of items returned in the response. Defaults to 100. |
| offset int |
The number of items to skip before starting to return results. Defaults to 0. |
Example Request
curl "https://{yourname}.api.adglare.app/v2/campaigns"
-H "Authorization: Bearer {api_key}"
-H "Authorization: Bearer {api_key}"
Example Response
Get a single Campaign
get
/campaigns/{id}
Path Parameters
| id int, required |
The ID of the campaign. |
Example Request
curl "https://{yourname}.api.adglare.app/v2/campaigns/{id}"
-H "Authorization: Bearer {api_key}"
-H "Authorization: Bearer {api_key}"
Example Response
Create a Campaign
post
/campaigns
Request Body (JSON)
| name string, required |
The name of the campaign. |
| folder_id int, required |
The folder ID of the campaign. |
| ad_format string, required |
The ad format: display, native, vast, redirect |
Example Request
curl "https://{yourname}.api.adglare.app/v2/campaigns"
-X POST
-H "Content-Type: application/json"
-H "Authorization: Bearer {api_key}"
-d '{
"name": "My Campaign",
"folder_id": 123456789,
"ad_format": "display"
}'
-X POST
-H "Content-Type: application/json"
-H "Authorization: Bearer {api_key}"
-d '{
"name": "My Campaign",
"folder_id": 123456789,
"ad_format": "display"
}'
Example Response
Update a Campaign
put
/campaigns/{id}
Path Parameters
| id int, required |
The ID of the campaign. |
Request Body (JSON)
| name string, required |
The name of the campaign. |
| is_active boolean, required |
The name of the campaign. |
| folder_id int, required |
The folder ID in which this campaign resides. |
| tier int, required |
The campaign tier [1-10], used for waterfalling when choosing an eligible campaign. |
| weight int, required |
The weight of this campaign [1-100]. |
| zone_ids array, required |
An array with zone IDs to which this campaign is assigned. |
| conversion_tracker_id int |
The conversion tracker ID uses for logging conversions on this campaign. |
| advertiser_id int |
The advertiser ID for this campaign. |
| delivery object |
An object with start/end dates. See here below. |
| pricing object |
An object with pricing data. See here below. |
| pacing object |
An object with pacing data. See here below. |
The delivery object
- start (int): The start date as a unix timestamp. Set to 0 to start immediately.
- end (int): The end date as a unix timestamp. Set to 0 to run infinitely.
The pricing object
- model (string): Either
CPMorCPC. - value (float): The value associated with this pricing model.
The pacing object
- event (string): Either
impressions,clicksorconversions. - period (string): Either
due_dateorday. - speed (string): Either
speadorasap. - value (int): The amount of events to pace of the the indicated period.
Example Request
curl "https://{yourname}.api.adglare.app/v2/campaigns/{id}"
-X PUT
-H "Content-Type: application/json"
-H "Authorization: Bearer {api_key}"
-d '{
"name": "My Campaign",
"folder_id": 123456789,
"is_active": true,
"tier": 2,
"weight": 60,
"zone_ids": [123456789,987654321],
"conversion_tracker_id": 123456789,
"advertiser_id": 123456789,
"delivery": {"start": 1763627752, "end": 0},
"pricing": {"model": "CPM", "value": 5.00},
"pacing": {"event": "impressions", "period": "day", "speed": "spread", "value": 10000}
}'
-X PUT
-H "Content-Type: application/json"
-H "Authorization: Bearer {api_key}"
-d '{
"name": "My Campaign",
"folder_id": 123456789,
"is_active": true,
"tier": 2,
"weight": 60,
"zone_ids": [123456789,987654321],
"conversion_tracker_id": 123456789,
"advertiser_id": 123456789,
"delivery": {"start": 1763627752, "end": 0},
"pricing": {"model": "CPM", "value": 5.00},
"pacing": {"event": "impressions", "period": "day", "speed": "spread", "value": 10000}
}'
Example Response
Delete a Campaign
delete
/campaigns/{id}
Path Parameters
| id int, required |
The ID of the campaign. |
Example Request
curl "https://{yourname}.api.adglare.app/v2/campaigns/{id}"
-X DELETE
-H "Authorization: Bearer {api_key}"
-X DELETE
-H "Authorization: Bearer {api_key}"
Example Response
