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"
}displayis a masked form of the key. The full key is never sent back.- In
scopes,*means full access and*:readmeans read-only. A custom key lists its areas, for example["content:write", "knowledge:read"]. workspace_idsisnullwhen the key works in all your workspaces.max_roleisnullfor a key with the workspace role Same as mine, and"user"for a Member only key.- The
roleof each workspace is the role the key acts with there:adminoruser(member). expires_atisnullfor 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 status | Code | Cause | Fix |
|---|---|---|---|
401 | invalid_api_key | The key is mistyped or was revoked | Check the key, or create a new one |
401 | api_key_expired | The key passed its expiry date | Create a new key |
403 | insufficient_scope | The key lacks the permission named in required_scope | Use a key with that permission |
403 | workspace_not_allowed | The key is limited to other workspaces. allowed_workspace_ids lists them | Use an allowed workspace |
403 | workspace_required | A workspace-limited key named no workspace | Send workspace_id |
403 | admin_role_required | A Member only key tried a workspace admin action | Use a key without the role limit, or do it in the dashboard |
403 | not_allowed_with_api_key | The action needs you signed in to the dashboard, for example managing API keys or changing the password | Do it in the dashboard |
403 | endpoint_not_available | The endpoint is not open to API keys | Do it in the dashboard |
400 | unreadable_body | A workspace-limited key sent a body that is neither JSON nor a form | Send JSON with Content-Type: application/json, or a form |
429 | rate_limited | More than 600 requests in a minute | Wait 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:
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Requests allowed per minute |
X-RateLimit-Remaining | Requests left in the current minute |
X-RateLimit-Reset | Seconds 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:
- The generation call starts the job and returns a job id, the
flow_id. - You call the matching
poll-flowendpoint with thatflow_idand theworkspace_id. - You repeat step 2 every few seconds until
statusiscompletedorfailed.
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: .
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.
| Job | Start | Poll |
|---|---|---|
| Image | POST /api/v1/image-generation/generate | POST /api/v1/image-generation/poll-flow |
| Social media post | POST /api/v1/apps/generate-social-media-post | POST /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| Field | Required | Values |
|---|---|---|
workspace_id | Yes | Your workspace id |
prompt | Yes | What the image should show |
style | Yes | realistic, artistic, minimalist, illustration, abstract, vintage, cartoon, sketch, oil-painting, watercolor, digital-art, cyberpunk |
theme | Yes | normal, vibrant, muted, monochrome, warm, cool, brand, pastel, neon, earth, jewel |
image_model | No | nano-banana (default), gpt-image-1.5, flux-kontext-pro, seedream-4.0 |
aspect_ratio | No | 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9 |
resolution | No | 1K, 2K, 4K |
generation_count | No | How many images to make |
use_brand_settings | No | true or false. Applies your brand colours and style |
use_training | No | true or false. Uses your knowledge base |
images | No | Reference 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| Field | Required | Values |
|---|---|---|
workspace_id | Yes | Your workspace id |
platform | Yes | linkedin, twitter, instagram, facebook, blog |
topic | Yes | What the post is about |
tone | Yes | For example professional |
purpose | Yes | For example announce |
language | Yes | For example English |
length | Yes | short, medium, long |
generation_count | Yes | How many versions to write |
enable_image_generation | Yes | true 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.
| Area | Covers |
|---|---|
workspace | Workspaces, members, invitations, notifications |
brand | Brand profile, website analysis |
agents | Support agents: settings, prompts, chats, leads, analytics, voice, channels |
knowledge | Websites, files, text, Q&A, Notion, Google Docs, training |
content | Images, videos, social posts, SEO, folders, prompt templates, scheduled posts |
leads | Lead searches and lists |
account | Profile, help requests |
billing | Plan, invoices, checkout, cancellation |
Good to know:
- Some reads use
POST, for example listing agents or checking a job. They still count asread. - 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.