---
title: "Open a DM, or create a sub-group thread"
method: POST
path: "/chat/threads"
tags: ["Chat"]
---

# Open a DM, or create a sub-group thread

`POST /chat/threads`

## Request

- Base URL: `https://whatareyoudo.ing/api/v1`
- URL: `https://whatareyoudo.ing/api/v1/chat/threads`
- Auth: HTTP bearer

A DM is idempotent per pair: 201 when it was created, 200 when the existing one is returned.

## Request body

- union
  - object
    - `kind` 'dm', required
    - `peerUserId` string, uuid, required
  - object
    - `kind` 'subgroup', required
    - `groupId` string, uuid, required
    - `name` string, required
    - `memberIds` string[]

## Response `200`

The DM already existed

- object
  - `data` object, required
    - `id` string, uuid, required
  - `meta` object, required
    - `requestId` string, required

## Other responses

- `201`: Created

---

[API](https://skmtc.dev/whatareyoudo/apis/whatcha-api.md) · [All operations](https://skmtc.dev/whatareyoudo/apis/whatcha-api/llms.txt) · [OpenAPI document](https://skmtc.dev/whatareyoudo/apis/whatcha-api/revisions/48dd8a54abea?raw)
