Messages

Stage an outbound attachment

Reserve an attachment_id and a presigned S3 URL, then PUT the bytes to that URL and reference the id when sending. Two steps by necessity: a send request cannot carry more than a few megabytes, which is less than one phone photo. The same attachment_id can be attached to any number of messages without re-uploading, and expires after 7 days if unused.

post/v1/attachments

Request

  • Base URL: https://api.deadsimple.email
  • URL: https://api.deadsimple.email/v1/attachments
  • Auth: HTTP bearer

Request body

filenamestring required
content_typestring

Guessed from the file extension when omitted.

sizeinteger

Optional; rejected up front if over the limit.

Response

Attachment staged; PUT the bytes to upload_url

attachment_idstring
upload_urlstring uri
expires_ininteger
max_bytesinteger

Changes

No recorded changes to this operation across all 1 revision of this API.