API Documentation

Use the FastAds API to list projects, create creatives, manage context, and more. Authenticate with an API key via the Authorization header.

Authentication

Base URL & auth

All API requests require authentication. Use an API key in the Authorization header. Create keys in Dashboard > Account > API.

Show request & response

Request

curl -X GET "https://www.adlight.app/api/projects" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "projects": [
    {
      "id": "proj_abc123",
      "name": "My Campaign",
      "slug": "my-campaign",
      "status": "active",
      "createdAt": "2025-01-15T10:00:00Z",
      "updatedAt": "2025-01-15T10:00:00Z"
    }
  ]
}

Projects

GET/api/projects

List all projects for the current user.

Show request & response

Request

curl -X GET "https://www.adlight.app/api/projects" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "projects": [
    {
      "id": "proj_abc123",
      "name": "Summer Campaign",
      "description": "Q3 2025 launch",
      "slug": "summer-campaign",
      "status": "active",
      "createdAt": "2025-01-15T10:00:00Z",
      "updatedAt": "2025-01-15T10:00:00Z"
    }
  ]
}
POST/api/projects

Create a new project.

Body schema
{
  "name": "string (required)",
  "description": "string (optional)"
}
Show request & response

Request

curl -X POST "https://www.adlight.app/api/projects" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "New Campaign", "description": "Brand launch"}'

Response

{
  "project": {
    "id": "proj_xyz789",
    "name": "New Campaign",
    "description": "Brand launch",
    "slug": "new-campaign",
    "status": "active",
    "createdAt": "2025-01-15T10:00:00Z",
    "updatedAt": "2025-01-15T10:00:00Z"
  }
}
GET/api/projects/[projectId]

Get a single project by ID.

Path params: projectId

Show request & response

Request

curl -X GET "https://www.adlight.app/api/projects/proj_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "project": {
    "id": "proj_abc123",
    "name": "Summer Campaign",
    "description": "Q3 2025 launch",
    "slug": "summer-campaign",
    "status": "active",
    "createdAt": "2025-01-15T10:00:00Z",
    "updatedAt": "2025-01-15T10:00:00Z"
  }
}
PATCH/api/projects/[projectId]

Update a project (name, description, or status).

Path params: projectId

Body schema
{
  "name": "string (optional)",
  "description": "string (optional)",
  "status": "\"active\" | \"archived\" (optional)"
}
Show request & response

Request

curl -X PATCH "https://www.adlight.app/api/projects/proj_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Updated Name", "status": "archived"}'

Response

{
  "project": {
    "id": "proj_abc123",
    "name": "Updated Name",
    "status": "archived",
    "updatedAt": "2025-01-15T11:00:00Z"
  }
}
DELETE/api/projects/[projectId]

Delete a project.

Path params: projectId

Show request & response

Request

curl -X DELETE "https://www.adlight.app/api/projects/proj_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "ok": true
}
GET/api/projects/by-slug

Get a project by its slug.

Query: slug (required)

Show request & response

Request

curl -X GET "https://www.adlight.app/api/projects/by-slug?slug=summer-campaign" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "project": {
    "id": "proj_abc123",
    "name": "Summer Campaign",
    "slug": "summer-campaign",
    "status": "active",
    "createdAt": "2025-01-15T10:00:00Z",
    "updatedAt": "2025-01-15T10:00:00Z"
  }
}

Project Context

GET/api/projects/[projectId]/context

Get project context (brand, design, audience settings).

Path params: projectId

Show request & response

Request

curl -X GET "https://www.adlight.app/api/projects/proj_abc123/context" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "context": {
    "brand": {
      "brandName": "Acme Corp",
      "styleKeywords": ["minimal", "professional"]
    },
    "design": {
      "primaryColor": "#27a857",
      "advertisingStyles": ["lifestyle", "product-focused"]
    },
    "audience": {
      "segments": ["18-34", "urban"],
      "notes": "Mobile-first"
    },
    "updatedAt": "2025-01-15T10:00:00Z"
  }
}
PUT/api/projects/[projectId]/context

Set or replace project context.

Path params: projectId

Body schema
{
  "brand": "object (optional)",
  "design": "object (optional)",
  "audience": "object (optional)",
  "notes": "string (optional)",
  "markdownRules": "string (optional)"
}
Show request & response

Request

curl -X PUT "https://www.adlight.app/api/projects/proj_abc123/context" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"brand":{"brandName":"Acme"},"design":{"primaryColor":"#27a857"}}'

Response

{
  "context": {
    "brand": { "brandName": "Acme" },
    "design": { "primaryColor": "#27a857" },
    "updatedAt": "2025-01-15T10:00:00Z"
  }
}
GET/api/projects/[projectId]/context/resolve

Get resolved context (workspace + project merged).

Path params: projectId

Show request & response

Request

curl -X GET "https://www.adlight.app/api/projects/proj_abc123/context/resolve" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "context": {
    "workspaceId": "ws_123",
    "projectId": "proj_abc123",
    "brand": { "brandName": "Acme" },
    "design": { "primaryColor": "#27a857" }
  }
}

Project Collateral

GET/api/projects/[projectId]/chats

List chats associated with a project.

Path params: projectId

Show request & response

Request

curl -X GET "https://www.adlight.app/api/projects/proj_abc123/chats" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "chats": [
    {
      "id": "chat_xyz",
      "title": "Reddit Ad Ideas",
      "projectId": "proj_abc123",
      "integration": "reddit",
      "visibility": "private",
      "createdAt": "2025-01-15T10:00:00Z",
      "updatedAt": "2025-01-15T10:00:00Z"
    }
  ]
}
GET/api/projects/[projectId]/creatives

List creatives (generated ad images) for a project.

Path params: projectId

Show request & response

Request

curl -X GET "https://www.adlight.app/api/projects/proj_abc123/creatives" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "creatives": [
    {
      "id": "cre_123",
      "projectId": "proj_abc123",
      "channel": "meta",
      "imageUrl": "https://...",
      "mimeType": "image/png",
      "createdAt": "2025-01-15T10:00:00Z"
    }
  ]
}
POST/api/projects/[projectId]/creatives

Save a creative (image) to a project.

Path params: projectId

Body schema
{
  "imageBase64": "string (required)",
  "mimeType": "string (required)",
  "channel": "\"reddit\" | \"meta\" | \"google\" | \"tiktok\" (required)",
  "chatId": "string (optional)",
  "messageId": "string (optional)"
}
Show request & response

Request

curl -X POST "https://www.adlight.app/api/projects/proj_abc123/creatives" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"imageBase64":"iVBORw0KGgo...","mimeType":"image/png","channel":"meta"}'

Response

{
  "creative": {
    "id": "cre_456",
    "projectId": "proj_abc123",
    "channel": "meta",
    "imageUrl": "https://...",
    "createdAt": "2025-01-15T10:00:00Z"
  }
}
GET/api/projects/[projectId]/assets

List assets (logos, images) for a project.

Path params: projectId

Show request & response

Request

curl -X GET "https://www.adlight.app/api/projects/proj_abc123/assets" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "assets": [
    {
      "id": "asset_789",
      "name": "logo.png",
      "url": "https://...",
      "mimeType": "image/png"
    }
  ]
}

Chats

GET/api/chats

List chats. Use filter=team, filter=my, or omit for all.

Query: filter

Show request & response

Request

curl -X GET "https://www.adlight.app/api/chats?filter=my" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "chats": [
    {
      "id": "chat_xyz",
      "title": "Reddit Ad Ideas",
      "projectId": "proj_abc123",
      "integration": "reddit",
      "visibility": "private",
      "createdAt": "2025-01-15T10:00:00Z",
      "updatedAt": "2025-01-15T10:00:00Z"
    }
  ]
}
POST/api/chats

Create a new chat.

Body schema
{
  "title": "string (required)",
  "projectId": "string (optional)",
  "integration": "\"reddit\" | \"meta\" | \"tiktok\" (optional, default: reddit)",
  "visibility": "\"team\" | \"private\" (optional, default: private)"
}
Show request & response

Request

curl -X POST "https://www.adlight.app/api/chats" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"Meta Campaign Chat","integration":"meta","projectId":"proj_abc123"}'

Response

{
  "chat": {
    "id": "chat_new",
    "title": "Meta Campaign Chat",
    "projectId": "proj_abc123",
    "integration": "meta",
    "visibility": "private",
    "createdAt": "2025-01-15T10:00:00Z",
    "updatedAt": "2025-01-15T10:00:00Z"
  }
}
GET/api/chats/[chatId]/messages

Get a chat and its messages.

Path params: chatId

Show request & response

Request

curl -X GET "https://www.adlight.app/api/chats/chat_xyz/messages" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "chat": {
    "id": "chat_xyz",
    "title": "Reddit Ad Ideas",
    "integration": "reddit",
    "createdAt": "2025-01-15T10:00:00Z"
  },
  "messages": [
    {
      "id": "msg_1",
      "role": "user",
      "text": "Create a bold ad for running shoes",
      "createdAt": "2025-01-15T10:00:00Z"
    },
    {
      "id": "msg_2",
      "role": "assistant",
      "text": "Here's your creative.",
      "image": { "base64": "...", "mimeType": "image/png" },
      "createdAt": "2025-01-15T10:01:00Z"
    }
  ]
}
POST/api/chats/[chatId]/messages

Save messages to a chat.

Path params: chatId

Body schema
{
  "messages": "array (required)",
  "title": "string (optional)",
  "projectId": "string (optional)",
  "integration": "string (optional)",
  "visibility": "string (optional)"
}
Show request & response

Request

curl -X POST "https://www.adlight.app/api/chats/chat_xyz/messages" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","text":"Hello"},{"role":"assistant","text":"Hi!"}]}'

Response

{
  "chatId": "chat_xyz",
  "messageCount": 2
}

Generation

POST/api/generate

Generate a creative from a conversation. Include projectId for context, chatId to associate.

Body schema
{
  "messages": "array of {role, text, image?} (required)",
  "channel": "\"reddit\" | \"meta\" | \"google\" | \"tiktok\" (required)",
  "projectId": "string (optional)",
  "chatId": "string (optional)",
  "visibility": "\"team\" | \"private\" (optional)"
}
Show request & response

Request

curl -X POST "https://www.adlight.app/api/generate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [{"role": "user", "text": "Generate a launch ad for a new running shoe"}],
    "channel": "meta",
    "projectId": "proj_abc123"
  }'

Response

{
  "text": "Here's your Meta ad creative.",
  "image": {
    "base64": "iVBORw0KGgoAAAANSUhEUgAA...",
    "mimeType": "image/png"
  }
}
POST/api/generate/stream

Stream generation with NDJSON events (status, text, artifact, error, done).

Body schema
{
  "messages": "array (required)",
  "channel": "\"reddit\" | \"meta\" | \"google\" | \"tiktok\" (required)",
  "projectId": "string (optional)"
}
Show request & response

Request

curl -X POST "https://www.adlight.app/api/generate/stream" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","text":"Create a TikTok ad"}],"channel":"tiktok"}'

Response

{"type":"status","phase":"analyzing","message":"Analyzing prompt..."}
{"type":"status","phase":"generating","message":"Generating creative..."}
{"type":"text","text":"Here's your TikTok ad."}
{"type":"artifact","image":{"base64":"...","mimeType":"image/png"}}
{"type":"status","phase":"complete","message":"Done."}
{"type":"done"}
POST/api/v1/generate

V1 generate endpoint (messages, channel only).

Body schema
{
  "messages": "array (required)",
  "channel": "\"reddit\" | \"meta\" | \"google\" | \"tiktok\" (required)"
}
Show request & response

Request

curl -X POST "https://www.adlight.app/api/v1/generate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","text":"Generate a Reddit ad"}],"channel":"reddit"}'

Response

{
  "text": "Here's your Reddit ad.",
  "image": {
    "base64": "iVBORw0KGgo...",
    "mimeType": "image/png"
  }
}

Context Import

POST/api/context/upload-asset

Upload an asset (logo, image) for global or project context. Use formData.

Body schema
formData: scope (global|project), projectId? (if project), file
Show request & response

Request

curl -X POST "https://www.adlight.app/api/context/upload-asset" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "scope=project" \
  -F "projectId=proj_abc123" \
  -F "file=@logo.png"

Response

{
  "asset": {
    "id": "asset_uuid",
    "name": "logo.png",
    "url": "https://...",
    "storagePath": "workspace-assets/...",
    "mimeType": "image/png"
  }
}
POST/api/context/import-url

Import context from a URL. Fetches and extracts text.

Body schema
{
  "url": "string (required)",
  "scope": "\"global\" | \"project\" (optional, default: project)",
  "projectId": "string (required if scope=project)"
}
Show request & response

Request

curl -X POST "https://www.adlight.app/api/context/import-url" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/brand","scope":"project","projectId":"proj_abc123"}'

Response

{
  "context": { ... },
  "extractedChars": 1250
}
POST/api/context/import-markdown

Import context from a markdown file. Use formData.

Body schema
formData: scope (global|project), projectId? (if project), file (.md)
Show request & response

Request

curl -X POST "https://www.adlight.app/api/context/import-markdown" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "scope=project" \
  -F "projectId=proj_abc123" \
  -F "file=@brand-guidelines.md"

Response

{
  "context": {
    "brand": { "brandName": "Acme", "styleKeywords": ["..."] },
    "markdownRules": "..."
  }
}
GET/api/context/global

Get workspace-level global context.

Show request & response

Request

curl -X GET "https://www.adlight.app/api/context/global" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "context": {
    "brand": { "brandName": "Acme" },
    "design": { "primaryColor": "#27a857" },
    "updatedAt": "2025-01-15T10:00:00Z"
  }
}
PUT/api/context/global

Set workspace-level global context.

Body schema
{
  "brand": "object (optional)",
  "design": "object (optional)",
  "audience": "object (optional)",
  "notes": "string (optional)",
  "markdownRules": "string (optional)"
}
Show request & response

Request

curl -X PUT "https://www.adlight.app/api/context/global" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"brand":{"brandName":"Acme"}}'

Response

{
  "context": {
    "brand": { "brandName": "Acme" },
    "updatedAt": "2025-01-15T10:00:00Z"
  }
}

Workspace

GET/api/workspaces/current

Get the current workspace.

Show request & response

Request

curl -X GET "https://www.adlight.app/api/workspaces/current" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "workspace": {
    "id": "ws_123",
    "name": "My Workspace",
    "ownerUid": "uid_xxx",
    "createdAt": "2025-01-15T10:00:00Z",
    "updatedAt": "2025-01-15T10:00:00Z"
  }
}
GET/api/workspaces/current/metrics

Get workspace metrics. Optional window (24h, 7d, 30d) and projectId filter.

Query: window, projectId

Show request & response

Request

curl -X GET "https://www.adlight.app/api/workspaces/current/metrics?window=7d" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "window": "7d",
  "overview": {
    "messagesSent": 42,
    "contentCreated": 15,
    "activeUsers": 3
  },
  "usage": { "currentUserMessages": 20, "teamMessages": 22, "onDemandMessages": 0 },
  "spending": { "currentUserSpendCents": 0, "teamSpendCents": 0, "onDemandSpendCents": 0 }
}
GET/api/workspaces/current/members

List workspace members.

Show request & response

Request

curl -X GET "https://www.adlight.app/api/workspaces/current/members" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "members": [
    {
      "uid": "user_1",
      "email": "alice@example.com",
      "name": "Alice",
      "role": "owner",
      "joinedAt": "2025-01-15T10:00:00Z"
    }
  ]
}
POST/api/workspaces/current/members

Add or update a workspace member.

Body schema
{
  "memberUid": "string (required)",
  "email": "string (optional)",
  "name": "string (optional)",
  "role": "\"owner\" | \"admin\" | \"member\" (optional, default: member)"
}
Show request & response

Request

curl -X POST "https://www.adlight.app/api/workspaces/current/members" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"memberUid":"uid_xxx","email":"bob@example.com","role":"member"}'

Response

{
  "member": {
    "uid": "uid_xxx",
    "email": "bob@example.com",
    "role": "member",
    "joinedAt": "2025-01-15T10:00:00Z"
  }
}
DELETE/api/workspaces/current/members

Remove a workspace member.

Query: memberUid (required)

Show request & response

Request

curl -X DELETE "https://www.adlight.app/api/workspaces/current/members?memberUid=uid_xxx" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "ok": true
}
GET/api/workspaces/current/audit-events

List audit events (login, API keys, chats, etc.).

Show request & response

Request

curl -X GET "https://www.adlight.app/api/workspaces/current/audit-events" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "events": [
    {
      "id": "evt_1",
      "type": "message_sent",
      "userUid": "uid_xxx",
      "createdAt": "2025-01-15T10:00:00Z",
      "metadata": { "projectId": "proj_abc" }
    }
  ]
}
POST/api/workspaces/current/audit-events

Create an audit event (for custom tracking).

Body schema
{
  "type": "login | logout | api_key_created | api_key_deleted | chat_created | message_sent | artifact_created",
  "metadata": "object (optional)"
}
Show request & response

Request

curl -X POST "https://www.adlight.app/api/workspaces/current/audit-events" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"message_sent","metadata":{"source":"api"}}'

Response

{
  "event": {
    "id": "evt_new",
    "type": "message_sent",
    "createdAt": "2025-01-15T10:00:00Z"
  }
}
GET/api/workspaces/current/usage-settings

Get usage settings (limits, on-demand toggle).

Show request & response

Request

curl -X GET "https://www.adlight.app/api/workspaces/current/usage-settings" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "settings": {
    "onDemandEnabled": true,
    "userSpendLimitCents": 1000,
    "teamSpendLimitCents": 5000
  }
}
PATCH/api/workspaces/current/usage-settings

Update usage settings.

Body schema
{
  "onDemandEnabled": "boolean (optional)",
  "userSpendLimitCents": "number (optional)",
  "teamSpendLimitCents": "number (optional)"
}
Show request & response

Request

curl -X PATCH "https://www.adlight.app/api/workspaces/current/usage-settings" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"onDemandEnabled":true,"userSpendLimitCents":1000}'

Response

{
  "settings": {
    "onDemandEnabled": true,
    "userSpendLimitCents": 1000,
    "teamSpendLimitCents": 5000
  }
}

Integrations

GET/api/integrations

List integration connections (Reddit, Meta, TikTok).

Show request & response

Request

curl -X GET "https://www.adlight.app/api/integrations" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "integrations": [
    {
      "provider": "reddit",
      "connected": true,
      "connectedAt": "2025-01-15T10:00:00Z",
      "updatedAt": "2025-01-15T10:00:00Z"
    }
  ]
}
POST/api/integrations/[provider]

Connect an integration. Provider: reddit, meta, or tiktok.

Path params: provider

Show request & response

Request

curl -X POST "https://www.adlight.app/api/integrations/reddit" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "integration": {
    "provider": "reddit",
    "connected": true,
    "updatedAt": "2025-01-15T10:00:00Z"
  }
}
DELETE/api/integrations/[provider]

Disconnect an integration.

Path params: provider

Show request & response

Request

curl -X DELETE "https://www.adlight.app/api/integrations/reddit" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "integration": {
    "provider": "reddit",
    "connected": false,
    "updatedAt": "2025-01-15T10:00:00Z"
  }
}

Account

GET/api/account/me

Get current user profile.

Show request & response

Request

curl -X GET "https://www.adlight.app/api/account/me" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "uid": "user_xxx",
  "email": "user@example.com",
  "name": "Jane Doe",
  "picture": "https://..."
}
GET/api/account/api-keys

List API keys (prefix only, not full key).

Show request & response

Request

curl -X GET "https://www.adlight.app/api/account/api-keys" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "keys": [
    {
      "id": "key_123",
      "name": "Production",
      "prefix": "fast_...",
      "createdAt": "2025-01-15T10:00:00Z"
    }
  ]
}
POST/api/account/api-keys

Create a new API key. Returns full key once; copy it immediately.

Body schema
{
  "name": "string (optional, default: API Key)"
}
Show request & response

Request

curl -X POST "https://www.adlight.app/api/account/api-keys" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Production"}'

Response

{
  "id": "key_new",
  "name": "Production",
  "key": "fast_xxxxxxxxxxxx",
  "prefix": "fast_...",
  "createdAt": "2025-01-15T10:00:00Z",
  "message": "Copy your key now. It won't be shown again."
}
DELETE/api/account/api-keys

Revoke an API key.

Query: id (required)

Show request & response

Request

curl -X DELETE "https://www.adlight.app/api/account/api-keys?id=key_123" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "ok": true
}

Ads & Analytics

GET/api/v1/ads

List ads. Returns placeholder array for now.

Show request & response

Request

curl -X GET "https://www.adlight.app/api/v1/ads" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "ads": []
}
GET/api/v1/ads/scheduled

List scheduled ads.

Show request & response

Request

curl -X GET "https://www.adlight.app/api/v1/ads/scheduled" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "schedules": []
}
POST/api/v1/ads/schedule

Schedule an ad launch.

Body schema
{
  "adId": "string (required)",
  "runAt": "ISO 8601 datetime (required)"
}
Show request & response

Request

curl -X POST "https://www.adlight.app/api/v1/ads/schedule" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"adId":"ad_123","runAt":"2026-03-15T09:00:00.000Z"}'

Response

{
  "id": "sched_456",
  "adId": "ad_123",
  "runAt": "2026-03-15T09:00:00.000Z",
  "status": "scheduled"
}
GET/api/v1/analytics

Get analytics summary (impressions, clicks, spend, conversions).

Show request & response

Request

curl -X GET "https://www.adlight.app/api/v1/analytics" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "summary": {
    "impressions": 504,
    "clicks": 42,
    "spend": 12.50,
    "conversions": 15
  },
  "periods": [...]
}