Newsletters

Prepare a one-time newsletter asset upload

Create a five-minute direct-to-storage PUT URL and single-use completion URL bound to this API key, organization, filename, content type, byte size, and SHA-256 digest. Video preparations also include a one-time JPEG poster PUT. Idempotency-Key is forbidden because the response contains one-time URLs.

post/newsletter-assets/upload-tokens

Request

  • Base URL: https://shipmail.to/api/v1
  • URL: https://shipmail.to/api/v1/newsletter-assets/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_type'image/gif' | 'image/jpeg' | 'image/png' | 'image/webp' | 'video/mp4' | 'video/quicktime' | 'video/webm' required
sizeinteger required
sha256string required

Response

One-time newsletter asset upload prepared.

OR

Changes

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