Chats

Create a 1-1 chat between two app users (v2, tenant actor)

Auth: Tenant Actor

Opens a private (1-1) chat between two users of the target app on behalf of an integration backend, without either user being the caller. Supports B2B Server JWT and User JWT: the app's owner (its creator, e.g. from the dashboard app settings page), or an app admin with app-settings update rights.

The room is the same one POST /v1/chats/private addresses for that pair (name <xmppUsernameA>-<xmppUsernameB>, sorted, plus -e2ee for the encrypted room), so the call is idempotent: if the room already exists it is returned with created: false and status 200. A new room answers 201 with created: true. The room is owned by the app's system chat account, which also sends both invites.

post/v2/apps/{appId}/chats/private

Request

  • Base URL: https://api.chat.ethora.com
  • URL: https://api.chat.ethora.com/v2/apps/{appId}/chats/private
  • 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. Both members must belong to it.

Request body

membersstring[] required

Exactly two different users, as xmppUsername (<appId>_<userId>) or bare user id - the <appId>_ prefix is added when missing.

e2eeboolean

Address the pair's end-to-end encrypted (OMEMO 2) room instead of the plaintext one. Requires the app's e2eeEnabled opt-in, otherwise 403 E2EE_DISABLED. Encrypted rooms stay encrypted for life.

Response

Room already existed (created: false).

Changes

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