> ## Documentation Index
> Fetch the complete documentation index at: https://infisical.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Revoke session

> Revoke an Agent Vault session



## OpenAPI

````yaml POST /api/v1/agent-vault/sessions/{sessionId}/revoke
openapi: 3.0.3
info:
  title: Infisical API
  description: List of all available APIs that can be consumed
  version: 0.0.1
servers:
  - url: https://us.infisical.com
    description: Production server (US)
  - url: https://eu.infisical.com
    description: Production server (EU)
  - url: http://localhost:8080
    description: Local server
security: []
paths:
  /api/v1/agent-vault/sessions/{sessionId}/revoke:
    post:
      tags:
        - Agent Vault Sessions
      description: Revoke an Agent Vault session
      operationId: revokeAgentVaultSession
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: sessionId
          required: true
          description: The ID of the session.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  session:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: The ID of the session.
                      label:
                        type: string
                        nullable: true
                        description: >-
                          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:
                        anyOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - user
                                description: >-
                                  Whether the session belongs to a user or a
                                  machine identity.
                              id:
                                type: string
                                format: uuid
                                nullable: true
                                description: >-
                                  The ID of the user or machine identity the
                                  session belongs to, or null if it was deleted.
                              username:
                                type: string
                                description: >-
                                  The username of the user. Once the user is
                                  deleted, the email recorded when the session
                                  was created.
                              email:
                                type: string
                                nullable: true
                                description: >-
                                  The email address of the user. Once the user
                                  is deleted, the email recorded when the
                                  session was created.
                              firstName:
                                type: string
                                nullable: true
                                description: >-
                                  The first name of the user. Once the user is
                                  deleted, the full name recorded when the
                                  session was created.
                              lastName:
                                type: string
                                nullable: true
                                description: >-
                                  The last name of the user, or null once the
                                  user is deleted.
                            required:
                              - type
                              - id
                              - username
                              - email
                              - firstName
                              - lastName
                            additionalProperties: false
                            title: User
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - machineIdentity
                                description: >-
                                  Whether the session belongs to a user or a
                                  machine identity.
                              id:
                                type: string
                                format: uuid
                                nullable: true
                                description: >-
                                  The ID of the user or machine identity the
                                  session belongs to, or null if it was deleted.
                              name:
                                type: string
                                description: >-
                                  The name of the machine identity. Once the
                                  machine identity is deleted, the name recorded
                                  when the session was created.
                            required:
                              - type
                              - id
                              - name
                            additionalProperties: false
                            title: Machine identity
                      onBehalfOf:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - user
                            description: >-
                              Always user: a machine identity starts sessions
                              only on behalf of users.
                          id:
                            type: string
                            format: uuid
                            nullable: true
                            description: >-
                              The ID of the user, or null once the user is
                              deleted.
                          username:
                            type: string
                            description: >-
                              The username of the user. Once the user is
                              deleted, the email recorded when the session was
                              created.
                          email:
                            type: string
                            nullable: true
                            description: >-
                              The email address of the user. Once the user is
                              deleted, the email recorded when the session was
                              created.
                          firstName:
                            type: string
                            nullable: true
                            description: >-
                              The first name of the user. Once the user is
                              deleted, the full name recorded when the session
                              was created.
                          lastName:
                            type: string
                            nullable: true
                            description: >-
                              The last name of the user, or null once the user
                              is deleted.
                        required:
                          - type
                          - id
                          - username
                          - email
                          - firstName
                          - lastName
                        additionalProperties: false
                        description: >-
                          The user the machine identity in actor started this
                          session on behalf of, or null when the session is the
                          actor's own.
                        title: User
                        nullable: true
                      status:
                        type: string
                        enum:
                          - active
                          - revoked
                          - expired
                      expiresAt:
                        type: string
                        format: date-time
                        nullable: true
                        description: When the session expires, or null when it never does.
                      revokedAt:
                        type: string
                        format: date-time
                        nullable: true
                      createdAt:
                        type: string
                        format: date-time
                    required:
                      - id
                      - label
                      - actor
                      - onBehalfOf
                      - status
                      - expiresAt
                      - revokedAt
                      - createdAt
                    additionalProperties: false
                required:
                  - session
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 400
                  message:
                    type: string
                  error:
                    type: string
                  details: {}
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 401
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 403
                  message:
                    type: string
                  details: {}
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 404
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 422
                  message: {}
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 500
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.