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

# Delete Personal Access Token

> Delete a specific Personal Access Token.

#### Authentication

✅ Organization User (`CustomerEmployee`)\
✅ Delegated User (`EndUser`)\
✅ Service Account

#### Required Permissions

No permission required.


## OpenAPI

````yaml /openapi.yaml delete /auth/pats/{tokenId}
openapi: 3.1.0
info:
  version: 1.880.1
  title: Dfns
servers:
  - url: https://api.dfns.io
    description: Default - Europe
  - url: https://api.uae.dfns.io
    description: UAE
  - url: https://api.dfns.ninja
    description: <Deprecated> Staging
security: []
paths:
  /auth/pats/{tokenId}:
    delete:
      tags:
        - Auth
      summary: Delete Personal Access Token
      description: Delete a specific Personal Access Token.
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 64
            description: Token id.
          required: true
          description: Token id.
          name: tokenId
          in: path
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonalAccessToken'
      security:
        - authenticationToken: []
          userActionSignature: []
components:
  schemas:
    PersonalAccessToken:
      type: object
      properties:
        accessToken:
          type: string
          description: The access token. Only returned at creation time.
        dateCreated:
          type: string
          format: date-time
          description: >-
            [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date (must be
            UTC). Date the access token was created.
          example: '2023-04-14T20:41:28.715Z'
        credId:
          type: string
          description: ID of the credential associated with the access token.
        isActive:
          type: boolean
          description: Whether the access token is active.
        kind:
          type: string
          enum:
            - Pat
            - ServiceAccount
            - Token
            - Code
            - Recovery
            - Temp
            - Application
          description: Access token kind.
        linkedUserId:
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^us-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$
          description: User id.
          example: us-6b58p-r53sr-rlrd3l5cj3uc4ome
        linkedAppId:
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^ap-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$
          description: ID of the application the access token is linked to.
          example: ap-2a9in-tt2a1-983lho480p35ejd0
        name:
          type: string
          description: Human-readable name of the access token.
        orgId:
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^or-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$
          description: Organization id.
          example: or-30tnh-itmjs-s235s5ontr3r23h2
        permissionAssignments:
          type: array
          items:
            type: object
            properties:
              permissionName:
                type: string
                description: Human-readable name of the permission (role).
              permissionId:
                type: string
                minLength: 1
                maxLength: 64
                pattern: ^pm-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$
                description: >-
                  ID of the permission (also referred to as "role" in the
                  dashboard).
                example: pm-37vj4-jkr4l-lc9945spfftkne57
              assignmentId:
                type: string
                minLength: 1
                maxLength: 64
                pattern: ^as-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$
                description: ID of the permission assignment.
                example: as-1vcmc-qrek0-6b4vii9pln60907e
              operations:
                type: array
                items:
                  type: string
                description: List of API operations granted by this permission.
            required:
              - permissionName
              - permissionId
              - assignmentId
          description: Permissions (roles) assigned to the access token.
        publicKey:
          type: string
          description: Public key associated with the access token.
        tokenId:
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^to-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$
          description: Token id.
          example: to-202a0-cdo33-o65mbt6q758lvvnt
      required:
        - dateCreated
        - credId
        - isActive
        - kind
        - linkedUserId
        - linkedAppId
        - name
        - orgId
        - permissionAssignments
        - publicKey
        - tokenId
  securitySchemes:
    authenticationToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        **Bearer Token:** Used to authenticate API requests.

        More details how to generate the token: [Authentication
        flows](https://docs.dfns.co/api-reference/auth/login-flows)
    userActionSignature:
      type: apiKey
      in: header
      name: X-DFNS-USERACTION
      description: >-
        **User Action Signature:** Used to sign the change-inducing API
        requests.

        More details how to generate the token: [User Action Signing
        flows](https://docs.dfns.co/api-reference/auth/signing-flows)

````