Pre-upload a file
Create an Attachment upload allocation.
Authorizations
Bearer token authentication. Include your API token in the Authorization header.
Format: Authorization: Bearer <your-token>
Body
Name of the file to upload
1 - 255Supported declared MIME types for uploaded Attachments and media URLs. Relay stores and returns the original bytes unchanged. Relay accepts WebP and rejects SVG as an explicit content-safety decision.
image/jpeg, image/png, image/gif, image/heic, image/heif, image/tiff, image/bmp, image/webp, image/x-icon, video/mp4, video/quicktime, video/mpeg, video/mpeg2, video/x-m4v, video/x-msvideo, video/3gpp, audio/mpeg, audio/mp3, audio/x-m4a, audio/mp4, audio/x-caf, audio/x-wav, audio/x-aiff, audio/aiff, audio/aac, audio/midi, audio/amr, application/pdf, application/vnd.apple.pkpass, text/plain, text/markdown, text/vcard, text/rtf, text/csv, text/html, text/calendar, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/x-iwork-pages-sffpages, application/x-iwork-numbers-sffnumbers, application/x-iwork-keynote-sffkey, application/epub+zip, text/xml, application/json, application/zip, application/x-gzip Size of the file in bytes (max 100MB)
1 <= x <= 104857600Audio or video duration in milliseconds when known.
x >= 0Pixel width when known. Width and height are supplied together.
x >= 1Pixel height when known. Width and height are supplied together.
x >= 1Response
Upload URL generated successfully
Unique identifier for the attachment
Opaque Relay upload URL. PUT the raw bytes with the exact required_headers before expires_at.
Opaque Relay download URL for the Attachment.
HTTP method to use for upload (always PUT)
PUT When the upload URL expires (15 minutes from now)
Exact HTTP headers required by the upload URL.

