# BloomText API > REST API for BloomText, HIPAA-compliant messaging for healthcare teams: message patients by phone number or patient ID, read and search patient messages and check delivery, manage patient records, and provision staff (members and teams) across an account's organizations. Base URL: https://api.bloomtext.com/v1. Authenticate with an API key sent as a Bearer token; a key that reaches several organizations names one with org_id. Turned on per account when the customer asks, and returning an error until BloomText turns them on: OAuth (client credentials and authorization code, /me and /users), webhooks, API identities, phone-number limits on keys, campaigns, patient imports, and audit events. API access requires a signed BAA. Every page is also available as Markdown at the links below. The full text of all pages is at https://www.bloomtext.com/developers/api/llms-full.txt, and the OpenAPI 3.1 spec is at https://www.bloomtext.com/developers/api/openapi/bloomtext-api.yaml. ## Docs - [BloomText API](https://www.bloomtext.com/developers/api/index.md): Bring BloomText into your own software: patient texting and patient records, and staff provisioning across your account's organizations, with an API key and a downloadable OpenAPI spec. - [Core concepts](https://www.bloomtext.com/developers/api/concepts.md): Accounts, organizations, API keys, members and teams, patients, phone numbers, conversations and messages, and the access rules that govern each in the BloomText API. - [Authentication](https://www.bloomtext.com/developers/api/authentication.md): Authenticate with an API key sent as a Bearer token, choose its scopes, attach sending keys to an API identity, limit keys to some organizations or phone numbers, and connect apps with OAuth. - [Quickstarts](https://www.bloomtext.com/developers/api/quickstart.md): Pick a BloomText API quickstart: the Patient API with an API key, or OAuth for an org admin's own conversations. - [Patient API quickstart](https://www.bloomtext.com/developers/api/patient-api-quickstart.md): Make your first Patient API requests with an API key. Text your phone, check delivery, read the reply, and clean up. - [API keys](https://www.bloomtext.com/developers/api/api-keys.md): Create an API key, send it as a Bearer token, and choose its scopes, the organizations and phone numbers it reaches, its expiry, and how to rotate it. - [Send messages to patients](https://www.bloomtext.com/developers/api/send-messages.md): Text a patient by phone number or patient ID in one request. BloomText finds or creates the patient, sends securely by default, and reports delivery. - [API identities](https://www.bloomtext.com/developers/api/api-identity.md): Give your integration its own automated sender, a bot on your account with a name, avatar and chosen teams and numbers, and attach API keys to it so every message it sends comes from that sender. - [Patients](https://www.bloomtext.com/developers/api/patients.md): Find patients by phone number or MRN; create, update and delete them, import them in bulk; and read each patient's conversations and messages. - [Campaigns](https://www.bloomtext.com/developers/api/campaigns.md): Send one message to many patients from a clinic phone number. Create, start, pause, stop, and archive campaigns, and track each delivery. - [Webhooks](https://www.bloomtext.com/developers/api/webhooks.md): Get a signed HTTPS request when a patient writes in or a text's delivery status changes, instead of polling. Set up, events, payloads, signature checks, retries and secret rotation. - [Build an AI agent](https://www.bloomtext.com/developers/api/ai-agents.md): Give an AI agent BloomText tools, with an API key for patient work or an org admin's OAuth token for their own conversations, and clear rules for what it sends. - [Manage members](https://www.bloomtext.com/developers/api/members-api.md): Add, change, and remove staff members and team placements across the organizations on your account with an account API key, so an HR or identity system keeps BloomText in step. - [SSO and Directory Sync](https://www.bloomtext.com/developers/api/identity-and-sso.md): How Okta single sign-on and Directory Sync work with BloomText, what they manage, how they fit with the members API, and which identity providers BloomText supports. - [Read messages](https://www.bloomtext.com/developers/api/read-messages.md): Read BloomText patient messages in a time range with GET /patient-messages, one by one or grouped by conversation, and keep up with new ones; with OAuth, a person's own messages under /me. - [Search messages](https://www.bloomtext.com/developers/api/search.md): Search BloomText patient messages with words and operators like from:patient, mrn:, and is:failed, combined with an after and before time range. - [Reporting and audit data](https://www.bloomtext.com/developers/api/reporting-and-audit.md): Pull delivery and membership data through the API, export Message reports and the Audit log as CSV from BloomText, and read audit events through the API. - [Security and BAA](https://www.bloomtext.com/developers/api/security-and-baa.md): How the BloomText API protects patient data, what your integration is responsible for under HIPAA, and the BAA required for API access. - [OAuth quickstart](https://www.bloomtext.com/developers/api/oauth-quickstart.md): Connect your own BloomText admin account with OAuth, read the last week of your conversations chat by chat, and reply in a team chat. - [Connect with OAuth](https://www.bloomtext.com/developers/api/oauth.md): Connect an org admin's BloomText account to your app with the OAuth 2.0 authorization code flow and PKCE, or authenticate an API key with client credentials; refresh tokens and handle revocation. - [Build a daily message digest](https://www.bloomtext.com/developers/api/guides/daily-digest.md): Pull an org admin's BloomText messages from the last day with OAuth and turn them into events, follow-ups, and to-dos inside your EHR or EMR. - [Docs for AI agents](https://www.bloomtext.com/developers/api/llms.md): Machine-readable BloomText API docs for LLMs and coding agents, including llms.txt, per-page Markdown, the OpenAPI spec, and an agent skill. - [Pagination](https://www.bloomtext.com/developers/api/pagination.md): Page through BloomText API list endpoints with opaque cursors, page[limit], and page[after]. - [Idempotency](https://www.bloomtext.com/developers/api/idempotency.md): Retry BloomText API writes safely with the Idempotency-Key header, without sending a message or creating a record twice. - [Errors](https://www.bloomtext.com/developers/api/errors.md): How the BloomText API reports errors, with HTTP status codes, problem details, and machine-readable error codes. - [Rate limits](https://www.bloomtext.com/developers/api/rate-limits.md): BloomText API rate limits, rate limit headers, and how to stay under them. - [Changelog](https://www.bloomtext.com/developers/api/changelog.md): Dated changes to the BloomText API and these docs, including new endpoints, fields, authentication, and behavior changes. ## API reference - [API reference](https://www.bloomtext.com/developers/api/reference.md): Every BloomText API endpoint and object, with parameters, scopes, example requests, and responses, and the OpenAPI spec to download. - [Patient API endpoints](https://www.bloomtext.com/developers/api/reference/patient-api-endpoints.md): Every endpoint an API key can call in the BloomText Patient API, grouped by resource, with the scope each one needs. - [The Organization object](https://www.bloomtext.com/developers/api/reference/organization-object.md): Attributes of a BloomText Organization and the endpoints that return it. - [Retrieve the organization](https://www.bloomtext.com/developers/api/reference/get-organization.md): Returns the organization the API key or access token belongs to. Works with any valid credential and scope, so it's a quick way to check a key or token. - [The Patient object](https://www.bloomtext.com/developers/api/reference/patient-object.md): Attributes of a BloomText Patient and the endpoints that return it. - [Find patients](https://www.bloomtext.com/developers/api/reference/list-patients.md): Finds the patients with a phone number or MRN. Pass at least one of phone or mrn; there's no way to list the whole directory. A phone number can match several patients, like a shared family phone. - [Create a patient](https://www.bloomtext.com/developers/api/reference/create-patient.md): Creates a patient, or returns the existing one that matches by MRN, then phone, then email. A new patient returns 201; a match returns 200 with matched_by and doesn't change the existing record. - [Retrieve a patient](https://www.bloomtext.com/developers/api/reference/get-patient.md): Returns a patient. Parameters, responses, and code examples in cURL, JavaScript, Python, Go, and Ruby. - [Update a patient](https://www.bloomtext.com/developers/api/reference/update-patient.md): Updates the fields you send and leaves the rest unchanged. Parameters, responses, and code examples in cURL, JavaScript, Python, Go, and Ruby. - [Delete a patient](https://www.bloomtext.com/developers/api/reference/delete-patient.md): Deletes a patient record, as deleting a patient in BloomText does. Their conversations stay in BloomText for your records and for the staff in them. Pending campaign messages to the patient are cancelled. - [The Patient import object](https://www.bloomtext.com/developers/api/reference/patient-import-object.md): Attributes of a BloomText Patient import and the endpoints that return it. - [Import patients](https://www.bloomtext.com/developers/api/reference/create-patient-import.md): Starts importing up to 10,000 patients in the background. Send JSON, or CSV with Content-Type text/csv and the columns first_name, last_name, dob, mrn, phone, email. Each row is matched like Create a patient. - [Retrieve an import](https://www.bloomtext.com/developers/api/reference/get-patient-import.md): Returns an import's progress and, once it finishes, the outcome of every row. - [The Message object](https://www.bloomtext.com/developers/api/reference/message-object.md): Attributes of a BloomText Message and the endpoints that return it. - [List patient messages](https://www.bloomtext.com/developers/api/reference/list-patient-messages.md): Lists messages in patient conversations in a time range, newest first, with a cursor. group_by=message (the default) returns them one by one; group_by=conversation returns every message in the range from one conversation before moving to the next. Narrow to one patient or conversation, or search with q. Messages include everyone's in each conversation: the patient, staff, and API keys. With an API key, pass after, patient_id, or conversation_id. - [Send a message to a patient](https://www.bloomtext.com/developers/api/reference/send-message.md): Sends a message to a patient by patient_id or phone number, from one of the organization's numbers: from, else the key's default number, else the organization's only number. An organization with several numbers and no default answers 422 from_required. The message goes in that number's team's conversation with the patient, and comes from the API identity the key belongs to (an automated sender on the account, never a staff member); until identities are on for the account, it shows the key's name with an API marker. BloomText finds the patient (or creates one for a new phone number), finds or starts the conversation, and sends. Messages go by secure link unless channel is sms. - [Send messages to patients in a batch](https://www.bloomtext.com/developers/api/reference/send-message-batch.md): Sends up to 60 messages in one request. Each item is the body of a single send and is checked the same way: recipient, channel, phone number, and opt-out. The batch counts as one request toward the per-second and per-minute request limits, and each message counts toward the per-minute message limit. All of an organization's API keys share these limits. One Idempotency-Key covers the whole batch: retry with the same key and the same body to get the same results without sending anything twice. - [Retrieve a patient message](https://www.bloomtext.com/developers/api/reference/get-patient-message.md): Returns one message in a patient conversation, with its delivery status. Use it to check whether a text reached the patient. - [The Conversation object](https://www.bloomtext.com/developers/api/reference/conversation-object.md): Attributes of a BloomText Conversation and the endpoints that return it. - [List patient conversations](https://www.bloomtext.com/developers/api/reference/list-patient-conversations.md): Lists patient conversations with messages in a time range, most recently active first, each with its latest message and how many messages fell in the range. Filter to one patient with patient_id. Every request passes after or patient_id, so a read is always bounded; there's no search by patient name. - [Retrieve a patient conversation](https://www.bloomtext.com/developers/api/reference/get-patient-conversation.md): Returns a patient conversation: the patient, its phone number, and its channel. - [The Phone number object](https://www.bloomtext.com/developers/api/reference/phone-number-object.md): Attributes of a BloomText Phone number and the endpoints that return it. - [List phone numbers](https://www.bloomtext.com/developers/api/reference/list-phone-numbers.md): Lists the clinic phone numbers messages to patients can come from, each with the team it belongs to: every number in the organization. is_default marks the number a send uses when it leaves out from: the key's default number, or the organization's only number. - [The Campaign object](https://www.bloomtext.com/developers/api/reference/campaign-object.md): Attributes of a BloomText Campaign and the endpoints that return it. - [List campaigns](https://www.bloomtext.com/developers/api/reference/list-campaigns.md): Lists the organization's campaigns, newest first. Archived campaigns are left out unless archived=true. - [Create a campaign](https://www.bloomtext.com/developers/api/reference/create-campaign.md): Creates a draft campaign. Add recipients, then start it. Every recipient gets the same message, from the phone number you choose. It's sent from the API identity the key belongs to; until identities are on for the account, it shows the key's name. - [Retrieve a campaign](https://www.bloomtext.com/developers/api/reference/get-campaign.md): Returns a campaign with its progress counts. Parameters, responses, and code examples in cURL, JavaScript, Python, Go, and Ruby. - [Update a campaign](https://www.bloomtext.com/developers/api/reference/update-campaign.md): Changes a campaign's name, message, channel, phone number, or pace while it's a draft or paused, and archives or unarchives it when it isn't running. - [Delete a campaign](https://www.bloomtext.com/developers/api/reference/delete-campaign.md): Deletes a draft campaign. A campaign that has started can't be deleted, because its messages are in patients' conversations; archive it instead. - [List campaign recipients](https://www.bloomtext.com/developers/api/reference/list-campaign-recipients.md): Lists a campaign's recipients in the order they're sent, each with its delivery status. - [Add campaign recipients](https://www.bloomtext.com/developers/api/reference/add-campaign-recipients.md): Adds up to 10,000 patients to a campaign that isn't completed or stopped. Unknown patient IDs, and patients already on the campaign, are skipped and listed in skipped. Recipients added to a running campaign are sent after the ones already waiting. - [Remove campaign recipients](https://www.bloomtext.com/developers/api/reference/remove-campaign-recipients.md): Removes patients from a campaign before they're sent. Patients already sent to are skipped and listed in skipped. - [Start a campaign](https://www.bloomtext.com/developers/api/reference/start-campaign.md): Starts sending a draft campaign, or resumes a paused one. Messages go out one at a time, send_interval_seconds apart. - [Pause a campaign](https://www.bloomtext.com/developers/api/reference/pause-campaign.md): Stops sending after the message in progress. Start the campaign again to resume where it left off. - [Stop a campaign](https://www.bloomtext.com/developers/api/reference/stop-campaign.md): Stops a running or paused campaign for good. Recipients not yet sent are cancelled. A stopped campaign can't be started again. - [OAuth endpoints](https://www.bloomtext.com/developers/api/reference/oauth-endpoints.md): Every endpoint an OAuth access token can call in the BloomText API, the admin's own conversations and the Patient API, plus the authorization server's URLs. - [The Profile object](https://www.bloomtext.com/developers/api/reference/profile-object.md): Attributes of a BloomText Profile and the endpoints that return it. - [Retrieve the profile](https://www.bloomtext.com/developers/api/reference/get-profile.md): Returns the person who connected your app, their organization, the scopes they granted, and when the grant expires. - [List messages](https://www.bloomtext.com/developers/api/reference/list-messages.md): Lists messages in the connected person's own conversations, team chats and patient conversations alike, in a time range, newest first, with a cursor. group_by=message (the default) returns them one by one; group_by=conversation returns every message in the range from one conversation before moving to the next. A conversation's messages include everyone's, not only the person's own. - [Retrieve a message](https://www.bloomtext.com/developers/api/reference/get-message.md): Returns one message in the connected person's own conversations. Parameters, responses, and code examples in cURL, JavaScript, Python, Go, and Ruby. - [Send a message](https://www.bloomtext.com/developers/api/reference/create-message.md): Sends a text message as the connected person in one of their own conversations, a team chat or a patient conversation, and marks it as read for them. Set reply_to_message_id to reply in a thread. To message a patient by patient ID or phone number, use Send a message to a patient. - [The Reaction object](https://www.bloomtext.com/developers/api/reference/reaction-object.md): Attributes of a BloomText Reaction and the endpoints that return it. - [List reactions](https://www.bloomtext.com/developers/api/reference/list-reactions.md): Lists the emoji reactions on a message. Parameters, responses, and code examples in cURL, JavaScript, Python, Go, and Ruby. - [Add a reaction](https://www.bloomtext.com/developers/api/reference/create-reaction.md): Adds an emoji reaction to a message as the user. Parameters, responses, and code examples in cURL, JavaScript, Python, Go, and Ruby. - [Remove a reaction](https://www.bloomtext.com/developers/api/reference/delete-reaction.md): Removes the user's reaction from a message. Reactions have no ID of their own, so pass the exact emoji. - [List conversations](https://www.bloomtext.com/developers/api/reference/list-conversations.md): Lists the connected person's own conversations, team chats and patient conversations alike, with messages in a time range, most recently active first, each with its latest message and how many messages fell in the range. - [Retrieve a conversation](https://www.bloomtext.com/developers/api/reference/get-conversation.md): Returns one of the connected person's own conversations, with their unread count. - [The Participant object](https://www.bloomtext.com/developers/api/reference/participant-object.md): Attributes of a BloomText Participant and the endpoints that return it. - [List participants](https://www.bloomtext.com/developers/api/reference/list-participants.md): Lists the staff and patients in a conversation. Parameters, responses, and code examples in cURL, JavaScript, Python, Go, and Ruby. - [The User object](https://www.bloomtext.com/developers/api/reference/user-object.md): Attributes of a BloomText User and the endpoints that return it. - [List users](https://www.bloomtext.com/developers/api/reference/list-users.md): Lists the staff members of the user's organization, ordered by name. Parameters, responses, and code examples in cURL, JavaScript, Python, Go, and Ruby. - [Retrieve a user](https://www.bloomtext.com/developers/api/reference/get-user.md): Returns a single staff member of the user's organization. Parameters, responses, and code examples in cURL, JavaScript, Python, Go, and Ruby. - [Account endpoints](https://www.bloomtext.com/developers/api/reference/account-endpoints.md): Every endpoint an account API key can call to manage the organizations, members and teams on a BloomText account. - [The Organization (account) object](https://www.bloomtext.com/developers/api/reference/org-object.md): Attributes of a BloomText Organization (account) and the endpoints that return it. - [List organizations](https://www.bloomtext.com/developers/api/reference/list-orgs.md): Lists the organizations on your account that the API key reaches, with the default organization marked. org_id on every other call takes one of these IDs. - [The Member object](https://www.bloomtext.com/developers/api/reference/member-object.md): Attributes of a BloomText Member and the endpoints that return it. - [List members](https://www.bloomtext.com/developers/api/reference/list-members.md): Lists the members of an organization by name, with their role, account role and who manages each membership: admin (people in BloomText), api (an API key) or account (an Owner or IT person, in every organization). - [Add a member](https://www.bloomtext.com/developers/api/reference/create-member.md): Adds a person to an organization as a membership the API manages. A new email creates their BloomText user, owned by your account. They get an invite email only with send_invite_email: true. Only API keys change memberships the API made; people in BloomText see them locked as "Managed by API". - [Retrieve a member](https://www.bloomtext.com/developers/api/reference/get-member.md): Returns one member of the organization. Parameters, responses, and code examples in cURL, JavaScript, Python, Go, and Ruby. - [Update a member](https://www.bloomtext.com/developers/api/reference/update-member.md): Changes the role or title of a membership the API manages. A membership people manage in BloomText answers 409 managed_by_admin; an Owner or IT person's answers 409 managed_by_account. - [Remove a member](https://www.bloomtext.com/developers/api/reference/delete-member.md): Removes a membership the API manages. When it's the person's only organization and your account owns their user, removing them deletes the user, so the call must add confirm_delete_user=true (it then answers 204 as for any removal); without it the call answers 409 confirmation_required with reason: would_delete_user and changes nothing. - [The Team object](https://www.bloomtext.com/developers/api/reference/team-object.md): Attributes of a BloomText Team and the endpoints that return it. - [List teams](https://www.bloomtext.com/developers/api/reference/list-teams.md): Lists the teams of an organization, its default team first. Parameters, responses, and code examples in cURL, JavaScript, Python, Go, and Ruby. - [Add a member to a team](https://www.bloomtext.com/developers/api/reference/add-team-member.md): Puts a member of the team's organization on the team. Someone already on it stays as they are. - [Remove a member from a team](https://www.bloomtext.com/developers/api/reference/remove-team-member.md): Takes someone the API put on a team off it. Someone people placed in BloomText answers 409 managed_by_admin. - [The Member event object](https://www.bloomtext.com/developers/api/reference/member-event-object.md): Attributes of a BloomText Member event and the endpoints that return it. - [List member events](https://www.bloomtext.com/developers/api/reference/list-member-events.md): Lists membership changes in an organization: who was added, approved or removed, when, and by whom. A change an API key made names it as API key: . Pages by membership, newest first. - [The Audit event object](https://www.bloomtext.com/developers/api/reference/audit-event-object.md): Attributes of a BloomText Audit event and the endpoints that return it. - [List audit events](https://www.bloomtext.com/developers/api/reference/list-audit-events.md): Lists an organization's audit events, newest first, with the filters of Account → Audit: a date range, a person, actions and a patient. Each event names its action with a dotted name such as chat.viewed, the same name the audit log's CSV export uses. In BloomText today, Owners and IT see the audit log under Settings → Account → Audit and download it as CSV.