← Back to AiduPlay

Developer API

REST API — v1

The AiduPlay API lets you programmatically manage campaigns, upload creatives, retrieve analytics, and integrate advertising capabilities into your own applications.

Getting Started

The AiduPlay REST API is accessible at:

Base URL: https://api.aiduplay.com/v1

All requests and responses use JSON. Include the Content-Type: application/json header for POST/PATCH requests.

Authentication

Authenticated endpoints require a Bearer token obtained from the advertiser or creator portal under Settings → API Keys.

curl https://api.aiduplay.com/v1/campaigns \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
Never expose your API key in client-side code or public repositories. Rotate keys immediately if compromised.

Rate Limits

PlanRequests / minuteRequests / day
Free6010,000
Starter300100,000
Pro1,0001,000,000
EnterpriseCustomCustom

Rate limit headers are returned on every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.

Error Handling

Errors return standard HTTP status codes and a JSON body:

{
  "error": {
    "code": "CAMPAIGN_NOT_FOUND",
    "message": "No campaign with ID 'abc123' found for this account.",
    "status": 404
  }
}
400Bad Request — invalid or missing parameters
401Unauthorized — missing or invalid API key
403Forbidden — valid key but insufficient permissions
404Not Found — resource does not exist
422Unprocessable — validation failed
429Too Many Requests — rate limit exceeded
500Internal Server Error — try again later

Campaigns

GET
https://api.aiduplay.com/v1/campaigns

List all campaigns for the authenticated advertiser

POST
https://api.aiduplay.com/v1/campaigns

Create a new ad campaign

GET
https://api.aiduplay.com/v1/campaigns/{id}

Retrieve a single campaign by ID

PATCH
https://api.aiduplay.com/v1/campaigns/{id}

Update campaign settings or status

DELETE
https://api.aiduplay.com/v1/campaigns/{id}

Archive a campaign

Ads

GET
https://api.aiduplay.com/v1/ads

List all ad creatives

POST
https://api.aiduplay.com/v1/ads

Upload a new ad creative

GET
https://api.aiduplay.com/v1/ads/{id}

Retrieve an ad creative

DELETE
https://api.aiduplay.com/v1/ads/{id}

Delete an ad creative

Analytics

GET
https://api.aiduplay.com/v1/analytics/campaigns/{id}

Campaign performance metrics (impressions, views, clicks, CPV)

GET
https://api.aiduplay.com/v1/analytics/campaigns/{id}/daily

Day-by-day breakdown for a campaign

GET
https://api.aiduplay.com/v1/analytics/audience

Audience demographic breakdown across all campaigns

Creators

GET
https://api.aiduplay.com/v1/creators

Browse verified creator profiles (public)

GET
https://api.aiduplay.com/v1/creators/{id}

Retrieve creator profile and channel stats

GET
https://api.aiduplay.com/v1/creators/me/earnings

Authenticated creator earnings summary

Videos

GET
https://api.aiduplay.com/v1/videos

List public videos (supports ?q= search, ?category= filter)

GET
https://api.aiduplay.com/v1/videos/{id}

Retrieve video metadata

POST
https://api.aiduplay.com/v1/videos

Upload a video (multipart/form-data)

Webhooks

GET
https://api.aiduplay.com/v1/webhooks

List registered webhook endpoints

POST
https://api.aiduplay.com/v1/webhooks

Register a new webhook endpoint

DELETE
https://api.aiduplay.com/v1/webhooks/{id}

Delete a webhook endpoint

Webhooks

Subscribe to real-time events by registering a webhook URL. AiduPlay will send a POST request to your endpoint when events occur.

Available events

campaign.createdcampaign.startedcampaign.pausedcampaign.completedcampaign.budget_exhaustedad.approvedad.rejectedcreator.payout.processedimpression.milestone
// Example webhook payload
{
  "event": "campaign.completed",
  "created_at": "2026-04-02T10:30:00Z",
  "data": {
    "campaign_id": "cmp_abc123",
    "total_views": 45231,
    "total_spend_inr": 22615.50,
    "status": "completed"
  }
}

SDKs & Libraries

Official SDKs are in active development. Community libraries and direct REST usage are supported now.

📦

JavaScript / TypeScript

Use REST API

🐍

Python

Use REST API

🌐

REST

Available now

Need help?

Our developer support team is available via email and our Discord community.