Mailbox API

Create a presigned mailbox attachment upload

Changed on

Creates a short-lived signed PUT URL for one attachment. The caller must be authenticated to mint the URL; the later PUT uses the signed URL, exact Content-Type, and exact Content-Length without sending a bearer token. The PUT returns a blob ID that can be supplied to POST /mailbox/messages/send.

post/mailbox/attachment-uploads

Request

  • Base URL: https://app.sendmux.ai/api/v1
  • URL: https://app.sendmux.ai/api/v1/mailbox/attachment-uploads
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.sendmux.ai/oauth/authorize, token URL https://app.sendmux.ai/oauth/token, scopes: email.send)
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.sendmux.ai/oauth/authorize, token URL https://app.sendmux.ai/oauth/token, scopes: mailbox.read, mailbox.drafts.write)

Query parameters

mailbox_idstring

Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.

Request body

content_typestring required

Content-Type that must be sent on the later PUT request.

filenamestring required

Filename to use when sending the uploaded attachment.

size_bytesinteger required

Exact byte length that must be sent on the later PUT request.

Example request

{
  "content_type": "application/pdf"
}

Response

Attachment upload URL created

oktrue required

Example response

{
  "meta": {
    "request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
  },
  "data": {
    "upload_url": "https://app.sendmux.ai/api/v1/mailbox/attachment-uploads/upl_123?upload_token=..."
  }
}

Changes