Skip to main content
Use attachments when a chat message needs an image, PDF, receipt, or other file.

Upload Attachments

POST /api/v1/connect/attachments
The request must be multipart/form-data.

Example

curl "https://api.plato.ae/api/v1/connect/attachments" \
  -X POST \
  -H "Authorization: Bearer $PLATO_API_KEY" \
  -F "[email protected]"
Upload up to 5 files per request. Each file can be up to 25 MB.

Response

{
  "files": [
    {
      "id": "file_123",
      "name": "receipt.pdf",
      "s3Key": "workspace/path/receipt.pdf",
      "type": "application/pdf",
      "url": "https://app.plato.ae/api/assets/workspace%2Fpath%2Freceipt.pdf"
    }
  ]
}
Use id in attachmentIds when sending a message:
await plato.v1.connect.send.mutate({
  conversationId: "conversation_id",
  content: {
    en: "Here is the receipt.",
  },
  attachmentIds: ["file_123"],
});

Download A Private Attachment

GET /api/v1/connect/assets/[...key]
Use the s3Key returned by the upload response.
curl "https://api.plato.ae/api/v1/connect/assets/workspace/path/receipt.pdf" \
  -H "Authorization: Bearer $PLATO_API_KEY" \
  --output receipt.pdf
The API key must belong to the same workspace as the file.

Permissions

Upload requires:
connect360:conversation:engage
Download requires either:
connect360:conversation:read
or:
connect360:conversation:engage

Notes

  • File names are normalized before upload.
  • Uploaded files are stored in a Connect360 folder in Drive.
  • The returned URL may point to a private asset route. Keep the API key on the server when fetching private files.