Skip to Content
API keys are issued to organizations with a signed BAA. Request API access →
Authentication

Authentication

Every request is authenticated with an API key sent as a Bearer token:

Header
Authorization: Bearer bt_live_4f7c2a9e1b...

Requests without a valid key return 401 Unauthorized. All requests must use HTTPS.

Getting a key

API keys are issued to organizations with a signed BAA. Request API access to get started.

Your organization is enabled

After the BAA is signed, we turn on API access for your organization.

An admin creates an app user

The app user represents your integration in conversations. Give it a clear name, like “Intake Bot”.

The admin issues a key with scopes

Pick only the scopes your integration needs. The key is shown once, so store it in your secrets manager straight away.

Keep keys server-side. Never put a key in a browser, a mobile app, a public repository, or an AI prompt that leaves your infrastructure.

Scopes

Each key carries the scopes an admin grants it. A request outside the key’s scopes returns 403 with code: insufficient_scope. Every endpoint in the API reference lists the scope it needs.

ScopeAllowsEndpoints
organization:readRead the organizationRetrieve the organization
users:readList and read membersList users, Retrieve a user
conversations:readList and read conversationsList, Retrieve
messages:readRead messages and repliesList messages, List replies
messages:writeSend messages and repliesSend a message
reactions:readRead reactionsList reactions
reactions:writeAdd and remove reactionsAdd, Remove
participants:readList participantsList participants
participants:writeAdd and remove participantsAdd, Remove
broadcasts:readRead broadcastsList, Retrieve, Messages
exports:readCheck and download exportsRetrieve an export
exports:writeStart exportsExport a conversation

Common scope sets

Posts reminders and nothing else.

conversations:read messages:write

Keys for AI agents

An AI agent acts on its own judgment, so give it less access than a script you wrote line by line.

Give the agent its own app user

Never share a key between an agent and another integration. A dedicated app user, named so staff recognize it (like “Scheduling Assistant”), lets you audit and revoke the agent on its own.

Start read-only

Begin with conversations:read and messages:read. Have the agent post drafts to a staff group for review, and add messages:write for patient conversations only once you trust its output.

Limit where it can go

Add the app user only to the conversations the agent needs. Membership is the boundary: an agent can’t read or post anywhere it hasn’t been added.

Keep the key out of the model

Store the key in your agent’s secret store or environment, like BLOOMTEXT_API_KEY. Never put it in a prompt, a tool description, or chat history.

The model provider behind your agent sees whatever the agent reads. If the agent can read patient conversations, the provider needs a BAA with your organization.

See Build an AI agent and the MCP server for the full setup.

Conversation access

Scopes decide what a key can do. Conversation membership decides where. A key can read or write a conversation only while its app user is a participant, and a request for any other conversation returns 403 with code: conversation_membership_required.

Adding a participant with participants:write is limited to existing organization members. It never widens what your app user can see.

Rotating and revoking keys

  • Rotate by issuing a second key for the same app user, deploying it, then revoking the old one. Both work during the overlap.
  • Revoke from BloomText at any time. Revocation takes effect on the next request.
  • Remove the app user from a conversation to cut off just that conversation.

Verify your key

A quick way to check a key works and see which organization it belongs to:

curl https://api.bloomtext.com/v1/organization \ -H "Authorization: Bearer $BLOOMTEXT_API_KEY"
Response · 200 OK
{ "id": "6db1e3f5-9b7f-4f2b-8be1-0f1e1d7d7d8c", "name": "Riverside Family Clinic" }
Last updated on