BrandVox AI Documentation

HTTP API

Call BrandVox directly with curl or your own code using an API key

HTTP API

What it is: the BrandVox API is the set of web addresses (endpoints) the dashboard calls. You can call the same endpoints from your own code with an API key.

Where it runs: on BrandVox servers, at https://api.brandvoxai.com. Your code can run anywhere that can reach the internet.

Who uses it and when: developers who want BrandVox inside their own app, script or automation, and AI coding agents that run curl for you. You use it whenever you would otherwise click through the dashboard for a task you repeat.

The API has about 200 endpoints, the same ones that back the dashboard. This page explains how every call works and shows the most common ones as complete examples.

Authentication

Send your API key in the Authorization header of every request:

Authorization: Bearer bvx_...

The header X-API-Key: bvx_... works too.

The examples below read the key from an environment variable, so the key never appears in your command history:

export BRANDVOX_API_KEY="bvx_..."

curl is a command that sends a web request. It comes with macOS, Linux and recent versions of Windows. The examples are written for a macOS or Linux terminal.

Check your key

GET /api/v1/api-keys/whoami tells you who the key belongs to, what it may do and which workspaces it can use. Every key may call it.

curl https://api.brandvoxai.com/api/v1/api-keys/whoami \
  -H "Authorization: Bearer $BRANDVOX_API_KEY"

The answer, shortened:

{
  "email": "[email protected]",
  "key": {
    "name": "Claude Code on my laptop",
    "display": "bvx_a1b2c3...9f3e",
    "scopes": ["*"],
    "workspace_ids": null,
    "max_role": null,
    "expires_at": null
  },
  "workspaces": [
    {
      "workspace_id": "4f6d1c2e-8a3b-4c7d-9e1f-2b5a7c9d0e13",
      "name": "Northwind Coffee",
      "role": "admin"
    }
  ],
  "default_workspace_id": "4f6d1c2e-8a3b-4c7d-9e1f-2b5a7c9d0e13"
}
  • display is a masked form of the key. The full key is never sent back.
  • In scopes, * means full access and *:read means read-only. A custom key lists its areas, for example ["content:write", "knowledge:read"].
  • workspace_ids is null when the key works in all your workspaces.
  • max_role is null for a key with the workspace role Same as mine, and "user" for a Member only key.
  • The role of each workspace is the role the key acts with there: admin or user (member).
  • expires_at is null for a key that never expires.

Most endpoints need a workspace_id. Take it from workspaces or default_workspace_id.

Errors

Errors come back as JSON with a code and a message:

{"detail":{"code":"insufficient_scope","message":"This API key does not have the 'content:write' permission.","required_scope":"content:write"}}
HTTP statusCodeCauseFix
401invalid_api_keyThe key is mistyped or was revokedCheck the key, or create a new one
401api_key_expiredThe key passed its expiry dateCreate a new key
403insufficient_scopeThe key lacks the permission named in required_scopeUse a key with that permission
403workspace_not_allowedThe key is limited to other workspaces. allowed_workspace_ids lists themUse an allowed workspace
403workspace_requiredA workspace-limited key named no workspaceSend workspace_id
403admin_role_requiredA Member only key tried a workspace admin actionUse a key without the role limit, or do it in the dashboard
403not_allowed_with_api_keyThe action needs you signed in to the dashboard, for example managing API keys or changing the passwordDo it in the dashboard
403endpoint_not_availableThe endpoint is not open to API keysDo it in the dashboard
400unreadable_bodyA workspace-limited key sent a body that is neither JSON nor a formSend JSON with Content-Type: application/json, or a form
429rate_limitedMore than 600 requests in a minuteWait the number of seconds in the Retry-After header

A 403 without one of these codes means the key owner is not in that workspace, or is a member where an admin is needed. whoami shows the role per workspace.

Rate limits

Each key may send 600 requests per minute. Every response to a request made with a key carries three headers:

HeaderMeaning
X-RateLimit-LimitRequests allowed per minute
X-RateLimit-RemainingRequests left in the current minute
X-RateLimit-ResetSeconds until the count starts again

Over the limit you get status 429 with the code rate_limited and a Retry-After header. Wait that many seconds, then try again.

Long jobs

Images, videos and posts take from a few seconds to a few minutes. They run as jobs:

  1. The generation call starts the job and returns a job id, the flow_id.
  2. You call the matching poll-flow endpoint with that flow_id and the workspace_id.
  3. You repeat step 2 every few seconds until status is completed or failed.
POST .../generate      ->  { "flow_id": "..." }
POST .../poll-flow     ->  { "status": "processing" }   wait, ask again
POST .../poll-flow     ->  { "status": "completed", ... the result ... }

The completed answer holds the result. Generated images appear as URLs in response.text, written as markdown: ![Generated Image](https://...).

A completed job is returned once and then removed. Save the result from that answer. Asking again with the same flow_id does not return it a second time.

JobStartPoll
ImagePOST /api/v1/image-generation/generatePOST /api/v1/image-generation/poll-flow
Social media postPOST /api/v1/apps/generate-social-media-postPOST /api/v1/apps/poll-flow

Examples

Each example is a complete request. Replace the ids with your own. The workspace id comes from whoami.

Generate an image

POST /api/v1/image-generation/generate takes a form (multipart/form-data). In curl, each -F adds one field.

curl https://api.brandvoxai.com/api/v1/image-generation/generate \
  -H "Authorization: Bearer $BRANDVOX_API_KEY" \
  -F workspace_id=4f6d1c2e-8a3b-4c7d-9e1f-2b5a7c9d0e13 \
  -F "prompt=A latte on a marble table, morning light" \
  -F style=realistic \
  -F theme=brand \
  -F aspect_ratio=16:9 \
  -F use_brand_settings=true
FieldRequiredValues
workspace_idYesYour workspace id
promptYesWhat the image should show
styleYesrealistic, artistic, minimalist, illustration, abstract, vintage, cartoon, sketch, oil-painting, watercolor, digital-art, cyberpunk
themeYesnormal, vibrant, muted, monochrome, warm, cool, brand, pastel, neon, earth, jewel
image_modelNonano-banana (default), gpt-image-1.5, flux-kontext-pro, seedream-4.0
aspect_ratioNo1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9
resolutionNo1K, 2K, 4K
generation_countNoHow many images to make
use_brand_settingsNotrue or false. Applies your brand colours and style
use_trainingNotrue or false. Uses your knowledge base
imagesNoReference images, sent as files: -F [email protected]

The answer holds a flow_id. Ask for the result:

curl https://api.brandvoxai.com/api/v1/image-generation/poll-flow \
  -H "Authorization: Bearer $BRANDVOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "flow_id": "3998c9c5-6f0e-4c1b-9a57-2d1c8e4b7a10",
    "workspace_id": "4f6d1c2e-8a3b-4c7d-9e1f-2b5a7c9d0e13"
  }'

When status is completed, take the image URL from response.text.

Write a social media post

POST /api/v1/apps/generate-social-media-post also takes a form.

curl https://api.brandvoxai.com/api/v1/apps/generate-social-media-post \
  -H "Authorization: Bearer $BRANDVOX_API_KEY" \
  -F workspace_id=4f6d1c2e-8a3b-4c7d-9e1f-2b5a7c9d0e13 \
  -F platform=linkedin \
  -F "topic=Our new oat milk latte" \
  -F tone=professional \
  -F purpose=announce \
  -F language=English \
  -F length=short \
  -F generation_count=1 \
  -F enable_image_generation=false
FieldRequiredValues
workspace_idYesYour workspace id
platformYeslinkedin, twitter, instagram, facebook, blog
topicYesWhat the post is about
toneYesFor example professional
purposeYesFor example announce
languageYesFor example English
lengthYesshort, medium, long
generation_countYesHow many versions to write
enable_image_generationYestrue or false. Adds an image to the post

Then poll POST /api/v1/apps/poll-flow with the flow_id and workspace_id, the same way as for images.

Teach your support agent a fact

This takes three calls. Knowledge is only used after it is trained, so you add a text and then train it for the agent.

1. Find the agent id. POST /api/v1/chatbot/get-chatbots lists the support agents of a workspace.

curl https://api.brandvoxai.com/api/v1/chatbot/get-chatbots \
  -H "Authorization: Bearer $BRANDVOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"workspace_id": "4f6d1c2e-8a3b-4c7d-9e1f-2b5a7c9d0e13"}'

2. Add the text. POST /api/v1/train/add-text saves it in the knowledge base. text_title can be up to 30 characters.

curl https://api.brandvoxai.com/api/v1/train/add-text \
  -H "Authorization: Bearer $BRANDVOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_id": "4f6d1c2e-8a3b-4c7d-9e1f-2b5a7c9d0e13",
    "text_title": "Opening hours",
    "text": "We are open Monday to Saturday, 7am to 6pm. We are closed on Sunday."
  }'

3. Train it for the agent. POST /api/v1/train/train-data trains the named content and gives it to the agents you list.

curl https://api.brandvoxai.com/api/v1/train/train-data \
  -H "Authorization: Bearer $BRANDVOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_id": "4f6d1c2e-8a3b-4c7d-9e1f-2b5a7c9d0e13",
    "content_names": ["Opening hours"],
    "assigned_to": {
      "chatbots": ["9b2f6c1e-3d4a-4e8b-a1c7-5f0d2e6b8a94"],
      "apps": []
    }
  }'

Create a folder

POST /api/v1/folders creates a folder for generated content.

curl https://api.brandvoxai.com/api/v1/folders \
  -H "Authorization: Bearer $BRANDVOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_id": "4f6d1c2e-8a3b-4c7d-9e1f-2b5a7c9d0e13",
    "name": "Spring campaign",
    "app_type": "image_generation"
  }'

app_type is social_media, image_generation or video_generation.

See your credits

GET /api/v1/workspace/get-workspace returns the workspace. workspace_message_count is the number of credits left.

curl "https://api.brandvoxai.com/api/v1/workspace/get-workspace?workspace_id=4f6d1c2e-8a3b-4c7d-9e1f-2b5a7c9d0e13" \
  -H "Authorization: Bearer $BRANDVOX_API_KEY"

Areas and permissions

Every endpoint belongs to one area and needs read or write there. write includes read. A key has full access (*), read-only access (*:read) or a list such as content:write.

AreaCovers
workspaceWorkspaces, members, invitations, notifications
brandBrand profile, website analysis
agentsSupport agents: settings, prompts, chats, leads, analytics, voice, channels
knowledgeWebsites, files, text, Q&A, Notion, Google Docs, training
contentImages, videos, social posts, SEO, folders, prompt templates, scheduled posts
leadsLead searches and lists
accountProfile, help requests
billingPlan, invoices, checkout, cancellation

Good to know:

  • Some reads use POST, for example listing agents or checking a job. They still count as read.
  • No API key can create, list or revoke API keys, change the password, delete the account, read the access token of a connected Google account or use admin endpoints. Those need the dashboard.

Workspace roles

A workspace has admins and members (admin and user in the API). Members do all the daily work. Admins also manage the workspace. A key acts with the role its owner has in each workspace.

A key created as Member only never acts as an admin, even where its owner is one. It gets 403 with the code admin_role_required when it tries to invite or remove a member, change a member's role, or rename or delete a workspace.

See Workspace roles for how to choose the role of a key.

Next steps

HTTP API