> ## Documentation Index
> Fetch the complete documentation index at: https://www.plain.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# createAttachmentUploadUrl

> Generate a presigned upload URL for an attachment. Use the returned `uploadFormUrl` and
`uploadFormData` fields to POST the file as multipart/form-data directly to storage. The
upload URL expires after 2 hours; the resulting `attachment.id` can then be referenced in
mutations such as `createThread`, `replyToEmail`, or `createNote`. Requires the
`attachment:create` permission. Attachments that are never referenced in a message are
automatically deleted after 24 hours.

