Header Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Body of POST /uploads: what the file is for, and its name and type.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/uploads" \ -H "Content-Type: application/json" \ -d '{ "purpose": "email_attachment", "filename": "string", "content_type": "string" }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "purpose": "email_attachment", "upload_url": "string", "method": "PUT", "content_type": "string", "max_bytes": 0, "expires_at": "2019-08-24T14:15:22Z"}Create Email
Send an outbound email through SES. Sends synchronously. A 201 means SES accepted the message and the response status is 'sent'; no separate poll is needed for the happy path, though a bounce or complaint can still arrive later as a webhook or GET /v1/emails/{email_id}/events entry. If the send fails, the response is 502 'email send failed' with no email body; the email is kept with status 'failed' (GET /v1/emails?status=failed) and an email.send_failed event is emitted. Requires recipient_consent=true on the request body; Hail does not verify lawful basis to contact the recipient, the caller warrants it.
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.