API Overview
Management APIs
The AdGlare Management API gives you full programmatic control over your ad server. It's designed for teams who want to automate their entire AdOps workflow — from creating campaigns and uploading creatives to managing inventory and generating performance reports.
Virtually anything you can do in the AdGlare UI, you can do through this API. The interface itself is built directly on top of these endpoints, so you get the same power, structure, and flexibility the platform uses internally.
Base URL
The base URL for all requests can be found here at the right. Replace {yourname} with the name found in the URL of your AdGlare app. Example:https://mycompany.api.adglare.app/v2
Authentication
To authenticate API requests, you must include an API key in the headers of each request. This key is unique to your account and allows secure access to the API.
Each request should include the Authorization: Bearer {api_key} header as in the example at the right.
To creata an API key, go to Settings => API Keys inside your AdGlare app.
Error Handling
In case of an error, the API response will include a JSON object providing more details about the error. See the example at the right.
The API uses standard HTTP status codes to indicate the success or failure of a request. In the event of an error, the API will return an appropriate HTTP status code along with a detailed error message in the response body.
Below are the HTTP status codes you may encounter:
200 OK— The request was successful, and the response contains the expected data.400 Bad Request— The request was invalid or missing required parameters. Check the request format and ensure all required fields are included.401 Unauthorized— The API key is missing or invalid. Ensure you've included a valid API Key in the headers of your request.403 Forbidden— You do not have permission to access the requested resource. Verify your access rights or contact support.404 Not Found— The requested resource does not exist. Check the endpoint URL and resource identifiers.500 Internal Server Error— An error occurred on the server. This is likely a temporary issue, and retrying the request may resolve it. If the problem persists, contact support.
Scoping and Permissions
To fine-tune which API key can do what, you can set the allowed scopes (endpoints), HTTP methods (GET, POST, etc) and white-label the IP addresses of the servers allowed to connect to your API.
This allows you to create multiple API keys with different roles. For example, a management API key with full access, and a read-only API key that you use in your custom-built reporting tool.
Example Request
-H "Authorization: Bearer {api_key}"
