threads
threads

Open Dm Thread

Open the DM with one participant of a group, on ANY channel.

Clicking a sender's name in a group must land the operator in a chat they can type into. Three steps, in order:

  1. The thread already exists → return it. (Every channel.)
  2. The channel can fetch an existing remote dialog → do that, so the operator also gets the history. (Telegram only, see above.)
  3. Otherwise create an EMPTY local DM thread.

Step 3 is the point of this endpoint. Before it existed the handler bailed out with if channel != "telegram": return {"thread": None}, and the UI told the operator "No conversation history with this contact" — true, but useless: they wanted to START the conversation, not read it.

A locally-created thread is not a phantom: it carries the real (channel_account_id, channel_ref) pair, so the first inbound message from that contact lands in this very row rather than spawning a second one. Whether the FIRST OUTBOUND send is permitted is the channel's business (Zalo may refuse a non-friend, Facebook enforces its 24h window) — the send then fails loudly with the channel's own reason, which is far more useful than refusing to open the chat at all.

post/api/threads/open-dm

Request

  • Base URL: https://api.dialogbrain.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.dialogbrain.com/api/threads/open-dm
  • Auth: none declared

Request body

channel_refstring required
channel_account_idstring required
titlestring nullable

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 5 revisions of this API.