Chats

Create private chat

Auth: User JWT

Create chat private chat

post/v1/chats/private

Request

  • Base URL: https://api.chat.ethora.com
  • URL: https://api.chat.ethora.com/v1/chats/private
  • Auth: HTTP bearer

Request body

usernamestring

xmppUsername (<appId>_<userId>) of the user to start a 1-1 chat with. Idempotent: if a private chat between the two already exists, that one is returned.

e2eeboolean

Ask for the pair's end-to-end encrypted (OMEMO 2) room rather than their plaintext one. Defaults to false.

A pair can hold both: the encrypted room is a separate room whose name carries an -e2ee suffix. So calling this with e2ee: true for a pair that only has a plaintext chat creates the encrypted room alongside it - it does not convert the existing one, and the plaintext history stays where it was written. Idempotent per variant: a second call with the same e2ee returns the room already created.

Encrypted rooms stay encrypted for their whole life. There is no endpoint that clears the flag, so neither member can silently downgrade the room under the other.

Requires the app to have e2eeEnabled: true (PUT /v1/apps/{appId}, reported by GET /apps/get-config). Otherwise this answers 403 E2EE_DISABLED, including for B2B callers - the plaintext room for the same pair is still creatable.

Response

{
  ok: boolean,
}
object required

Changes

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