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

# Retrieves a list of personal access tokens



## OpenAPI

````yaml /api-specs/cloud/public-api.yaml get /api/pat/v1/users/{userId}/tokens
openapi: 3.0.3
info:
  title: Domino Public API
  description: Domino Public API Endpoints
  version: cloud
servers: []
security:
  - DominoApiKey: []
  - BearerAuthentication: []
tags:
  - name: AIGateway
  - name: AppInstances
  - name: AppVersions
  - name: Apps
  - name: AsyncPredictions
  - name: AuditTrail
  - name: BillingTag
  - name: BillingTagSettings
  - name: Cost
  - name: CustomMetrics
  - name: DataSource
  - name: DatasetRw
  - name: DeploymentTargets
  - name: Environments
  - name: Extensions
  - name: GenAI
  - name: HardwareTier
  - name: Jobs
  - name: ModelAPI
  - name: ModelAPIVersion
  - name: ModelDeployment
  - name: Organizations
  - name: PPM
  - name: PersonalAccessToken
  - name: ProjectSharedDatasets
  - name: ProjectTemplates
  - name: Projects
  - name: ProjectsCommits
  - name: ProjectsFiles
  - name: RegisteredModels
  - name: ServiceAccounts
  - name: Users
  - name: Workspaces
paths:
  /api/pat/v1/users/{userId}/tokens:
    get:
      tags:
        - PersonalAccessTokenAdmin
      summary: Retrieves a list of personal access tokens
      operationId: listAllPersonalAccessTokensOfUser
      parameters:
        - $ref: '#/components/parameters/userId'
        - $ref: '#/components/parameters/name'
        - $ref: '#/components/parameters/status'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/sortOrder'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedPersonalAccessTokenEnvelope'
          description: success
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
components:
  parameters:
    userId:
      description: User Id owner of the personal access tokens.
      in: path
      name: userId
      required: true
      schema:
        type: string
    name:
      description: >-
        Partial match search criteria value, that will look into PAT's name and
        username values
      in: query
      name: name
      required: false
      schema:
        type: string
    status:
      description: |
        Param to filter by status :
          `active` - Valid token to be used.
          `expiringSoon` - Valid token to be used but its expiration time is in less than 7 days.
          `expired` - Already expired token.
          `revoked` - Token that has been revoked and is no longer valid, despite its expiration time.
      in: query
      name: status
      required: false
      schema:
        enum:
          - active
          - expiringSoon
          - expired
          - revoked
        type: string
    sortBy:
      description: |
        The field to sort personal access tokens by. Available fields are:
          `name` - The name of the token.
          `username` - The username of the token owner.
          `createdAt` - The creation timestamp of the token.
          `expiresAt` - The expiration timestamp of the token.
          `isValid` - Whether the token is valid.
          `status` - A computed status combining isValid and expiresAt (expired tokens sort last when asc).
        Defaults to `createdAt`.
      in: query
      name: sortBy
      required: false
      schema:
        default: createdAt
        enum:
          - name
          - username
          - createdAt
          - expiresAt
          - isValid
          - status
        type: string
    sortOrder:
      description: >-
        The order to sort the tokens in. Can be `asc` or `desc`. Defaults to
        `asc`.
      in: query
      name: sortOrder
      required: false
      schema:
        default: asc
        enum:
          - asc
          - desc
        type: string
    offset:
      description: How many from the start to skip. Defaults to 0.
      in: query
      name: offset
      required: false
      schema:
        type: integer
    limit:
      description: Max number to fetch. Defaults to 10.
      in: query
      name: limit
      required: false
      schema:
        type: integer
  schemas:
    PaginatedPersonalAccessTokenEnvelope:
      properties:
        metadata:
          $ref: '#/components/schemas/PaginatedMetadataV1'
        tokens:
          items:
            $ref: '#/components/schemas/PersonalAccessTokenDetails'
          type: array
      required:
        - tokens
        - metadata
      type: object
    PaginatedMetadataV1:
      allOf:
        - $ref: '#/components/schemas/MetadataV1'
        - $ref: '#/components/schemas/PaginationV1'
      required:
        - pagination
        - requestId
        - notices
    PersonalAccessTokenDetails:
      properties:
        createdAt:
          example: '2025-08-21T23:51:54.075Z'
          format: date-time
          type: string
        description:
          type: string
        expiresAt:
          example: '2025-08-21T23:51:54.075Z'
          format: date-time
          type: string
        isValid:
          type: boolean
        name:
          type: string
        patId:
          type: string
        userId:
          type: string
        username:
          type: string
      required:
        - patId
        - userId
        - username
        - name
        - isValid
        - createdAt
        - expiresAt
      type: object
    FailureEnvelopeV1:
      properties:
        errors:
          description: Errors that caused a request to fail
          items:
            type: string
          type: array
        requestId:
          description: Id used to correlate a request with server actions.
          example: bbd78579-93c4-45ee-a983-0d5c8da6d5b1
          type: string
      required:
        - requestId
        - errors
      type: object
    MetadataV1:
      properties:
        notices:
          description: Notices relating to the request
          items:
            type: string
          type: array
        requestId:
          type: string
      required:
        - requestId
        - notices
      type: object
    PaginationV1:
      properties:
        limit:
          description: Max number of objects returned
          type: integer
        offset:
          description: Number of object skipped forward from start of objects
          type: integer
        totalCount:
          description: Total number of available objects
          type: integer
      required:
        - offset
        - limit
      type: object
  responses:
    '400':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Bad Request
    '401':
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FailureEnvelopeV1'
      description: >-
        The current user cannot perform this operation because they are not
        logged in
    '403':
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FailureEnvelopeV1'
      description: The current user is not authorized to perform this operation
    '404':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Not Found
    '500':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Internal Server Error
  securitySchemes:
    DominoApiKey:
      in: header
      name: X-Domino-Api-Key
      type: apiKey
    BearerAuthentication:
      in: header
      name: Authorization
      type: apiKey

````