# BloomText API

> 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.

Source: https://www.bloomtext.com/developers/api/

The BloomText API brings your BloomText account into your own software: text patients and read their replies, keep patient records in step with your EHR, and keep staff, organizations and teams in step with your HR or identity system. An account's Owners and IT create API keys and choose the organizations each one reaches.

- Patient API (API key): [quickstart](https://www.bloomtext.com/developers/api/patient-api-quickstart/)
- OAuth (a person's own conversations): [quickstart](https://www.bloomtext.com/developers/api/oauth-quickstart/)

## What you can build

## How it works

Your server texts a patient and reads the reply with an API key. No one signs in.

```mermaid
sequenceDiagram
  participant Server as Your server
  participant BT as BloomText
  participant Patient
  Server->>BT: POST /patient-messages to a phone number (API key)
  BT->>Patient: Secure link (or SMS) from the clinic's number
  Patient->>BT: Reply
  Server->>BT: GET /patient-messages?after=…&q=from:patient
  BT-->>Server: The patient's reply
```

1. BloomText turns on API access for your account, and an Owner or IT person [creates an API key](https://www.bloomtext.com/developers/api/api-keys/) under **Settings → Account → API keys**, choosing its scopes and the organizations it reaches.
2. Your server [messages patients](https://www.bloomtext.com/developers/api/send-messages/), [manages patient records](https://www.bloomtext.com/developers/api/patients/), and keeps [staff and teams](https://www.bloomtext.com/developers/api/members-api/) in step with your HR or identity system.
3. If your staff sign in with Okta, [SSO and Directory Sync](https://www.bloomtext.com/developers/api/identity-and-sso/) can manage people instead, and the API sees who manages each membership.

## The OpenAPI spec

Every endpoint is described in an OpenAPI spec you can download, feed to a client generator, or import into tools like Okta Workflows and Postman. The [API reference](https://www.bloomtext.com/developers/api/reference/) is generated from it.

Download the OpenAPI spec: [OpenAPI 3.1 (YAML)](https://www.bloomtext.com/developers/api/openapi/bloomtext-api.yaml), [OpenAPI 3.1 (JSON)](https://www.bloomtext.com/developers/api/openapi/bloomtext-api.json), [OpenAPI 3.0](https://www.bloomtext.com/developers/api/openapi/bloomtext-api-3.0.yaml) (Okta Workflows), [Swagger 2.0](https://www.bloomtext.com/developers/api/openapi/bloomtext-api-2.0.yaml) (Power Automate), and a [Postman collection](https://www.bloomtext.com/developers/api/postman/bloomtext-api.postman_collection.json).

## Turned on when you ask

Some features are turned on per account when you ask. They're documented in full, and each page has a **Request access** button that books a call: [webhooks](https://www.bloomtext.com/developers/api/webhooks/), [API identities](https://www.bloomtext.com/developers/api/api-identity/), [phone-number limits on keys](https://www.bloomtext.com/developers/api/api-keys/#limit-a-key-to-phone-numbers), [campaigns](https://www.bloomtext.com/developers/api/campaigns/), [patient imports](https://www.bloomtext.com/developers/api/patients/#import-patients), the [audit events API](https://www.bloomtext.com/developers/api/reporting-and-audit/#audit-events-api), and [OAuth](https://www.bloomtext.com/developers/api/oauth/). Everything else on these pages works today.

## Access

API access requires a signed BAA. [Request API access](https://calendly.com/tyler-bloom/bloomtext-homepage-demo-request?utm_campaign=api-access) to get started, and see [Security and BAA](https://www.bloomtext.com/developers/api/security-and-baa/) for how the API protects patient data.

> **Warning:** Don't include patient information in your access request. The form isn't a secure channel.
