Mailboxes
Messages

Prepare a one-time attachment upload

Create a five-minute, single-use upload URL bound to this API key, organization, mailbox, filename, content type, byte size, and SHA-256 digest. Idempotency-Key is forbidden because the response contains a one-time URL.

post/mailboxes/{id}/staged-attachment-upload-tokens

Request

  • Base URL: https://shipmail.to/api/v1
  • URL: https://shipmail.to/api/v1/mailboxes/{id}/staged-attachment-upload-tokens
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://shipmail.to/api/auth/oauth2/authorize, token URL https://shipmail.to/api/auth/oauth2/token)

Headers

X-Shipmail-Organizationstring

OAuth access tokens only. The organization ID this request acts on. Required when the OAuth connection was approved for several organizations (400 validation_error without it); optional with one. An organization the connection was not approved for returns 403 authorization_error. Ignored for API keys, which belong to one organization.

Request body

filenamestring required
content_typestring required
sizeinteger required
sha256string required

Response

One-time upload prepared.

object'staged_attachment_upload' required
mailbox_idstring required
filenamestring required
content_typestring required
sizeinteger required
sha256string required
upload_urlstring uri required
expires_atstring date-time required

Changes

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