palbaseDocs

Palbase Messaging · API

POST/messaging/admin/conversations

Make a conversation for people

The project's server makes a conversation for people — the direct one between two (the one there is, 200, when there is), or a group it may give an owner (owner_id) or keep its own. The project's hook is not asked: the server decides.

Called by your server, with the project's secret key.

Request body

descriptionstring · optionalA group's description.
kind"direct" | "group" · requireddirect (member_ids: the two) or group.
member_idsstring[] · requiredIts people.
owner_idstring · optionalA group's owner (none: the server keeps it).
photostring · optionalWhere the app reads a group's picture.
settingsobject · optionalHow a group runs, as it is made.
spacestring · optionalThe place of the app's it belongs to, as the app names it (org:<id>, project:<id>): 1 to 128 letters, digits and : _ . / @ -. Fixed as it is made; absent: none.
titlestring · optionalA group's title.
visibility"open" | "closed" · optionalopen (a space named: required): found in its space's open groups and joined by whom the project's hook lets (POST …/join); closed (the default): joined when someone adds you. A direct conversation is never open.
curl
curl -X POST "https://<your-ref>.palbase.studio/messaging/admin/conversations" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{"kind":"direct","member_ids":["string"]}'

Responses

200The direct conversation there was

201The conversation made

400A field out of bounds (`invalid_<field>`)

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

403Not the project's secret key (`secret_key_required`)

409One of the two's account, or the owner's, was deleted (`user_deleted`)

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 AdminCreateConversation of messaging's contract.