import { CommuneClient } from 'commune-ai';
const commune = new CommuneClient({ apiKey: process.env.COMMUNE_API_KEY });
const inbox = await commune.inboxes.create({
localPart: 'support',
name: 'Support Agent',
domainId: 'domain_xyz789',
});
console.log(inbox.data.address); // support@mycompany.com
console.log(inbox.data.id); // uuid
from commune import CommuneClient
client = CommuneClient()
inbox = client.inboxes.create(
local_part="support",
name="Support Agent",
domain_id="domain_xyz789",
)
print(inbox.data.address) # support@mycompany.com
create_inbox(
local_part="support",
name="Support Agent"
)
curl -X POST https://api.commune.email/v1/inboxes \
-H "Authorization: Bearer comm_..." \
-H "Content-Type: application/json" \
-d '{
"local_part": "support",
"name": "Support Agent",
"domain_id": "domain_xyz789"
}'
commune inboxes create --local-part "support" --name "Support Agent" --domain-id "domain_xyz789"
{
"data": {
"id": "3d4f5a6b-7c8d-9e0f-a1b2-c3d4e5f6a7b8",
"localPart": "support",
"address": "support@mycompany.com",
"displayName": "Support Agent",
"agent": {
"name": "Support Agent"
},
"status": "active",
"createdAt": "2026-02-25T10:00:00.000Z",
"domain_id": "domain_xyz789",
"domain_name": "mycompany.com"
}
}
{
"error": "Missing required field: local_part"
}
{
"error": "unauthorized",
"message": "Invalid or missing API key"
}
{
"error": "Domain not found"
}
Inboxes
Create inbox
Create a new inbox for an agent. The domain is auto-resolved if not provided.
POST
/
v1
/
inboxes
import { CommuneClient } from 'commune-ai';
const commune = new CommuneClient({ apiKey: process.env.COMMUNE_API_KEY });
const inbox = await commune.inboxes.create({
localPart: 'support',
name: 'Support Agent',
domainId: 'domain_xyz789',
});
console.log(inbox.data.address); // support@mycompany.com
console.log(inbox.data.id); // uuid
from commune import CommuneClient
client = CommuneClient()
inbox = client.inboxes.create(
local_part="support",
name="Support Agent",
domain_id="domain_xyz789",
)
print(inbox.data.address) # support@mycompany.com
create_inbox(
local_part="support",
name="Support Agent"
)
curl -X POST https://api.commune.email/v1/inboxes \
-H "Authorization: Bearer comm_..." \
-H "Content-Type: application/json" \
-d '{
"local_part": "support",
"name": "Support Agent",
"domain_id": "domain_xyz789"
}'
commune inboxes create --local-part "support" --name "Support Agent" --domain-id "domain_xyz789"
{
"data": {
"id": "3d4f5a6b-7c8d-9e0f-a1b2-c3d4e5f6a7b8",
"localPart": "support",
"address": "support@mycompany.com",
"displayName": "Support Agent",
"agent": {
"name": "Support Agent"
},
"status": "active",
"createdAt": "2026-02-25T10:00:00.000Z",
"domain_id": "domain_xyz789",
"domain_name": "mycompany.com"
}
}
{
"error": "Missing required field: local_part"
}
{
"error": "unauthorized",
"message": "Invalid or missing API key"
}
{
"error": "Domain not found"
}
import { CommuneClient } from 'commune-ai';
const commune = new CommuneClient({ apiKey: process.env.COMMUNE_API_KEY });
const inbox = await commune.inboxes.create({
localPart: 'support',
name: 'Support Agent',
domainId: 'domain_xyz789',
});
console.log(inbox.data.address); // support@mycompany.com
console.log(inbox.data.id); // uuid
from commune import CommuneClient
client = CommuneClient()
inbox = client.inboxes.create(
local_part="support",
name="Support Agent",
domain_id="domain_xyz789",
)
print(inbox.data.address) # support@mycompany.com
create_inbox(
local_part="support",
name="Support Agent"
)
curl -X POST https://api.commune.email/v1/inboxes \
-H "Authorization: Bearer comm_..." \
-H "Content-Type: application/json" \
-d '{
"local_part": "support",
"name": "Support Agent",
"domain_id": "domain_xyz789"
}'
commune inboxes create --local-part "support" --name "Support Agent" --domain-id "domain_xyz789"
{
"data": {
"id": "3d4f5a6b-7c8d-9e0f-a1b2-c3d4e5f6a7b8",
"localPart": "support",
"address": "support@mycompany.com",
"displayName": "Support Agent",
"agent": {
"name": "Support Agent"
},
"status": "active",
"createdAt": "2026-02-25T10:00:00.000Z",
"domain_id": "domain_xyz789",
"domain_name": "mycompany.com"
}
}
{
"error": "Missing required field: local_part"
}
{
"error": "unauthorized",
"message": "Invalid or missing API key"
}
{
"error": "Domain not found"
}
Body
string
required
The local part of the email address (the part before
@). For example, "support" creates support@yourdomain.com.Accepts either local_part or localPart.string
ID of the domain to create the inbox on. If not provided, Commune auto-resolves the domain for your organization — using your first custom domain, or falling back to the shared Commune domain.Accepts either
domain_id or domainId.string
Display name for the inbox and the associated agent. Shown as the
From display name when sending email from this inbox (e.g. "Support Agent" <support@mycompany.com>).Also accepted as display_name or displayName.object
string
Initial inbox status. Defaults to
"active".Response
object
Hide properties
Hide properties
string
Unique inbox identifier (UUID).
string
The local part of the inbox email address.
string
Full email address of the inbox (e.g.
support@mycompany.com).string
Display name shown in the
From header when sending.object
string
Current inbox status.
string
ISO 8601 creation timestamp.
string
ID of the domain this inbox belongs to.
string
Domain name (e.g.
mycompany.com). Only present when the domain is auto-resolved.Last modified on March 19, 2026
Was this page helpful?

