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

Quickstart

This guide takes you from an API key to a message in a real BloomText conversation. You’ll list the conversations your app user can see, then post into one.

Get an API key

API keys are issued to organizations with a signed BAA. Request API access if you don’t have one yet. Once your organization is enabled, an admin creates an app user for your integration and gives you its key.

Store the key in an environment variable. Never commit it or ship it to a browser.

Terminal
export BLOOMTEXT_API_KEY="bt_live_4f7c2a9e1b..."

Add your app user to a conversation

In BloomText, open the conversation you want to test with and add your app user as a participant, like you’d add a colleague. The API only returns conversations your app user belongs to.

Use an internal staff conversation for testing, not one with a patient.

List your conversations

Request
curl https://api.bloomtext.com/v1/conversations \ -H "Authorization: Bearer $BLOOMTEXT_API_KEY"

The response lists every conversation your app user is in. Copy the id of your test conversation.

Response · 200 OK
{ "data": [ { "id": "e5c3b7b8-8f08-4d5a-9af1-0d11b0f4b7a0", "organization_id": "6db1e3f5-9b7f-4f2b-8be1-0f1e1d7d7d8c", "type": "group", "created_at": "2026-09-14T16:02:11Z" } ], "pagination": { "next_cursor": null, "has_more": false } }

Send a message

Post a message into that conversation. The Idempotency-Key header makes the request safe to retry. See Idempotency.

Request
curl -X POST https://api.bloomtext.com/v1/conversations/e5c3b7b8-8f08-4d5a-9af1-0d11b0f4b7a0/messages \ -H "Authorization: Bearer $BLOOMTEXT_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{"body": "Hello from the BloomText API 👋"}'

You get back the new Message object, and the message shows up in BloomText under your app user’s name.

Response · 201 Created
{ "id": "4cbfdb50-6b7d-45d4-94b3-05a52ce3f4d1", "conversation_id": "e5c3b7b8-8f08-4d5a-9af1-0d11b0f4b7a0", "sender_id": "8b9c2d2f-6b1a-44f4-a7b1-0d6d3f2d6f55", "created_at": "2026-09-21T15:04:05Z", "type": "text", "body": "Hello from the BloomText API 👋", "file": null, "reply_to_message_id": null }

Next steps

Last updated on