Zones
Get a list of Zones
get
/zones
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/zones"
-H "Authorization: Bearer {api_key}"
-H "Authorization: Bearer {api_key}"
Example Response
Get a single Zone
get
/zones/{id}
Path Parameters
| id int, required |
The ID of the zone. |
Example Request
curl "https://{yourname}.api.adglare.app/v2/zones/{id}"
-H "Authorization: Bearer {api_key}"
-H "Authorization: Bearer {api_key}"
Example Response
Create a Zone
post
/zones
Request Body (JSON)
| name string, required |
The name of the zone. |
| folder_id int, required |
The folder ID of the zone. |
| ad_format string, required |
The ad format: display, native, vast, redirect |
Example Request
curl "https://{yourname}.api.adglare.app/v2/zones"
-X POST
-H "Content-Type: application/json"
-H "Authorization: Bearer {api_key}"
-d '{
"name": "My Zone",
"folder_id": 123456789,
"ad_format": "display"
}'
-X POST
-H "Content-Type: application/json"
-H "Authorization: Bearer {api_key}"
-d '{
"name": "My Zone",
"folder_id": 123456789,
"ad_format": "display"
}'
Example Response
Update a Zone
put
/zones/{id}
Path Parameters
| id int, required |
The ID of the zone. |
Request Body (JSON)
| name string, required |
The name of the zone. |
| is_active boolean, required |
The name of the zone. |
| folder_id int, required |
The folder ID in which this zone resides. |
| data object, required |
An object containing the settings for this zone. See here below. |
The data object
For ALL zones:
- blocked_creatives (array): list of creative IDs that should be blocked in this zone. Example:
[123456789,987654321]
For Display Ad zones:
- ad_sizes (array): list of ad sizes that can be displayed in this zone. Example:
["300x250","970x250"] - auto_refresh (object): an object as in this example:
{"interval":60,"times":5}(refreshes once per minute for 5 times) - lazy_loading (boolean): true/false
For Native Ad zones:
- log_impression (boolean): true/false
- max_ads (int): [1-25]
For VAST Ad zones:
- vast_version (string): either 2.0, 3.0, 4.0, 4.1, 4.2, 4.3
Example Request
curl "https://{yourname}.api.adglare.app/v2/zones/{id}"
-X PUT
-H "Content-Type: application/json"
-H "Authorization: Bearer {api_key}"
-d '{
"name": "My Zone",
"folder_id": 123456789,
"is_active": true,
"data": {"log_impression": false,"max_ads": 1}
}'
-X PUT
-H "Content-Type: application/json"
-H "Authorization: Bearer {api_key}"
-d '{
"name": "My Zone",
"folder_id": 123456789,
"is_active": true,
"data": {"log_impression": false,"max_ads": 1}
}'
Example Response
Delete a Zone
delete
/zones/{id}
Path Parameters
| id int, required |
The ID of the zone. |
Example Request
curl "https://{yourname}.api.adglare.app/v2/zones/{id}"
-X DELETE
-H "Authorization: Bearer {api_key}"
-X DELETE
-H "Authorization: Bearer {api_key}"
Example Response
