Postman Examples
Overview
This guide provides step-by-step instructions for authenticating and creating campaigns via the ExoClick API using Postman. All examples specify the required request type, headers, and body format for each endpoint.
Authentication (Login)
You can authenticate using your account credentials or a permanent API Token. Both return a temporary Bearer Token used for all subsequent requests.
A - Login with Username & Password
Request Type: POST URL: https://api.exoclick.com/v2/login
Headers:
Content-Type: application/json
Body (raw JSON):
{
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD"
}
B - Login with API Token
Use this if you generated a token in your ExoClick Dashboard (Profile > API Tokens).
Request Type: POST URL: https://api.exoclick.com/v2/login
Headers:
Content-Type: application/json
Body (raw JSON):
{
"api_token": "YOUR_API_TOKEN"
}
300x250 Banner Campaign Creation Flow
Follow these steps in exact order. Note the transition from JSON to Form-Data in the final steps.
Step 1: Create Landing Page URL (Library)
Registers your destination URL. Standard banners require an id_library_url.
Request Type: POST URL: https://api.exoclick.com/v2/library/url
Headers:
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
Body (raw JSON):
{
"url": "https://your-landing-page.com"
}
Result: Save the returned "id" (e.g., 6512406).
Step 2: Upload Image (Library)
Registers your creative asset. The image must be exactly 300x250.
Request Type: POST URL: https://api.exoclick.com/v2/library/file
Headers:
Authorization: Bearer YOUR_TOKEN
Body (form-data):
| Key | Type | Value |
|---|---|---|
file | File | Select your image file (300x250) |
type | Text | image |
Result: Save the returned "id" (e.g., 6884966).
Step 3: Create Campaign Shell
Sets targeting, budget, and the img_banner template.
Request Type: POST URL: https://api.exoclick.com/v2/campaigns
Headers:
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
Body (raw JSON):
{
"name": "Banner 300x250 Production",
"status": 0,
"advertiser_ad_type": 0,
"media_storage_template": "img_banner",
"size": "300x250",
"categories": {
"type": "targeted",
"elements": [97, 98, 99]
},
"countries": {
"type": "targeted",
"elements": [
{
"country": "USA",
"regions": [0]
}
]
},
"pricing": {
"model": 4,
"price": 300
},
"start_date": "2026-03-02",
"daily_limit_type": 1,
"max_daily_budget": 2000,
"budget_delivery_mode": 1,
"run_on_responsive_zones": 1
}
Result: Save the returned "id" (e.g., 8140060).
Step 4: Add the Variation
Links the URL (Step 1) and Image (Step 2) to the Campaign (Step 3).
Request Type: POST URL: https://api.exoclick.com/v2/campaigns/8140060/variation (Replace 8140060 with your actual campaign ID from Step 3)
Headers:
Authorization: Bearer YOUR_TOKEN
Body (form-data):
| Key | Type | Value |
|---|---|---|
id_library_url | Text | 6512406 (from Step 1) |
id_library_file | Text | 6884966 (from Step 2) |
active | Text | 1 |
All IDs returned at each step must be saved and used in subsequent requests. Remember to replace YOUR_TOKEN, file paths, and IDs with your actual values.