Authorization header. There are no OAuth flows, no request signing, and no session cookies. One header, one key.
API key format
A BlueReacher key is a single string that starts withbluereacher_:
- Store it as a variable-length string. Key length can change over time, so do not cap the column or config field at a fixed size.
- Match on the
bluereacher_prefix if you need to detect keys in logs or scrub them from output.
Where keys come from
Keys are generated per customer in the BlueReacher dashboard under Settings, API Keys. Create one, give it a name that says where it runs (production-crm, staging-worker), and copy it immediately. The full key is shown once at creation. After that the dashboard displays only the prefix and last four characters so you can identify a key without seeing it.
You can hold several active keys at once. Use one key per service or environment. When something goes wrong you can then revoke a single key instead of taking every integration offline.
A key is scoped to your account. It can send only from lines assigned to you, and it can read only your own messages and contacts.
Sending the key
Send the key as a bearer token on every request.
The base URL is
https://api.bluereacher.com/functions/v1/.
Verify a key
The fastest way to confirm a key works is to list your lines:Authenticated request in JavaScript
Authenticated request in Python
Keeping keys safe
An API key can send messages from your lines and read your message history. Anyone holding it can do the same. Handle it like a database password.- Server side only. Call the API from your backend, a serverless function, or a workflow tool. Never put a key in browser JavaScript, a mobile app bundle, a Chrome extension, or an HTML page. Anything shipped to a device can be read off that device.
- Never commit keys to source control. Use environment variables or a secret manager (AWS Secrets Manager, Doppler, 1Password, your platform’s built-in store). Add
.envto.gitignorebefore the first commit, not after. - Keep keys out of logs and tickets. Scrub any string starting with
bluereacher_from request logs and error reports. Do not paste a key into a support ticket, a screenshot, or a shared channel. If you need help debugging, send the key prefix and last four characters. - Separate keys per environment. Production, staging, and each third-party tool get their own key. Revoking one then costs you one deploy, not five.
- Rotate on any suspicion of exposure. A key in a public repo, a shared screen, a departed contractor’s laptop, or a vendor breach all count. You do not need proof of misuse to rotate. Assume exposure means compromise.
Rotating a key
Rotation takes four steps and no downtime:- Create a new key in the dashboard with the same name plus a version suffix.
- Deploy the new key to your service and restart it.
- Watch traffic on the new key in the dashboard until you see requests landing.
- Revoke the old key.
401 versus 403
Both mean the request was rejected. They fail for different reasons and need different fixes.
Short version: 401 is about the key, 403 is about permissions.
Error responses share one shape:
code values on 401 are missing_authorization_header, malformed_authorization_header, invalid_api_key, and revoked_api_key. On 403 you will see line_not_authorized, channel_not_enabled, and account_suspended.
Neither status is retryable. Retrying a 401 or 403 with the same key produces the same result, so treat both as fatal in your queue: stop the job, alert someone, and fix the key or the permission. Reserve retries for 429 and 5xx.
Debugging checklist
If a request is failing auth, walk this list in order:- Is the header spelled
Authorizationwith the wordBearerand a single space before the key? - Did your shell or config file add quotes, a trailing newline, or a line break inside the key?
- Does the key in your environment match a key listed as active in the dashboard?
- Did the environment variable actually load? Print its length, never its value.
- Is the request hitting
https://api.bluereacher.com/functions/v1/, on HTTPS, with no redirect stripping the header?
curl command above.