Skip to main content
Attachments are files (images, documents, and other media) that you can send alongside messages to the agent. The VyomFlow API uses a three-step upload flow so you can stream large files directly to storage without proxying them through the API.

Upload flow

1

Request upload parameters

Call the upload-params endpoint to receive a pre-signed storage URL and the fields you need for the next step.
The response includes the storage URL, required form fields, and the attachmentId you will use later.
2

Upload the file

PUT or POST the file bytes directly to the storage URL returned in step 1. This call goes to the storage provider, not the VyomFlow API, so do not include the Authorization: Bearer header here.
3

Mark the upload complete

Once the file is in storage, tell the VyomFlow API the upload is finished so the attachment becomes usable.

Using an attachment in a message

After the upload is marked complete, include the attachmentId in the message body when you send a message to a chat.

The Attachment object

string
Unique identifier for the attachment, used in message bodies and API calls.
string
Original name of the uploaded file.
string
MIME type of the file, for example image/png or application/pdf.
string
Current upload status. One of pending or complete.
string
ISO 8601 timestamp when the attachment was created.

Next steps

  • Send your first message with an attachment in the Quickstart
  • Learn how chats and messages work in Chats