API Reference

BrandClause API

Run compliance reviews programmatically. The public API exposes the same analysis engine as the in-app review flow, authenticated with workspace API keys. The base URL is https://brandclause.com.

Start with one request

Create a workspace API key, keep it on your server and send one draft to the analyze endpoint. The website and API share your review allowance. For an agent connection, go to MCP setup.

Authentication

Every request is authenticated with a workspace API key. Keys are created in Settings → API Keys by a workspace admin and are available on the Free, Solo, Team, and eligible existing plans. A key looks like bc_live_… and is shown exactly once, at creation — we store only a hash, so copy it into your secret manager immediately. Keys can be revoked at any time and may carry an optional expiry.

Send the key on every request in the Authorization header:

Authorization: Bearer bc_live_YOUR_KEY

Each key carries a set of scopes. Keys currently default to the single analyze scope, which is required for the analyze endpoint below.

Analyze an asset

POST/api/v1/analyze

Submits one ad draft for review. Free, Solo, and Team accept text; eligible existing plans retain supported media inputs. The review checks the regulatory, category, and channel rules that apply to the request, plus your client's ingested brand guidelines when a clientId is provided. Requires the analyze scope. Each successful call consumes one review from your workspace's monthly quota (the same quota as in-app reviews). New text plans allow up to 10,000 characters and include 2 same-scope revisions within 14 days; changing the context or exceeding that allowance starts a new review.

Request body

JSON. At least one of assetText, fileData, or blobUrl must be provided.

FieldTypeRequiredDescription
assetTextstringone-ofThe creative copy, script, or text to analyze. Max 100 KB.
regionstringyesTarget market. One of us, uk, eu, canada, australia, apac, latam, mena, africa, global.
categorystringyesAdvertising category, e.g. finance, pharmaceutical, alcohol, food-beverage, healthcare, gambling, automotive, beauty, technology, retail, travel, telecommunications, energy.
assetTypestringnoOne of text, print, social, script, deck, image, pdf, video. Defaults to text. Determines how findings are anchored (timestamps for video, page numbers for PDFs).
channelsstring[]noUp to 8 placement ids — meta, google, youtube, tiktok, linkedin, x, snapchat, pinterest, amazon, display, email, broadcast, ooh. Activates channel-specific ad-policy rules.
fileDatastringone-ofBase64-encoded file content for image, PDF, or video analysis. Send mimeType with it.
mimeTypestringwith fileDataMIME type of fileData, e.g. image/png or application/pdf.
blobUrlstring (URL)one-ofURL of a previously uploaded asset file to analyze.
assetIdstringnoId of an existing asset in your workspace. The review result is persisted to that asset.
clientIdstringnoScope the review to one of your clients. That client's ingested brand guidelines are applied as brand-standards context during analysis.

Example request

curl -X POST https://brandclause.com/api/v1/analyze \
  -H "Authorization: Bearer bc_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "assetText": "Lose 20 pounds in one week - guaranteed!",
    "region": "us",
    "category": "health_fitness",
    "assetType": "text",
    "channels": ["meta"]
  }'

Example response (200)

{
  "score": 42,
  "status": "flagged",
  "summary": "The draft makes an unsubstantiated weight-loss guarantee.",
  "analyzedAt": "2026-06-10T14:05:11.000Z",
  "findings": [
    {
      "type": "regulatory_compliance",
      "severity": "high",
      "excerpt": "Lose 20 pounds in one week - guaranteed!",
      "issue": "Specific weight-loss results are claimed as guaranteed without substantiation.",
      "recommendation": "Remove the guarantee or qualify it with typical, substantiated results.",
      "ruleReference": "FTC Act Section 5 - deceptive advertising",
      "ruleCode": "FTC-SUBST-01",
      "citation": {
        "quotedText": "Advertisers must possess substantiation for objective claims before dissemination.",
        "sourceUrl": "https://www.ftc.gov/..."
      },
      "location": "Lose 20 pounds in one week - guaranteed!"
    }
  ],
  "rulesMeta": { "packKeys": ["us-ftc-advertising", "meta-ads-policy"], "retrievedCount": 12, "citedFindings": 1 }
}

score is an estimated 0–100 analysis signal and maps to status: approved (90–100), requires_review (70–89), or flagged (0–69). Each finding carries a severity, the offending excerpt, a fix recommendation, and — when grounded in a retrieved advertising rule — a ruleCode with a verbatim citation from that rule. Findings are anchored to the asset: a quoted phrase or location for copy and images, pageNumber for PDFs, and timestamp for video. When an assetId was supplied (or auto-created via projectId), the response also includes the persisted assetId/reviewId. An analysis status is not human approval, legal advice, or a guarantee that an ad platform will accept the creative.

Error codes

StatusBodyWhen
400Validation error with per-field detailsThe request body fails validation (missing region/category, no content provided, etc.).
401{ "error": "Missing or invalid API key" }No Authorization header, malformed key, unknown key, or a revoked/expired key.
402{ "error": "...", "reason": "feature_not_in_plan" | "quota_exceeded" | ... }The workspace plan does not include API access, or the monthly review quota is exhausted.
403{ "error": "API key is missing the required scope" }The key does not carry the analyze scope (or you referenced a resource outside your workspace).
429Rate-limit error with Retry-After headerThe per-key per-minute rate limit was exceeded. Back off and retry after the indicated time.

MCP server

POST/api/mcp

BrandClause is also a Model Context Protocol server, so AI agents can run compliance checks, read reviews back, and research advertising rules as native tools. It uses the same bc_live_… keys, the same review quota, and the same rate limits as the REST API. Works today with Claude Code, Cursor, VS Code, and the Anthropic / OpenAI API MCP connectors (any host that sends an Authorization header). An OAuth connection is also available for compatible hosts. Installation and directory availability depend on the host; a working endpoint does not mean BrandClause is listed in its app directory.

Connect from Claude Code

claude mcp add --transport http brandclause https://brandclause.com/api/mcp \
  --header "Authorization: Bearer bc_live_YOUR_KEY"

Connect from Cursor / VS Code

// .cursor/mcp.json (VS Code: .vscode/mcp.json is equivalent)
{
  "mcpServers": {
    "brandclause": {
      "url": "https://brandclause.com/api/mcp",
      "headers": { "Authorization": "Bearer ${env:BRANDCLAUSE_API_KEY}" }
    }
  }
}

Use from the Anthropic or OpenAI API

# Anthropic Messages API                     # OpenAI Responses API
mcp_servers=[{                               tools=[{
  "type": "url",                               "type": "mcp",
  "url": "https://brandclause.com/api/mcp",    "server_url": "https://brandclause.com/api/mcp",
  "name": "brandclause",                       "server_label": "brandclause",
  "authorization_token": "bc_live_YOUR_KEY"    "authorization": "bc_live_YOUR_KEY"
}]                                           }]

Never put the key in the URL query string — always the Authorization header.

Tools

ToolCostWhat it does
check_ad_compliance1 reviewFull compliance review of ad text — score, status, cited findings. 1 review credit; eligible revisions follow your plan’s allowance.
recheck_asset1 reviewRe-analyze a saved asset within your plan’s supported inputs and revision allowance.
get_reviewfreeLatest persisted review for an asset, with a delta vs the previous run (resolved / still open / new findings).
search_rulesfreeSemantic search over the published rule corpus with full rule text and citations.
get_rulesfreeUp to 10 rules by code with full text — read the rule a finding cites before fixing the creative.
list_rule_packs / get_rule_packfreeCatalog of published rule packs and each pack's rule index.
list_clients / list_projects / create_projectfreeWorkspace context: brands to ground checks in, projects to persist results into.
get_account_statusfreePlan, remaining review credits, overage pricing, rate limit, and unlocked features — call before bulk work.

Business outcomes — quota exhausted, plan gates, per-key rate limits, unknown ids — come back as tool results with isError: true and a machine-readable JSON body ({ code, message, retryable, … }), so the agent can read the denial and react (upgrade, back off, or fix its arguments) instead of seeing a broken connector. HTTP errors are reserved for transport problems: an invalid or revoked key gets 401.

Rate limits

Requests are rate-limited per key, per minute, based on your workspace plan:

PlanLimit
Free10 requests / minute
Solo20 requests / minute
Team30 requests / minute
Starter (existing)10 requests / minute
Pro (existing)60 requests / minute
Scale (existing)300 requests / minute
Enterprise (existing)300 requests / minute

Responses include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset (Unix seconds) headers. When the limit is exceeded you receive a 429 with a Retry-After header — back off until then.

The API is for server-side use only: browser origins are not granted CORS access, and keys must never be embedded in client-side or mobile code. Call the API from your backend and keep keys in a secret manager.

Managing keys

Workspace admins manage keys at Settings → API Keys. The list shows each key's name, display prefix (the first characters of the key), scopes, creation time, and last-used time — never the key itself. Revoking a key takes effect immediately; revoked keys cannot be restored, so create a replacement key first when rotating.

Usage is metered against your workspace's existing review quota: one successful analyze call consumes one review, exactly like a review started in the app. Quota and plan limits are visible on the dashboard Subscription page.

Questions about the API?
Our team can help you plan an integration.
Contact Support