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

# Get delegated access encryption public keys for an environment

> Fetches the encryption public keys used for delegated access in a WAAS environment.
By default, returns only the latest active key. Use the includeAll query parameter to get all keys.




## OpenAPI

````yaml get /environments/{environmentId}/waas/delegatedAccess/encryptionPublicKeys
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}/waas/delegatedAccess/encryptionPublicKeys:
    get:
      tags:
        - Waas
      summary: Get delegated access encryption public keys for an environment
      description: >
        Fetches the encryption public keys used for delegated access in a WAAS
        environment.

        By default, returns only the latest active key. Use the includeAll query
        parameter to get all keys.
      operationId: getDelegatedAccessEncryptionPublicKeys
      parameters:
        - $ref: '#/components/parameters/environmentId'
        - name: includeAll
          in: query
          description: >-
            If true, returns all encryption public keys. Otherwise, returns only
            the latest active key.
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Encryption public keys fetched successfully
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/DelegatedAccessEncryptionPublicKeysUnifiedResponse
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    environmentId:
      in: path
      name: environmentId
      required: true
      description: ID of the environment
      schema:
        $ref: '#/components/schemas/uuid'
  schemas:
    DelegatedAccessEncryptionPublicKeysUnifiedResponse:
      type: object
      required:
        - message
      properties:
        key:
          allOf:
            - $ref: '#/components/schemas/DelegatedAccessEncryptionPublicKey'
          description: Single key when includeAll is false
        keys:
          type: array
          items:
            $ref: '#/components/schemas/DelegatedAccessEncryptionPublicKey'
          description: Array of keys when includeAll is true
        message:
          type: string
          description: Message describing the operation result
    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
    DelegatedAccessEncryptionPublicKey:
      type: object
      required:
        - id
        - projectEnvironmentId
        - kid
        - alg
        - publicKeyPemB64
        - status
        - type
        - createdAt
        - updatedAt
      properties:
        id:
          $ref: '#/components/schemas/uuid'
        projectEnvironmentId:
          $ref: '#/components/schemas/uuid'
        kid:
          type: string
          description: >-
            Short identifier referenced in webhook envelopes so the developer
            knows which private key to use
          maxLength: 64
        alg:
          type: string
          enum:
            - RSA-OAEP-256
            - HYBRID-RSA-AES-256
          description: Algorithm for how this key is used
        publicKeyPemB64:
          type: string
          description: Developer's public key material, PEM encoded then base64'd
          maxLength: 4096
        status:
          type: string
          enum:
            - pending
            - active
            - revoked
          description: Lifecycle status of this key
        type:
          $ref: '#/components/schemas/WaasDelegatedAccessEncryptionPublicKeyType'
        expiresAt:
          type: string
          format: date-time
          nullable: true
          description: Optional expiry for planned rotations
        revokedAt:
          type: string
          format: date-time
          nullable: true
          description: Timestamp when the key was revoked
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Unauthorized:
      type: object
      properties:
        error:
          type: string
          example: No jwt provided!
    Forbidden:
      type: object
      properties:
        error:
          type: string
          example: Access Forbidden
    NotFound:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          example: Not Found
        code:
          type: string
          example: not_found
    InternalServerError:
      type: object
      properties:
        error:
          type: string
          example: Internal Server Error
    WaasDelegatedAccessEncryptionPublicKeyType:
      type: string
      enum:
        - dynamic
        - external
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Forbidden'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotFound'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalServerError'

````