---
title: "Session Assign User"
method: PATCH
path: "/api/chat/sessions/{session_id}/assign-user"
tags: ["v2", "chat", "chat"]
---

# Session Assign User

`PATCH /api/chat/sessions/{session_id}/assign-user`

Assign an authenticated user to a chat session.

Used (typically post-login) to claim an existing anonymous session as the current authenticated user.

Args:
    session_id: The identifier for the (previously anonymous) session.
    user_id: The authenticated user's ID to associate with the session.

Returns:
    dict: Status of the assignment.

## Path parameters

- `session_id` string, required

## Response `200`

Successful Response

- object

## Other responses

- `401` — Authentication required
- `422` — Validation Error

---

[API](https://skmtc.net/significant-gravitas/apis/autogpt-agent-server.md) · [All operations](https://skmtc.net/significant-gravitas/apis/autogpt-agent-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/significant-gravitas/autogpt-agent-server/versions/382041c7ecb2/schema)
