---
title: "PATCH /api/v1/agent-vault/sessions/{sessionId}"
method: PATCH
path: "/api/v1/agent-vault/sessions/{sessionId}"
tags: ["Agent Vault Sessions"]
---

# PATCH /api/v1/agent-vault/sessions/{sessionId}

`PATCH /api/v1/agent-vault/sessions/{sessionId}`

## Request

- Base URL: `https://us.infisical.com`
- URL: `https://us.infisical.com/api/v1/agent-vault/sessions/{sessionId}`
- Auth: none declared

Update the label of an Agent Vault session

## Path parameters

- `sessionId` string, uuid, required

## Request body

- object
  - `label` string, nullable, required: The new label for the session, up to 128 characters, without line breaks, tabs, or invisible characters. Send null or an empty string to remove the label. You can't change the label once the session's owner is deleted.

## Response `200`

Default Response

- object
  - `session` object, required
    - `id` string, uuid, required: The ID of the session.
    - `label` string, nullable, required: A short description of what the session is for, such as `nightly deploy` or `support ticket triage`. Up to 128 characters, without line breaks, tabs, or invisible characters. Shown wherever the session is listed.
    - `actor` union, required
      - object
        - `type` 'user', required: Whether the session belongs to a user or a machine identity.
        - `id` string, uuid, nullable, required: The ID of the user or machine identity the session belongs to, or null if it was deleted.
        - `username` string, required: The username of the user. Once the user is deleted, the email recorded when the session was created.
        - `email` string, nullable, required: The email address of the user. Once the user is deleted, the email recorded when the session was created.
        - `firstName` string, nullable, required: The first name of the user. Once the user is deleted, the full name recorded when the session was created.
        - `lastName` string, nullable, required: The last name of the user, or null once the user is deleted.
      - object
        - `type` 'machineIdentity', required: Whether the session belongs to a user or a machine identity.
        - `id` string, uuid, nullable, required: The ID of the user or machine identity the session belongs to, or null if it was deleted.
        - `name` string, required: The name of the machine identity. Once the machine identity is deleted, the name recorded when the session was created.
    - `status` 'active' | 'revoked' | 'expired', required
    - `expiresAt` string, date-time, nullable, required: When the session expires, or null when it never does.
    - `revokedAt` string, date-time, nullable, required
    - `createdAt` string, date-time, required
    - `accessBundles` object[], required
      - `id` string, uuid, nullable, required
      - `name` string, required
      - `position` number, required

## Other responses

- `400`: Default Response
- `401`: Default Response
- `403`: Default Response
- `404`: Default Response
- `422`: Default Response
- `500`: Default Response

## Changes

- **2026-10-27** `b815fa5389ed`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/infisical/apis/infisical-api/changes/api/v1/agent-vault/sessions/:sessionId/patch.md)

---

[API](https://skmtc.dev/infisical/apis/infisical-api.md) - [All operations](https://skmtc.dev/infisical/apis/infisical-api/llms.txt) - [OpenAPI document](https://skmtc.dev/infisical/apis/infisical-api/revisions/7f940199c899?raw)
