Reference
Attachments
Upload first, then send the id. The upload is a raw body, not a multipart form.
Download a file from a message your project can read.
Accepts the same project bearer key as the message API. The attachment must appear in this message's attachments array. Returns the original bytes and Content-Type with private, no-store caching. A missing file, unreadable message, or unrelated attachment returns 404. Received files can remain unavailable if the file did not finish uploading; reconcile before a bounded retry. On a Twilio line, each photo, video, sound or file on an incoming MMS is kept the same way and downloads with this route.
curl -X GET https://api.missblue.dev/v1/messages/0b5ed7e8-f7a1-4f6e-9c2a-2a1f0d9e8b77/attachments/7deff905-9038-4e4e-b47c-580a1ab52220 --output attachment.bin \
-H "Authorization: Bearer $MISS_BLUE_KEY"Response
Original attachment bytes- 404Message or attachment unavailable to this project, or attachment does not belong to the message.
Upload a file and get an id to send it with.
The file name and type ride in headers. GIFs, common video and voice-recording formats, PDFs, archives, Office and iWork files are accepted up to 100 MiB. Send one attachment id per message call.
| X-Miss-Blue-File-Name* | header | The name the recipient sees. |
| Content-Type* | header | Must be a type we allow. |
curl -X POST https://api.missblue.dev/v1/attachments \
-H "Authorization: Bearer $MISS_BLUE_KEY" \
-H "Content-Type: image/png" \
-H "X-Miss-Blue-File-Name: receipt.png" \
--data-binary @receipt.pngResponse
{
"id": "7deff905-9038-4e4e-b47c-580a1ab52220",
"file_name": "receipt.png",
"mime_type": "image/png",
"size_bytes": 20481,
"sha256": "c414cd0e204de974f73753c7e28d7638e7b3691bb8b1a2bab6b25bb7fed7ce77"
}- 400An empty file, a missing name, or a type we do not allow.
- 413Over the size limit.