Create Email
Header Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/emails" \ -H "Content-Type: application/json" \ -d '{ "recipient_consent": true, "to": [ "string" ], "subject": "string" }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "email_domain_id": "b3a00cb4-43d0-468a-8a5d-50c998cb143f", "direction": "outbound", "from_address": "string", "from_name": "string", "to_addresses": [ "string" ], "cc_addresses": [ "string" ], "bcc_addresses": [ "string" ], "reply_to": "string", "subject": "string", "status": "queued", "end_reason": "string", "provider_message_id": "string", "requested_at": "2019-08-24T14:15:22Z", "sent_at": "2019-08-24T14:15:22Z", "failed_at": "2019-08-24T14:15:22Z", "metadata": {}, "body_text": "string", "body_html": "string", "message_id": "string", "in_reply_to": "string", "references_ids": [ "string" ], "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978", "agent_reply_state": "string", "spam_verdict": "string", "virus_verdict": "string", "dkim_verdict": "string", "spf_verdict": "string", "dmarc_verdict": "string", "provider_received_at": "2019-08-24T14:15:22Z", "raw_url": "string", "attachments": [], "last_event_at": "2019-08-24T14:15:22Z"}Create Email Domain
Register a sender identity to send outbound email through. kind="hail_mail" mints an address on the shared hail-mail domain and is immediately verified — no DNS work needed. kind="custom" registers your own domain with SES and returns DKIM records; the domain stays unverified (POST /v1/email-domains/{domain_id}/verify) until you publish those DNS records and Hail confirms them.
Create File Upload
Make a one-time link to upload one file with a plain HTTP PUT. For callers whose shell has no Hail key (an agent using the MCP). Send the raw bytes to `upload_url` with `PUT` and no Authorization header, once, before `expires_at` (15 minutes): ``` curl --silent --show-error --globoff --upload-file 'passport.jpg' '<upload_url>' ``` The PUT answers with `size_bytes` and `sha256` of what was stored. An organization may hold at most 50 unused, unexpired links. A `knowledge_document` needs the knowledge base turned on for the workspace (403), and `max_bytes` is the workspace's file limit. For `sms_evidence` the PUT also answers with `url`, the public link for an `*_evidence_url` field of a US texting registration. It works like `POST /v1/verifications/sms/evidence`.