> ## 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.

# Archive Permission

> Archives or unarchives a permission (role). Archived permissions are effectively soft-deleted.



## OpenAPI

````yaml /openapi.yaml put /permissions/{permissionId}/archive
openapi: 3.1.0
info:
  version: 1.807.0
  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:
  /permissions/{permissionId}/archive:
    put:
      tags:
        - Permissions
      summary: Archive Permission
      description: >-
        Archives or unarchives a permission (role). Archived permissions are
        effectively soft-deleted.
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 64
            description: >-
              ID of the permission (also referred to as "role" in the
              dashboard).
          required: true
          description: ID of the permission (also referred to as "role" in the dashboard).
          name: permissionId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                isArchived:
                  type: boolean
                  description: Set to true to archive, false to unarchive.
              required:
                - isArchived
              additionalProperties: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Permission'
      security:
        - authenticationToken: []
          userActionSignature: []
components:
  schemas:
    Permission:
      type: object
      properties:
        id:
          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
        name:
          type: string
          description: Human-readable name of the permission (role).
        operations:
          type: array
          items:
            type: string
          description: >-
            List of API operations this permission grants access to. See
            [Permissions
            List](https://docs.dfns.co/core-concepts/roles-and-permissions#list-of-permissions)
            for available operations.
        status:
          type: string
          enum:
            - Active
          description: Current status of the permission.
        isImmutable:
          type: boolean
          description: Whether this permission is system-managed and cannot be modified.
        isArchived:
          type: boolean
          description: Whether this permission has been archived (soft-deleted).
        dateCreated:
          type: string
          format: date-time
          description: >-
            [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date (must be
            UTC). Date the permission was created.
          example: '2023-04-14T20:41:28.715Z'
        dateUpdated:
          type: string
          format: date-time
          description: >-
            [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date (must be
            UTC). Date the permission was last updated.
          example: '2023-04-14T20:41:28.715Z'
      required:
        - id
        - name
        - operations
        - status
        - isImmutable
        - isArchived
        - dateCreated
        - dateUpdated
      additionalProperties: false
  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)

````