Skip to main content
← Ad campaigns Endpoint: POST https://makelocalads.com/api/v1/campaigns Permission: campaigns:generate

Open in LocalAds

The campaign creator in the product’s Ad Campaign studio.

Usage notes

  • Guided mode (the default) requires audience_id: a saved audience of the product, or null for a deliberately broad campaign. Leaving it out returns 400 invalid_request, so an audience is never skipped by accident. See Audiences.
  • Prompt mode takes a brief instead: it is the whole direction, with no audience step.
  • Each creative costs 2 credits. max_credits refuses the request with 422 before anything is charged if the campaign would cost more.
  • Send an Idempotency-Key so a retry after a network failure never starts and charges for a second campaign.

Quick start

The choices

A custom campaign (blueprint_ids) splits the creatives evenly across the ad types, so creative_count must be a multiple of the number of types, up to 30. Angles apply to a single recipe, so they cannot be combined with blueprint_ids. To describe the campaign yourself instead:
The original prompt field still works: it means prompt mode with that brief and keeps the original counts (3 to 30). New integrations should send mode: "prompt" and brief.

Input fields

string
required
The product the campaign is for, with status: "ready".
string
guided (the default) starts with the audience, then a recipe or ad types. prompt takes a brief and has no audience step.
string
One recipe from GET /campaign-blueprints. Optional; without a recipe or ad types, one is chosen for the product.
array
Several ad types for a custom campaign, 1 to 30 unique recipe ids. Creatives are split evenly across them, so creative_count must be a multiple of the number of types. Not allowed with angles.
string
Required in guided mode. A saved audience of the product, from GET /products/{product_id}/audiences, or null for a broad campaign. Prompt mode takes no audience: omit it or send null.
array
Angles for a single recipe, usually from Recipes and angles. 1 to 10 strings, up to 300 characters each. Not allowed with blueprint_ids.
string
Optional in guided mode, up to 2,000 characters. Required in prompt mode, where it is the whole direction.
string
Deprecated. The original prompt-only field: sending it means prompt mode with this brief, and keeps the original counts (3 to 30). Use mode: "prompt" and brief instead.
string
One of 1:1, 4:5, 9:16, 16:9. Defaults to 1:1.
string
One of the 42 supported languages, such as English, Hindi, Spanish. Defaults to the brand’s saved language, else English.
integer
How many creatives to make: 5, 10, 15, or 20 (the default). For blueprint_ids, a multiple of the number of ad types, up to 30 (the default is the multiple nearest 10).
integer
Refuse the request with 422 credit_limit_exceeded, before anything is charged, if it would cost more than this many credits.

Response

LocalAds returns 202 Accepted and a Location header:
Poll the URL in the Location header until status is completed, failed, or canceled, with backoff between requests. See Polling. Completed creatives appear while the rest continue generating. A completed campaign may contain an individually failed creative. Its credits are refunded and credits_charged goes down to match. Check failed_creative_count and each creative’s status before using the results.

Errors

See Errors and retries for the error format.
Last modified on September 30, 2026