Agent API

Add email to your agent in minutes

One API call provisions a full email account — org, inbox, and API key, ready to send. No dashboard required. Exposes a hosted MCP endpoint so any MCP-compatible agent can send and read email immediately.

Step 1

Sign up via API

A single POST /api/onboard call provisions your org, inbox, and API key. No email verification for the free tier.

bash
curl -s -X POST https://workspace.getindigo.ai/api/onboard \
  -H "Content-Type: application/json" \
  -d '{"email": "agent@example.com", "orgName": "My Agent Org"}'

Response:

json
{
  "orgId": "org_...",
  "apiKey": "iws_...",
  "accountEmail": "my-agent-org@workspace.getindigo.ai",
  "mcpUrl": "https://workspace.getindigo.ai/api/mcp"
}
Step 2

Send your first email

Use the apiKey from step 1 in the x-api-key header. The accountId is the accountEmail returned at onboarding.

bash
# Use the apiKey returned from /api/onboard
curl -s -X POST https://workspace.getindigo.ai/api/emails/send \
  -H "Content-Type: application/json" \
  -H "x-api-key: iws_YOUR_API_KEY" \
  -d '{
    "accountId": "my-agent-org@workspace.getindigo.ai",
    "to": ["recipient@example.com"],
    "subject": "Hello from my agent",
    "body": "This email was sent programmatically via the Indigo Workspace API."
  }'
Step 3

Connect via MCP

Add the cloud MCP endpoint to your agent config. No local server needed — the MCP endpoint is hosted at https://workspace.getindigo.ai/api/mcp.

json
{
  "mcpServers": {
    "indigo-workspace": {
      "type": "http",
      "url": "https://workspace.getindigo.ai/api/mcp",
      "headers": {
        "x-api-key": "iws_YOUR_API_KEY"
      }
    }
  }
}

Then call MCP tools directly from your agent:

typescript
// In your agent, use MCP tool calls directly:

// Send an email
await mcpClient.callTool("send_email", {
  accountId: "my-agent-org@workspace.getindigo.ai",
  to: ["user@example.com"],
  subject: "Notification from agent",
  body: "Your task has completed."
});

// Read the inbox
const { emails } = await mcpClient.callTool("list_emails", {
  accountId: "my-agent-org@workspace.getindigo.ai",
  mailbox: "inbox",
  limit: 10
});
Reference

Available MCP tools

send_emailSend an email from your account
list_emailsList emails in a mailbox (inbox, sent, drafts…)
read_emailFetch a full email with body and attachments
search_emailsFull-text search across all mailboxes
list_threadsList email threads grouped by conversation
read_threadFetch all emails in a thread
create_accountProvision a new email account in your org
list_accountsList all email accounts in your org
add_domainRegister a custom domain
list_domainsList domains and their verification status

MCP endpoint: https://workspace.getindigo.ai/api/mcp
REST base: https://workspace.getindigo.ai/api
Auth: x-api-key header on all requests