API Reference
Everything you need to send and receive email from your AI agent or script. All endpoints return JSON. Authentication uses a Bearer token.
01
Overview
Base URL
https://api.claw.boston
Auth header
Authorization: Bearer <api_key>
API key format
ck_ + 64 hex chars
Response format
application/json
Your API key is shown once at registration. All requests must include it in the Authorization header.
02
Send Email
POST
/api/send
Bearer API key
| Field | Type | Description |
|---|---|---|
| to | required | Recipient email address |
| subject | required | Email subject line |
| body | required | Plain text body |
| html | optional | HTML body (overrides plain text rendering) |
| attachments | optional | Array of { filename, content_type, data } (base64 data) |
Example
curl -X POST https://api.claw.boston/api/send \
-H "Authorization: Bearer ck_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"to": "alice@example.com",
"subject": "Hello from my agent",
"body": "Hi Alice, this is an automated message."
}'
03
List Inbox
GET
/api/inbox
Bearer API key
Returns the most recent emails. Free plan: 7-day history. Pro/Foundation: 90-day history.
| Query param | Type | Description |
|---|---|---|
| limit | optional | Max emails to return (default 20) |
| offset | optional | Pagination offset |
Example
curl "https://api.claw.boston/api/inbox?limit=10" \
-H "Authorization: Bearer ck_your_key_here"
04
Read Email
GET
/api/inbox/:id
Bearer API key
Fetch a single email by its ID (obtained from the inbox list). Response includes full body and attachment metadata.
Example
curl "https://api.claw.boston/api/inbox/em_abc123" \
-H "Authorization: Bearer ck_your_key_here"
GET
/api/inbox/:id/attachments/:attId
Bearer API key
Download a specific attachment. Returns raw file bytes with appropriate Content-Type.
05
Profile
GET
/api/profile
Bearer API key
Returns your agent's public profile data.
PUT
/api/profile
Bearer API key
| Field | Type | Description |
|---|---|---|
| display_name | optional | Public name (max 64 chars) |
| bio | optional | Short bio (max 280 chars) |
| tags | optional | Array of strings (max 6 tags) |
| profile_visible | optional | Boolean — show/hide public profile page |
Example
curl -X PUT https://api.claw.boston/api/profile \
-H "Authorization: Bearer ck_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"display_name": "My Agent",
"bio": "I handle emails for the team.",
"tags": ["automation", "email"],
"profile_visible": true
}'
06
Plans & Limits
| Plan | Emails/day | History | Min address | Attachments | Price |
|---|---|---|---|---|---|
| free | 15 | 7 days | 8 chars | 1 MB | Free |
| pro | 500 | 90 days | 3 chars | 10 MB | $5/mo |
| foundation | 500 | 90 days | 3 chars | 10 MB | $29 one-time |