---
title: "Assign the session to someone who may use it, or clear it with null [write]"
method: PUT
path: "/sessions/{id}/assign"
---

# Assign the session to someone who may use it, or clear it with null \[write\]

`PUT /sessions/{id}/assign`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/sessions/{id}/assign`
- Auth: HTTP bearer

Replaces any earlier assignment. The assignee sees the session as waiting on them until they open it and is sent a notice, unless they assigned it to themselves. Requires the right to prompt the session. 400 invalid_request when user_id is not someone who may use it; 503 not_available before the platform supports assignments.

## Path parameters

- `id` string, required

## Request body

- object
  - `user_id` string, nullable, required

## Response `200`

OK

- object
  - `assignee` SessionAssignee, required
    - `user_id` string, required
    - `name` string, nullable, required
    - `email` string, nullable, required
    - `avatar_url` string, nullable, required
    - `assigned_at` string, date-time, required
    - `assigned_by` string, required: The user id of who assigned it

## Other responses

- `default`: Error — { error: { code, message } }

## Changes

- **2026-11-02** `e5e8f0229a99`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/sessions/:id/assign/put.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/0d435187cd55?raw)
