Skip to main content
Use this endpoint to retrieve available ad campaigns for a specific placement in your application. You pass targeting parameters — placement, location, and device type — and the API returns a list of campaigns that match. Call this endpoint server-side before rendering an ad slot so you can select and display the right campaign for the current user context.

Endpoint

Request example

Query parameters

string
required
The target placement ID that identifies where the ad will appear in your layout. Examples: header_banner, article_inline, sidebar_top. See Ad Placements for the full list of supported values.
integer
default:"10"
The number of campaigns to return. Defaults to 10. Maximum value is 100. Use a higher limit to batch-fetch campaigns and reduce the number of API calls your integration makes.
string
The ISO 3166-1 alpha-2 country code representing the user’s geographic location. Examples: US, GB, FR. When provided, the API filters campaigns to those targeted at the specified country.
string
The device type of the current user. Accepted values: mobile, desktop, tablet. When provided, the API filters campaigns to those targeted at the specified device type.

Response

200 — Success

The response includes a status field, a data array of campaign objects, and a count of returned campaigns.
string
Always "success" for a successful response.
integer
The number of campaign objects returned in the data array.
array
Array of campaign objects matching the requested placement and targeting parameters.

400 — Bad Request

Returned when a required parameter is missing or a parameter value is invalid.

401 — Unauthorized

Returned when the Authorization header is missing or the API key is invalid.