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

# Revoke all sessions for an environment

> Queues the revocation of all user sessions in the specified environment. This is an asynchronous operation - the job runs in the background.



## OpenAPI

````yaml post /environments/{environmentId}/users/sessions/revoke
openapi: 3.0.1
info:
  title: Dashboard API
  description: Dashboard API documentation
  version: 1.0.0
servers:
  - url: https://app.dynamicauth.com/api/v0
  - url: https://app.dynamic.xyz/api/v0
  - url: http://localhost:3333/api/v0
security: []
tags:
  - name: Analytics
  - name: SDK
  - name: Organizations
  - name: Projects
  - name: Environments
  - name: Users
  - name: Invites
  - name: Tokens
  - name: Origins
  - name: Allowlists
  - name: Wallets
  - name: Members
  - name: Sessions
  - name: Settings
  - name: Gates
  - name: Chains
  - name: Exports
  - name: Events
  - name: Webhooks
  - name: Custom Fields
  - name: OrganizationMfaSettings
  - name: CustomHostnames
  - name: TestAccount
  - name: NameServices
  - name: GlobalWallets
  - name: GlobalWalletConnections
  - name: UserApiTokens
  - name: Waas
  - name: WalletConnect
paths:
  /environments/{environmentId}/users/sessions/revoke:
    post:
      tags:
        - Sessions
      summary: Revoke all sessions for an environment
      description: >-
        Queues the revocation of all user sessions in the specified environment.
        This is an asynchronous operation - the job runs in the background.
      operationId: revokeAllEnvironmentSessions
      parameters:
        - $ref: '#/components/parameters/environmentId'
      responses:
        '202':
          description: Session revocation has been queued
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevokeAllSessionsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/ForbiddenWithErrorAndPayload'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
components:
  parameters:
    environmentId:
      in: path
      name: environmentId
      required: true
      description: ID of the environment
      schema:
        $ref: '#/components/schemas/uuid'
  schemas:
    RevokeAllSessionsResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: Status message indicating the revocation has been queued
    uuid:
      type: string
      pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      minLength: 36
      maxLength: 36
      example: 95b11417-f18f-457f-8804-68e361f9164f
    BadRequest:
      type: object
      properties:
        error:
          type: string
    Unauthorized:
      type: object
      properties:
        error:
          type: string
          example: No jwt provided!
    ForbiddenWithErrorAndPayload:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorMessageWithCode'
        payload:
          $ref: '#/components/schemas/ForbiddenErrorPayload'
    InternalServerError:
      type: object
      properties:
        error:
          type: string
          example: Internal Server Error
    ErrorMessageWithCode:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
    ForbiddenErrorPayload:
      type: object
      properties:
        walletPublicKey:
          $ref: '#/components/schemas/WalletPublicKey'
        email:
          type: string
          format: email
    WalletPublicKey:
      type: string
      pattern: ^[A-Za-z0-9]{18,100}$
      description: >-
        Valid blockchain wallet address, must be an alphanumeric string without
        any special characters
      example: '0xbF394748301603f18d953C90F0b087CBEC0E1834'
      maxLength: 255
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequest'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
    ForbiddenWithErrorAndPayload:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenWithErrorAndPayload'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalServerError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````