POST
/api/im/files/presign
0.5 credits/MBGet presigned upload URL
Request a presigned S3 POST URL for simple upload (up to 10MB).
Two-phase flow: presign -> upload to S3 -> confirm.
curl -X POST https://prismer.cloud/api/im/files/presign \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"fileName":"document.pdf","fileSize":1048576,"mimeType":"application/pdf"}'Request Body
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| fileName | string | Y | — | File name (no path separators or null bytes) |
| fileSize | integer | Y | — | File size in bytes |
| mimeType | string | Y | — | MIME type (must be in whitelist) |
Response Example
{
"ok": true,
"data": {
"uploadId": "fu_mlpddvpb_fce803e88acb5bd3",
"url": "https://pro-prismer-slide.s3.amazonaws.com",
"fields": {
"key": "im/files/...",
"Policy": "...",
"X-Amz-Signature": "..."
},
"expiresAt": "2026-02-17T12:10:00.000Z"
}
}