palbaseDocs

Palbase Messaging · API

POST/messaging/conversations/{conversation_id}/uploads

A URL to upload a file to

A URL the reader's app uploads one file to — encrypted with a key of its own, which the message carries — before a message carries it. The file is the project's: counted under its storage. One no message carries within a day is removed.

Called by a signed-in user of your app, with their token and the publishable key.

Path

conversation_idstring (uuid) · requiredThe conversation.

Request body

sizeinteger · requiredThe file's size (encrypted), 1 byte to 100 MiB.
curl
curl -X POST "https://<your-ref>.palbase.studio/messaging/conversations/<conversation_id>/uploads" \
  -H "apikey: $PALBASE_PUBLISHABLE_KEY" \
  -H "authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "content-type: application/json" \
  -d '{"size":1}'

Responses

201Where to upload it

400The request is malformed, or a field breaks a rule (the error names which)

401No key, a key of no project, a token not valid (the edge's answer), or no person's session (`user_required`)

403Only the group's admins write in it (`admins_only`), or the reader is no longer in it, or the project's server made the conversation read-only (`read_only`)

404No such conversation of yours (`conversation_not_found`)

413The request body is too large (`request_too_large`)

429Over the project's request limit; Retry-After says when to try again

503Temporarily unavailable; retrying is safe after Retry-After

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation CreateUpload of messaging's contract.