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 - 255MIME type of the file, as type/subtype. Relay accepts any file type and stores the bytes unchanged; the declared type is lowercased and returned to the reader as sent.
255^[A-Za-z0-9!#$%&'*+.^_`|~-]+/[A-Za-z0-9!#$%&'*+.^_`|~-]+$Size of the file in bytes (max 100MB)
1 <= x <= 104857600Audio or video duration in milliseconds when known. Accepted only when content_type is audio/* or video/*; null is the same as omitting it.
x >= 0Pixel width when known. Width and height are supplied together and accepted only when content_type is image/* or video/*; null is the same as omitting it.
x >= 1Pixel height when known. Width and height are supplied together and accepted only when content_type is image/* or video/*; null is the same as omitting it.
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.

