Skip to main content
Base URL:
Use the REST API when your software needs to read or change a Brein workspace directly. For an AI client, start with MCP and OAuth instead.

Authentication

Send a scoped API key in the x-api-key header:
A missing or invalid key returns 401. A valid key without permission for the workspace or action returns 403. Keep keys in your secret manager. Never commit them to source control or put them in customer-facing output.

Main resources

Every workspace route is scoped to the workspace in the URL. Do not assume that a route from one workspace can be used with another workspace’s credentials.

Usage and actions

Reads and contact actions have different cost rules. A successful response can include the current usage state. If an allowance is exhausted, the API returns an actionable 402 instead of silently continuing. Contact lookup is separate from saving a contact. Campaign creation is separate from campaign activation. A campaign is not sent until the required human confirmation succeeds.

Errors

See Errors for the shared response shape and common status codes.

Security

See Security for credential storage, workspace access, contact boundaries, and outbound email rules.