Endpoint
Method:POST
URL: https://fvtvyejucthdmnpfkrnl.supabase.co/functions/v1/brand-agent
Authentication: Authorization: Bearer <SENDWHALE_BRAND_KEY>
Create a brand read key
Brand read keys are created by workspace owners or admins. To create one:- Sign in to SendWhale and open your workspace Settings.
- Navigate to Agent Access.
- Click Create Key, give it a descriptive name, and click Create.
- Copy the key immediately — it is shown only once.
Key expiry and rotation
Brand read keys expire after 90 days. Before a key expires:- Create a replacement key in Settings → Agent Access.
- Update the
SENDWHALE_BRAND_KEYenvironment variable in every environment that uses it. - Verify the new key works by making a test request.
- Revoke the old key.
401 error — prevents disruptions to any integrations that depend on the key.
Make a request
Include your brand key in theAuthorization header and your Workspace ID in the request body. Your Workspace ID is available in workspace Settings → Agent Access.
Request body
What the key can and cannot access
Brand read keys are intentionally scoped to the minimum permissions needed for reading brand data. A brand read key can read:- Workspace name and description
- Brand voice and tone guidelines
- Brand colors and fonts
- Logo and visual assets metadata
- Social media profile links
- Knowledge base entries and brand facts
- Skills and preferences stored in the workspace
- Send mail
- Read contact lists or subscriber data
- Create or modify campaigns
- Access billing or account data
- Write to the workspace in any way
This limited scope makes brand read keys safe to use in server-side AI integrations. Even if a key is inadvertently exposed, an attacker cannot use it to send mail, access contacts, or make any changes to your workspace.
Error codes
Use in AI integrations
Once you can read brand context programmatically, common uses include:- AI system prompts — fetch brand context on each request and inject it into your AI model’s system prompt to keep responses on-brand.
- Local MCP server — if you use an AI client like Claude Desktop, the SendWhale MCP server calls this API automatically using your configured credentials, so you do not need to manage it separately.
- Content pipelines — read brand colors and fonts to auto-populate design templates in external tools.