Skip to main content

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

FieldTypeRequiredDescription
titleStringYesTitle of the advertisement.
linkUrlStringYesDestination URL when ad is clicked.
imageFileYesDesktop image file.
mobileImageFileNoMobile-specific image file.
skipTimerIntegerNoSeconds 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"

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"
}'