Skip to main content
POST
/
v0
/
messages
/
attachments
curl --request POST \
  --url 'https://api.unify.ai/v0/messages/attachments' \
  --header "Authorization: Bearer $UNIFY_KEY" \
  --header 'Content-Type: multipart/form-data' \
  --form 'file=@/path/to/your/file.ext'
{}
Upload a file to be attached to a subsequent POST /messages call. Returns attachment metadata including the gs_url to reference in the message attachments array.

Authorizations

Authorization
string
required
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

file
binary
required
The file to upload as an attachment.
assistant_id
integer
required
The ID of the assistant this attachment is for.
curl --request POST \
  --url 'https://api.unify.ai/v0/messages/attachments' \
  --header "Authorization: Bearer $UNIFY_KEY" \
  --header 'Content-Type: multipart/form-data' \
  --form 'file=@/path/to/your/file.ext'
{}