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", "conversation_id": "cc71b11a-25cd-4c2d-9950-df2cc38e3407", "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" ], "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 Sms
Send an outbound SMS. Sends synchronously — the response reports the final status (sent or failed), not a queued placeholder, though delivery confirmation from the carrier can still arrive later as a webhook or GET /v1/sms/{sms_id} update. An explicit from resolves a dedicated number; otherwise Hail picks an alphanumeric sender ID where the destination corridor allows it, or requires a dedicated SMS-capable number otherwise. Requires recipient_consent=true on the request body; Hail does not verify lawful basis to contact the recipient, the caller warrants it.