Attachments
Downloading an attachment
GET /v1/attachments/{id}/download
This endpoint responds with a 302 redirect to a short-lived presigned URL where the file is hosted. Configure your HTTP client to follow redirects (most do by default):
curl -L "https://api.abcsalesbot.com/v1/attachments/{id}/download" \
-H "Authorization: Bearer $ABC_API_KEY" \
-o attachment.bin
The presigned URL expires, so request the download fresh each time rather than caching the redirected URL.
Sending an attachment
When replying to a conversation, include the s3_attachment field to attach a file:
{
"content": "Here is the document you asked for.",
"messaging_channel_connection_id": 123,
"s3_attachment": "<storage reference>"
}
See the API Reference for the exact s3_attachment format accepted by the reply endpoint.