Create attachment upload intent
Creates Attachment Upload Intent using the API key’s account.
POST
/api/v1/messaging/attachments/upload-intentmessaging: read_write1,000 requests/minute/key · all plansActive API keys: Free 1, Pro 5, Pro+ 5. The request rate is the same on every plan.
Message storage
Message text is encrypted at rest and decrypted for authorised requests. Channel access is restricted to spaces owned by the API key’s account; missing or inaccessible channels return 404. Editing or deleting a message additionally checks its author and can return 403.
Parameters
No path or query parameters.
Request body
application/json · required
Unknown properties are rejected.
| Name | Type | Required | Description |
|---|---|---|---|
channelId | string (uuid) | Required | Channel Id. |
fileName | string | Required | File Name. Minimum length: 1. Maximum length: 255. |
contentType | string | Required | Content Type. Minimum length: 1. Maximum length: 200. |
byteSize | integer | Required | Byte Size. Greater than 0. |
width | integer | null | Optional | Width. Greater than 0. |
height | integer | null | Optional | Height. Greater than 0. |
durationMs | integer | null | Optional | Duration Ms. Greater than 0. |
Response schema
201
Created.
| Name | Type | Required | Description |
|---|---|---|---|
stagingId | string | Required | Staging Id. |
putUrl | string | Required | Put Url. |
storageRef | string | Required | Storage Ref. |
expiresInSeconds | number | Required | Expires In Seconds. |
Errors
400· JSON errorInvalid JSON body.
401· JSON errorMissing or invalid API key. Use Authorization: Bearer <token>.
403· JSON errorRequires messaging: read_write; ownership or feature restrictions may also deny access.
404· JSON errorRequest failed (NOT_FOUND).
409· JSON errorconflict.
429· JSON errorAPI rate limit exceeded (1000 requests per minute). Retry shortly.
500· JSON errorinternal server error.
503· JSON errorObject storage is not configured. Set MinIO (or compatible S3) env vars to upload files.
Request example
Set FLORALITY_KEY in your environment. These examples use demo identifiers.
curl --request POST 'https://floralitys.com/api/v1/messaging/attachments/upload-intent' \
--header "Authorization: Bearer $FLORALITY_KEY" \
--header "Content-Type: application/json" \
--data '{
"channelId": "11111111-1111-4111-8111-111111111111",
"fileName": "demo.png",
"contentType": "image/png",
"byteSize": 1
}'Responses
Created.
{
"stagingId": "11111111-1111-4111-8111-111111111111",
"putUrl": "https://example.com/demo",
"storageRef": "demo",
"expiresInSeconds": 0
}Example values are illustrative demo data.
