Skip to main content

Ads campaigns API

Submit advertising campaigns with Stripe-powered checkout, manage campaign lifecycle (approve, reject, complete), and request Mux upload URLs for ad creative. Campaigns are billed via Stripe checkout and broadcast on baseFM according to their slot schedule.

Submit a campaign

Submits a new advertising campaign and returns a Stripe checkout URL for payment. No authentication is required — advertisers do not need an Agentbot account. If the caller is an authenticated subscriber on a qualifying plan, a 50% discount is applied automatically.

Request body

Slot types

Authenticated subscribers on solo, collective, label, or network plans with an active or trialing subscription receive a 50% discount on the base price.

Response

Errors

Example


List campaigns

Returns all campaigns, ordered by creation date (newest first). Requires admin session authentication.

Response

Campaign statuses

Errors


Update a campaign

Performs an action on a campaign. The action field in the request body determines the operation. Some actions are admin-only, while request_upload is available to advertisers after payment.

Path parameters

Actions

request_upload

Generates a Mux direct upload URL for the ad creative. Available to any caller after the campaign has been paid or approved. Each campaign can only have one upload. Request body:
Response:
Errors:

approve (admin only)

Approves a campaign for broadcast scheduling. Request body: Response:
The endsAt date is calculated based on the slot type: 7 days for spot, 14 days for feature, and 28 days for campaign.

reject (admin only)

Rejects a campaign. Request body: Response:

complete (admin only)

Marks a campaign as complete. Request body:
Response:

Errors (all admin actions)

Example

Request an upload URL after payment:
Approve a campaign as admin: