---
title: "Assign a thread"
description: "Assigns a thread to someone who can open the item, as a task on their home and the Team page; user_id: null clears it."
canonical_url: https://docs.markdrop.in/api/comments/assign-a-thread
last_updated: 2026-11-20
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Assign a thread

`PUT https://api.markdrop.in/api/v1/documents/{slug}/comments/{thread_id}/assignee`

Assigns a thread to someone who can open the item, as a task on their home and the Team page; `user_id: null` clears it. Editors and the thread's author may.

- **Authentication:** API token required: `Authorization: Bearer mdk_…`.
- **Rate limit:** 60 per minute per IP address.
- **MCP tool:** `assign_thread` ([tools](https://docs.markdrop.in/ai/tools))
- **Guide:** [Comments](https://docs.markdrop.in/collaboration/comments)

## Path parameters

- `slug` (string, required): The document's address: the part after `markdrop.in/`.
- `thread_id` (string, required): Matches `^[0-9a-f]{24}$`.

## Headers

- `X-Read-Password` (string): The password of a password-protected document.
- `X-Markdrop-Workspace` (string): A workspace's id: answer only if the document is in that workspace, else `404`. Workspace domains send it; you rarely need it.

## Request body

`application/json`, required.

- `user_id` (string): Up to 40 characters.

## Responses

- `200`: OK.
- `401`: No token, or the token is revoked or mistyped.
- `422`: The request didn't validate. `detail` lists each problem, with where it is (`loc`) and why (`msg`).
- `429`: Too many requests from your IP address. Wait the seconds in `Retry-After`.

## Examples

**curl**

```bash
curl -X PUT https://api.markdrop.in/api/v1/documents/k3x9q2m/comments/THREAD_ID/assignee \
  -H "Authorization: Bearer $MARKDROP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"user_id":"665f1c2e9b1e8a0012345678"}'
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/documents/k3x9q2m/comments/THREAD_ID/assignee", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.MARKDROP_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "user_id": "665f1c2e9b1e8a0012345678"
  }),
});
const data = await res.json();
```

**Python**

```python
import os

import requests

r = requests.put(
    "https://api.markdrop.in/api/v1/documents/k3x9q2m/comments/THREAD_ID/assignee",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
    json={"user_id": "665f1c2e9b1e8a0012345678"},
)
r.raise_for_status()
print(r.json())
```
