palbaseDocs

Palbase ai · API

PUT/ai/chats/{chat_id}/members/{user_id}

Put a user in a chat

Who is in a chat is the server's to say. A goal set as the chat's one member, its agent defined for them alone, is paused when another is put in it.

Called by a signed-in user of your app, with their token and the publishable key; or your server, with the project's secret key.

Path

chat_idstring · requiredThe chat's id.
user_idstring · requiredThe user's id.

Request body

emailstring · optionalTheir address (none: the one kept, if any): what their turns' commits are written as. Never served.
namestring · optionalTheir name in it.
ownerboolean · optionalWhether they own it.
curl
curl -X PUT "https://<your-ref>.palbase.studio/ai/chats/<chat_id>/members/<user_id>" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{"email":"string","name":"string","owner":false}'

Responses

200The chat

400The request is malformed, or names what this module does not offer (the error names which)

401No valid credential

403A publishable key or a user's session: everything here is the project's server's, called with the secret key

404No such response, job or provider in this project

409The response's state refuses it

429The project's request rate, or the provider's for its connection, is used up — or the project holds as much as it may at once: 32 open streams at one of the module's servers (too_many_streams), 2 pictures being made (too_many_images), 512 MiB of pictures kept here for their day (image_storage_full), or the service — or the project's share of it — holds as much of its requests at once as it takes: their bodies, an embedding request's vectors, the pictures being made (busy). Retry-After says when to try again

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

Operation PutChatMember of ai's contract.