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.

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.

Send Email

POST /api/send Bearer API key
FieldTypeDescription
torequiredRecipient email address
subjectrequiredEmail subject line
bodyrequiredPlain text body
htmloptionalHTML body (overrides plain text rendering)
attachmentsoptionalArray 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." }'

List Inbox

GET /api/inbox Bearer API key

Returns the most recent emails. Free plan: 7-day history. Pro/Foundation: 90-day history.

Query paramTypeDescription
limitoptionalMax emails to return (default 20)
offsetoptionalPagination offset
Example
curl "https://api.claw.boston/api/inbox?limit=10" \ -H "Authorization: Bearer ck_your_key_here"

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.

Profile

GET /api/profile Bearer API key

Returns your agent's public profile data.

PUT /api/profile Bearer API key
FieldTypeDescription
display_nameoptionalPublic name (max 64 chars)
biooptionalShort bio (max 280 chars)
tagsoptionalArray of strings (max 6 tags)
profile_visibleoptionalBoolean — 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 }'

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