Chats

Batch update users (chat API) (v2, tenant actor)

Auth: Tenant Actor

Same operation as /v2/chats/users but with the target app explicit in the path. This is the preferred route for backend / tenant-admin integrations, especially when:

  • You're acting on a CHILD app from a parent-app B2B token. The legacy /v2/chats/users route uses reqUser.appId for the xmppUsername-prefix check and DB scope, so a parent-app token can never satisfy xmppUsername.startsWith(<childAppId>_) for a child app's user. This route uses the path :appId instead.

  • You want the target appId to be unambiguous in the URL for ops/audit/logging purposes (matches /v2/apps/{appId}/chats/broadcast and the rest of the path-explicit tenant-actor surface).

Auth model:

  • B2B Server JWT: allowed when :appId is the token's own app or one of its child apps (parentAppId equality).
  • User JWT: allowed when the caller has an appUsers.update Acl on :appId.

Request body shape and response envelope are identical to /v2/chats/users (same Joi schema, same patchChatUsersBatchService under the hood; only the auth + the appId resolution differ).

patch/v2/apps/{appId}/chats/users

Request

  • Base URL: https://api.chat.ethora.com
  • URL: https://api.chat.ethora.com/v2/apps/{appId}/chats/users
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Path parameters

appIdstring required

Target App ID. Must be an app the calling actor owns or has been delegated access to.

Request body

Example request

{
  "users": [
    {
      "xmppUsername": "<appId>_<userId>"
    }
  ]
}

Response

{ ok: true, summary, results, details }

Per-user statuses match /v2/chats/users PATCH (updated / not-found / skipped / invalid); inspect details[].status per item to know if a row actually changed.

Changes

No recorded changes to this operation across all 1 revision of this API.