Skip to main content

Quickstart

Make your first API call in 5 minutes.

1. Create an API Key

  1. Go to dialogbrain.com
  2. Open Settings → Developer
  3. Click Create New Key, give it a name
  4. Copy the key immediately — it's only shown once

2. List Your Conversations

curl https://api.dialogbrain.com/api/v1/conversations \
-H "X-API-Key: db_live_YOUR_KEY_HERE"

Response:

[
{
"id": "telegram:123456789",
"title": "Alice",
"channel": "telegram",
"last_message_at": "2026-03-11T10:00:00Z"
}
]

3. Send a Message

curl -X POST https://api.dialogbrain.com/api/v1/messages/send \
-H "X-API-Key: db_live_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"thread_id": "telegram:123456789", "message_text": "Hello from the API!"}'

4. Use the Python SDK

pip install dialogbrain
import asyncio
from dialogbrain import DialogBrainClient

async def main():
async with DialogBrainClient(api_key="db_live_YOUR_KEY_HERE") as client:
conversations = await client.conversations.list()
for conv in conversations:
print(conv["title"])

asyncio.run(main())

5. Connect to Claude Code (MCP)

claude mcp add --transport http dialogbrain https://api.dialogbrain.com/mcp/

DialogBrain uses OAuth — Claude Code will open a browser to authenticate.