Skip to main content
The Commune API lets your agent send and receive email and SMS, manage inboxes and phone numbers, and handle multi-turn conversations with real users — all over standard HTTP.

Base URL

All endpoints are served over HTTPS. HTTP requests are rejected.

SDKs

TypeScript

npm install commune-ai — the official Node.js/TypeScript SDK.

Python

pip install commune-mail — the official Python SDK with CLI included.

MCP Server

uvx commune-mcp — use Commune directly in Claude, Cursor, and Windsurf.

REST API

Language-agnostic. Any HTTP client works. Authenticated with a Bearer token.

Quick reference

Send an email

POST /v1/messages/send

Create an inbox

POST /v1/inboxes

Send an SMS

POST /v1/sms/send

Buy a phone number

POST /v1/phone-numbers/purchase

List messages

GET /v1/messages

Get credit balance

GET /v1/credits

Authentication

All requests require an API key passed as a Bearer token:
Get your API key →

Response format

All successful responses return a data field:
All errors return an error code and message:
Full error reference →
Last modified on March 19, 2026