API

API and webhooks

Studio-tier API for generating variations programmatically, webhook events for completion and approval, and rate limits.

The Brandflux API is included on the Studio plan. It exposes everything the dashboard does: extract a DNA, run a campaign, fetch variations, manage approvals.

Authentication

Bearer tokens, generated from workspace settings. One token per integration is the convention; tokens are revocable independently. Tokens are scoped to a single workspace.

Authorization: Bearer bf_live_xxxxxxxxxxxxxxxxxxxxxxxx

Every request is logged with the token ID. Rotate tokens any time; rotation does not invalidate in-flight requests already authorized.

Generating a variation

POST /v1/campaigns/{campaign_id}/generate
{
  "format": "social_square_1080",
  "brief": "Spring promo, 20% off, urgency tone",
  "count": 8
}

The response includes a job ID. Generation runs asynchronously; subscribe to the variation.generated webhook or poll the job endpoint.

Webhook events

Configure one HTTPS endpoint per workspace from settings. Events delivered:

  • variation.generated
  • variation.approved
  • variation.changes_requested
  • campaign.shipped
  • dna.updated

Each event includes a signature header you should verify against your workspace signing secret. Retries follow exponential backoff to a maximum of 24 hours; failed deliveries are surfaced in the workspace dashboard.

Rate limits

Studio includes 60 requests per minute, 5,000 per day. Generation requests count toward your monthly credit pool at the same rates as the dashboard (1 credit per 1K variation, 5 credits per 4K). The API does not bypass overage rules; if your workspace runs out of credits and overage is disabled, generation requests return 402.

Reference docs

Full endpoint reference, error codes, and a Postman collection live in the workspace under Settings → API. Public reference docs ship with the next docs release.