Skip to main content

1. Get Your API Key

Log in to the dashboard and paste your API key when prompted. All API requests use Authorization: Bearer YOUR_API_KEY.

2. Add Your Domain

curl -X POST https://api.actionlayer.dev/v1/domains \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain": "yourcompany.com"}'
The response contains four DNS records to add at your registrar:
  • DKIM — email signing
  • SPF — sender authorization
  • MX — inbound routing
  • Ownership — domain verification

3. Verify DNS

Once you’ve added the records, trigger verification:
curl -X POST https://api.actionlayer.dev/v1/domains/{domain_id}/verify \
  -H "Authorization: Bearer YOUR_API_KEY"
All four records must show verified: true before you can send.

4. Create a Sender Identity

curl -X POST https://api.actionlayer.dev/v1/identities \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "display_name": "Alex (AI Assistant)",
    "local_part": "assistant",
    "domain_id": "YOUR_DOMAIN_ID"
  }'
This creates assistant@yourcompany.com as a real sending address.

5. Send an Email

curl -X POST https://api.actionlayer.dev/v1/emails/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "identity_id": "YOUR_IDENTITY_ID",
    "to": "recipient@example.com",
    "subject": "Hello from my AI assistant",
    "body": "This email was sent by an AI assistant via ActionLayer."
  }'
By default, emails go through a human approval step before sending. Set approval_mode: "auto" on an identity to enable direct sending.

Next Steps

Authentication

Learn about API keys, scopes, and best practices.

MCP Server

Connect Claude Code or any MCP agent directly.

Drafts & Approval

Understand the draft submission and approval workflow.

Rule Engine

Auto-route inbound emails with conditions and actions.