Ads Management API
Create and manage interstitial advertisements/banners.
1. List Ads
List all active advertisements for your organization.
Endpoint: GET /v1/ads
2. Create an Ad
Create a new advertisement. Requires multipart/form-data for image uploads.
Endpoint: POST /v1/ads
Form Fields
| Field | Type | Required | Description |
|---|---|---|---|
title | String | Yes | Title of the advertisement. |
linkUrl | String | Yes | Destination URL when ad is clicked. |
image | File | Yes | Desktop image file. |
mobileImage | File | No | Mobile-specific image file. |
skipTimer | Integer | No | Seconds before "Skip Ad" appears (Default: 6). |
Example
curl -X POST https://qubitl.ink/api/v1/ads \
-H "x-api-key: sk_live_your_key_here" \
-F "title=My Ad" \
-F "linkUrl=https://example.com" \
-F "image=@/path/to/image.jpg"
3. Assign Ad to Link
To show an ad on a link, include the adId when creating the link.
curl -X POST https://qubitl.ink/api/v1/shorten \
-H "x-api-key: sk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"originalURL": "https://google.com",
"enableAds": true,
"adId": "AD_ID_FROM_PREVIOUS_STEP"
}'