Build with Brandsoara
Your brand. Your workflow.
Connected.
Bring on-brand campaign generation into your application with a simple, server-to-server API.
Create campaigns, follow their progress, and measure outcomes. Review and publish in Brandsoara.
Base URL
https://www.brandsoara.com/api/v1REST · JSON · Bearer authentication
Self-hosted? Use your own service origin + /api/v1.- Configure brand
- Create API key
- Generate campaign
- Review & publish
Start here
Connect in four steps
- Create a company workspace and configure its brand, or use PUT /brand.
- Create a scoped key in Integrations. Store it in your backend’s secret manager.
- Create a campaign with a stable Idempotency-Key, then poll its status every 10–15 seconds.
- Open the returned review_path for approval and scheduling. Report verified outcomes using a unique event_key.
Generation is asynchronous
A 202 response means your request was durably queued. The worker dispatches queued requests every minute.
Poll until status is review or failed. Image generation may continue after captions reach review.
API generation does not approve or publish posts. Manage Facebook and Instagram connections and approvals in Brandsoara. LinkedIn and X publication is manual.
API v1 uses polling. Webhook delivery and delegated OAuth installation are not available.
Essentials
Authentication
Send a scoped API key in the Authorization header using the Bearer scheme. Each key belongs to one company; caller-supplied organization or resource IDs never override that scope.
Keys are shown only once, expire, and can be revoked in Integrations. Keep keys out of frontend bundles, mobile apps, URLs, analytics, and logs.
Examples use BRANDSOARA_URL and BRANDSOARA_API_KEY as backend environment variable names you define.
curl "$BRANDSOARA_URL/api/v1/brand" \
-H "Authorization: Bearer $BRANDSOARA_API_KEY"Server-side example · no requests are sent from this page
Fundamentals
Errors & retries
Errors return an error object with a code, message, and request_id. The X-Request-Id response header helps identify a request.
- 400
- Invalid JSON or missing body.
- 401
- Invalid, expired, or revoked key.
- 403
- Required scope is missing.
- 404
- Resource not found in this company.
- 409
- Idempotency conflict, brand required, or credits_unavailable.
- 413 / 415
- Body exceeds 32 KiB or Content-Type is not application/json.
- 422
- Request fields failed validation.
- 429
- Rate or daily generation limit; respect Retry-After.
- 503
- Service unavailable. Retry generation with the same idempotency key.
{
"error": {
"code": "credits_unavailable",
"message": "Insufficient company AI credits. Buy credits in Settings or create posts manually.",
"request_id": "123e4567-e89b-42d3-a456-426614174000"
}
}Safe generation
Idempotency
Campaign creation is atomic and idempotent. Send an Idempotency-Key with 8–120 characters: letters, numbers, dots, underscores, colons, or hyphens.
Keys are shared across the company’s API keys. Retry the same logical request with the same key and payload after a network error. A changed payload returns 409.
Accepted or replayed?
202 Accepted — a new campaign was queued, with replayed: false.
200 OK — an identical accepted request was replayed, returning the same campaign ID with replayed: true.
For outcomes, use the body’s event_key instead. Identical outcome replays return duplicate: true.
Request limits
Rate limits
60 requests per minute per API key. Each company can request up to 100 generated posts per UTC day; this daily limit resets at midnight UTC.
A 429 response includes Retry-After. Wait at least that interval before retrying; a daily generation limit also requires waiting for the UTC reset.
Company AI credits
New generation requires available company credits in addition to API rate limits. Insufficient credits return 409 with credits_unavailable.
Purchase credits in Settings or create posts manually in Brandsoara. Buying credits does not remove API rate limits.
Brand
Retrieve brand
/api/v1/brandRequired scope brand:read
Read the company’s marketing profile and visual brand settings. Configure a profile first; an unconfigured brand returns 404.
curl "$BRANDSOARA_URL/api/v1/brand" \
-H "Authorization: Bearer $BRANDSOARA_API_KEY"Server-side example · no requests are sent from this page
{
"data": {
"business_name": "Your company",
"website": "https://your-company.example",
"description": "We help local businesses build stronger customer relationships.",
"audience": "Local business owners seeking our services",
"offer": "Book a consultation with our team",
"approved_claims": "Personal service from our experienced team",
"tone": "Professional and approachable",
"goal": "leads",
"logo_url": "https://your-company.example/logo.png",
"primary_color": "#284b3b",
"updated_at": "2027-03-01T10:00:00Z"
}
}Brand
Update brand
/api/v1/brandRequired scope brand:write
Replace the company’s brand settings. Send all required fields; this is not a partial update.
Body parameters
business_namestring · requiredYour company’s display name.
1–100 characters
websitestring · uri · requiredYour company’s public HTTPS website.
Up to 2000 characters
descriptionstring · requiredWhat your company sells and what makes it distinctive.
20–4000 characters
audiencestring · requiredWho the campaign should reach.
10–2000 characters
offerstring · requiredYour offer and call to action.
5–2000 characters
approved_claimsstring · requiredFacts the AI is allowed to use.
5–3000 characters
tonestring · requiredYour brand’s voice and style.
3–500 characters
goalstring · requiredThe business result you want to achieve.
leads · bookings · sales · signups · demos
logo_urlstring · optionalUse a public HTTPS image URL for your logo.
primary_colorstring · optionalSix-digit hex color, or an empty string.
curl "$BRANDSOARA_URL/api/v1/brand" \
-X PUT \
-H "Authorization: Bearer $BRANDSOARA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"business_name": "Your company",
"website": "https://your-company.example",
"description": "We help local businesses build stronger customer relationships.",
"audience": "Local business owners seeking our services",
"offer": "Book a consultation with our team",
"approved_claims": "Personal service from our experienced team",
"tone": "Professional and approachable",
"goal": "leads",
"logo_url": "https://your-company.example/logo.png",
"primary_color": "#284b3b"
}'Server-side example · no requests are sent from this page
{
"data": {
"business_name": "Your company",
"website": "https://your-company.example",
"description": "We help local businesses build stronger customer relationships.",
"audience": "Local business owners seeking our services",
"offer": "Book a consultation with our team",
"approved_claims": "Personal service from our experienced team",
"tone": "Professional and approachable",
"goal": "leads",
"logo_url": "https://your-company.example/logo.png",
"primary_color": "#284b3b"
}
}Campaigns
List campaigns
/api/v1/campaignsRequired scope campaigns:read
Read campaigns in descending ID order. Pass the returned next_cursor as after to retrieve the next page; null means there are no more pages.
Query parameters
limitinteger · optional1–100 results per page. Default: 25.
afterUUID · optionalUse next_cursor from the previous response.
curl "$BRANDSOARA_URL/api/v1/campaigns?limit=25" \
-H "Authorization: Bearer $BRANDSOARA_API_KEY"Server-side example · no requests are sent from this page
{
"data": [],
"next_cursor": null
}Campaigns
Create a campaign
/api/v1/campaignsRequired scope campaigns:generate
Queue a campaign for AI generation. Configure the company brand first and ensure the company has enough AI credits. Save the returned campaign ID and poll status_url.
Body parameters
namestring · requiredA descriptive campaign name.
3–120 characters
goalstring · requiredThe business result you want to achieve.
leads · bookings · sales · signups · demos
audiencestring · requiredWho the campaign should reach.
10–2000 characters
offerstring · requiredYour offer and call to action.
5–2000 characters
landing_urlstring · uri · requiredPublic HTTPS destination for your call to action.
Up to 2000 characters
platformsarray · requiredChannels to generate posts for. Request at least one post per distinct channel.
1–4 items
instagram · facebook · linkedin · x
post_countinteger · requiredNumber of posts to generate.
1–12
modelstring · optionalOptional text model. When omitted, the configured server default is used.
gpt-4o · gpt-6.1-sol
curl "$BRANDSOARA_URL/api/v1/campaigns" \
-X POST \
-H "Authorization: Bearer $BRANDSOARA_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: spring-launch-2027-001" \
-d '{
"name": "Spring launch",
"goal": "leads",
"audience": "Local business owners seeking our services",
"offer": "Book a consultation with our team",
"landing_url": "https://your-company.example/consult",
"platforms": [
"facebook",
"instagram"
],
"post_count": 4,
"model": "gpt-6.1-sol"
}'Server-side example · no requests are sent from this page
{
"data": {
"id": "123e4567-e89b-42d3-a456-426614174000",
"model": "gpt-6.1-sol",
"review_path": "/marketing/123e4567-e89b-42d3-a456-426614174000",
"status_url": "/api/v1/campaigns/123e4567-e89b-42d3-a456-426614174000",
"replayed": false
}
}Campaigns
Retrieve a campaign
/api/v1/campaigns/{id}Required scope campaigns:read
Read campaign status and its posts. Poll every 10–15 seconds until status is review or failed. Images may continue generating after captions reach review. Open review_path in Brandsoara to review and schedule.
idUUID · required path parameterA campaign belonging to the API key’s company.
curl "$BRANDSOARA_URL/api/v1/campaigns/123e4567-e89b-42d3-a456-426614174000" \
-H "Authorization: Bearer $BRANDSOARA_API_KEY"Server-side example · no requests are sent from this page
{
"data": {
"id": "123e4567-e89b-42d3-a456-426614174000",
"name": "Spring launch",
"goal": "leads",
"audience": "Local business owners seeking our services",
"offer": "Book a consultation with our team",
"landing_url": "https://your-company.example/consult",
"strategy": null,
"status": "generating",
"error": null,
"created_at": "2027-03-01T10:00:00Z",
"review_path": "/marketing/123e4567-e89b-42d3-a456-426614174000",
"posts": []
}
}Campaigns
Campaign results
/api/v1/campaigns/{id}/resultsRequired scope campaigns:read
Read clicks, conversions, revenue, and per-channel results for a campaign. Record verified outcomes from your backend to connect marketing with business results.
idUUID · required path parameterA campaign belonging to the API key’s company.
curl "$BRANDSOARA_URL/api/v1/campaigns/123e4567-e89b-42d3-a456-426614174000/results" \
-H "Authorization: Bearer $BRANDSOARA_API_KEY"Server-side example · no requests are sent from this page
200 OK
Returns campaign results under data: clicks, conversions, revenue, and per-channel results.
View the OpenAPI contractOutcomes
Record an outcome
/api/v1/campaigns/{id}/outcomesRequired scope outcomes:write
Record a lead, booking, sale, signup, or demo with a stable event_key. Identical replays return 200 with duplicate: true; changed data with the same key returns 409. Use one consistent currency for the company.
idUUID · required path parameterA campaign belonging to the API key’s company.
Body parameters
kindstring · requiredThe verified business outcome.
lead · booking · sale · signup · demo
event_keystring · requiredStable identifier for this actual outcome; do not reuse for different outcomes.
1–120 characters
post_idstring · uuid · optionalOptional UUID of a post in this campaign, for attribution.
valuenumber · optionalSales only. Use a consistent currency for this company.
0–100000000 · Default: 0
curl "$BRANDSOARA_URL/api/v1/campaigns/123e4567-e89b-42d3-a456-426614174000/outcomes" \
-X POST \
-H "Authorization: Bearer $BRANDSOARA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"kind": "lead",
"event_key": "consultation-2027-001"
}'Server-side example · no requests are sent from this page
{
"accepted": true,
"duplicate": false
}Service
Health check
/api/v1/healthNo authentication required. A 200 response confirms service liveness, not database readiness.
Full API specification
Keep the contract close.
Use the OpenAPI 3.1 document for schemas, required fields, and response definitions.
Download OpenAPI