Assign Users to a Chat

Assign one or more users to a chat and, optionally, set the PRIMARY assignee.

  • Already-assigned users are skipped (idempotent).
  • primaryAssigneeUserId, if provided, must be in userIds. It unsets any existing primary so a chat always has at most one primary. Re-sending the current primary is a no-op (no thread message).
  • A system message is posted to the chat thread describing the change.

Security:

  • The organisationId in the URL must match the organisation your JWT was issued for — requests for a different organisation fail with 401.
  • Requires CRM_ADMIN, ACCOUNT_OWNER, or CRM_BOT role; other roles receive 403.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Your organisation UUID (returned as org from the /token endpoint).

Body Params
string
required

The chat to assign users to. Use the same chatId returned by POST /api/wp-crm/messaging/create-chat.

userIds
array of strings
required

User IDs to assign. Get these from GET /api/wp-crm/directory/:organisationId/users. Max 50.

userIds*
string

User to set as the PRIMARY assignee. Must be present in userIds. Unsets any existing primary on the chat. Re-sending the current primary is a no-op.

Responses

400

Bad request — invalid body, a user is not in your organisation, the primary is not in userIds, or a user is not assignable (super-user/hidden)

401

Unauthorized

403

Forbidden — role not permitted

404

Chat not found in your organisation

429

Too many requests

500

Internal server error

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json