Reference
Attachments
Upload first, then send the id. The upload is a raw body, not a multipart form.
POST/v1/attachments
Upload a file and get an id to send it with.
The file name and type ride in headers because a multipart parser is a lot of surface for a form with one field.
| 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.