---
title: "PUT /directChats"
method: PUT
path: "/directChats"
tags: ["messages"]
---

# PUT /directChats

`PUT /directChats`

Create a new direct chat between two users. If one already exists, then nothing will be created and the existing chat id & URL will be returned.

## Request body

- object
  - `userID1` string, uuid, required — One of the users in the direct chat
  - `userID2` string, uuid, required — The other user in the direct chat

## Response `200`

Successful response

- object
  - `chatID` string, uuid
  - `url` string — A URL pointing to this direct chat

## Other responses

- `400` — Invalid request body
- `401` — API Key is missing or invalid
- `404` — Could not find a user with a matching user id

---

[API](https://skmtc.dev/heartbeat/apis/heartbeat-api.md) · [All operations](https://skmtc.dev/heartbeat/apis/heartbeat-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/heartbeat/heartbeat-api/revisions/6c3cf537d508/schema)
