Palbase Messaging · API
/messaging/conversations/{conversation_id}/messagesSend a message
The reader says something in the conversation — words, files (uploaded first), an answer to a message or in its thread, for a while (expires_in) or to be seen a limited number of times (view_once) — now (201), or at send_at (202, a scheduled message). Sent again with the same client_message_id, it is the same message (200), never a second. A direct message to someone who blocks the reader never reaches them.
Called by a signed-in user of your app, with their token and the publishable key.
Path
conversation_idstring (uuid) · requiredThe conversation.Request body
also_in_conversationboolean · optionalA thread answer the conversation's timeline shows too.attachmentsobject[] · optionalIts files (at most 10).client_message_idstring · requiredThe app's own id of the message: sent again with it, it is the same message.expires_from"send" | "read" · optionalWhen its time starts: send (default) or read — once everyone it is for read it.expires_ininteger · optionalIt goes this many seconds after it is sent (or read: expires_from).mentionsobject[] · optionalWhom its words name (at most 50).reply_to_idstring (uuid) · optionalA message it answers inline.send_atstring (date-time) · optionalSend it then (words only): it is scheduled.textstring · optionalWhat it says (1 to 4,096 characters).thread_idstring (uuid) · optionalA message whose thread it answers (one level).view_onceobject · optionalMakes a message's files seen a limited number of times.curl -X POST "https://<your-ref>.palbase.studio/messaging/conversations/<conversation_id>/messages" \
-H "apikey: $PALBASE_PUBLISHABLE_KEY" \
-H "authorization: Bearer $USER_ACCESS_TOKEN" \
-H "content-type: application/json" \
-d '{"client_message_id":"string"}'Responses
200The message sent before with this client_message_id
201The message sent
202The message scheduled
400A field out of its bounds (`invalid_<field>`, `empty_message`, `too_many_attachments`, `scheduled_files`)
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 (`not_a_member`), or the project's server made the conversation read-only (`read_only`)
404No such conversation, upload or message to answer (`conversation_not_found`, `upload_not_found`, `thread_not_found`, `reply_to_not_found`)
409The reader blocks the other (`blocked`), an upload is not there or used (`upload_missing`, `upload_size_mismatch`, `upload_used`), or the same message is being sent (`client_message_id_in_use`)
413The request body is too large (`request_too_large`)
429A limit on the month set on the project's messages, or on what they weigh, refuses it (`quota_exceeded`); a Free project past its free quota sends at its pace and this send's turn is too far off (`slowed`, with `Retry-After`: send it again then, with the same `client_message_id`); or over its request limit
503Temporarily unavailable; retrying is safe after Retry-After
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation SendMessage of messaging's contract.