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

# List secrets

> List the project's secrets. No response carries a secret value.



## OpenAPI

````yaml /openapi-public.yaml get /secrets
openapi: 3.1.0
info:
  title: E2B API
  version: 0.1.0
  description: >-
    Complete E2B developer API. Platform endpoints are served on api.e2b.app.
    Sandbox endpoints (envd) are served on the shared sandbox host
    (sandbox.e2b.app); target a specific sandbox with the E2b-Sandbox-Id and
    E2b-Sandbox-Port headers.
servers:
  - url: https://api.e2b.app
    description: E2B Platform API
security: []
tags:
  - name: Sandboxes
  - name: Templates
  - name: Tags
  - name: Volumes
  - name: Envd
  - name: Filesystem
  - name: Process
  - name: Teams
  - name: Secrets
  - name: Events
  - name: Webhooks
paths:
  /secrets:
    servers:
      - url: https://api.e2b.app
        description: E2B Platform API
    get:
      tags:
        - Secrets
      summary: List secrets
      description: List the project's secrets. No response carries a secret value.
      operationId: listSecrets
      parameters:
        - $ref: '#/components/parameters/paginationNextToken'
        - $ref: '#/components/parameters/paginationLimit'
      responses:
        '200':
          description: Successfully listed the project's secrets
          headers:
            X-Next-Token:
              $ref: '#/components/headers/XNextToken'
            Cache-Control:
              description: Secret-management responses must not be cached.
              schema:
                type: string
                enum:
                  - no-store
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Secret'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 400
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed, internal_server_error.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                invalidSecretsRequest:
                  summary: Request validation or the secrets backend rejects the input
                  value:
                    code: 400
                    message: Invalid secrets request
          headers:
            Cache-Control:
              description: Secret-management responses must not be cached.
              schema:
                type: string
                enum:
                  - no-store
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 401
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed, internal_server_error.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                secretsUnauthorized:
                  summary: Authentication is missing or invalid
                  value:
                    code: 401
                    message: You are not authenticated
          headers:
            Cache-Control:
              description: Secret-management responses must not be cached.
              schema:
                type: string
                enum:
                  - no-store
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 403
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed, internal_server_error.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                teamBanned:
                  summary: The team is banned at authentication
                  value:
                    code: 403
                    message: Secrets are not available for this team
                secretsUnavailable:
                  summary: The secrets feature or backend is unavailable for the team
                  value:
                    code: 403
                    message: Secrets are not available for this team
          headers:
            Cache-Control:
              description: Secret-management responses must not be cached.
              schema:
                type: string
                enum:
                  - no-store
        '404':
          description: Not found
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 404
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed, internal_server_error.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                secretNotFound:
                  summary: The secrets backend cannot find the requested secret
                  value:
                    code: 404
                    message: Secret not found
                preHandlerNotFound:
                  summary: >-
                    A request is rejected as not found before reaching the
                    secrets handler
                  value:
                    code: 404
                    message: Not found
          headers:
            Cache-Control:
              description: Secret-management responses must not be cached.
              schema:
                type: string
                enum:
                  - no-store
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 409
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed, internal_server_error.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                secretConflict:
                  summary: >-
                    Conflict, failed precondition, aborted modification, or
                    secret limit reached
                  value:
                    code: 409
                    message: Secret cannot be modified in its current state
          headers:
            Cache-Control:
              description: Secret-management responses must not be cached.
              schema:
                type: string
                enum:
                  - no-store
        '429':
          description: Too many requests
          headers:
            Retry-After:
              description: >-
                When present, the number of seconds to wait before retrying the
                request.
              required: false
              schema:
                type: integer
                minimum: 0
              example: 30
            RateLimit-Limit:
              description: Configured rate-limit burst size.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests remaining in the rate-limit window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the rate-limit window resets.
              schema:
                type: integer
            Cache-Control:
              description: Secret-management responses must not be cached.
              schema:
                type: string
                enum:
                  - no-store
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 429
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed, internal_server_error.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                rateLimitExceeded:
                  summary: A configured API rate limit was exceeded
                  value:
                    code: 429
                    message: Rate limit exceeded
        '500':
          description: >-
            Unexpected internal failure. Panic recovery returns HTTP 500 without
            a response body. Secrets-backend failures use 502 or 504.
          headers:
            Cache-Control:
              description: Secret-management responses must not be cached.
              schema:
                type: string
                enum:
                  - no-store
        '502':
          description: Backend error
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 502
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed, internal_server_error.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                secretsBackendError:
                  summary: The secrets backend failed or returned an unusable response
                  value:
                    code: 502
                    message: Secrets backend error
          headers:
            Cache-Control:
              description: Secret-management responses must not be cached.
              schema:
                type: string
                enum:
                  - no-store
        '504':
          description: Backend timeout
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 504
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed, internal_server_error.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                secretsBackendTimeout:
                  summary: The secrets backend deadline was exceeded
                  value:
                    code: 504
                    message: Secrets backend timed out
          headers:
            Cache-Control:
              description: Secret-management responses must not be cached.
              schema:
                type: string
                enum:
                  - no-store
      security:
        - ApiKeyAuth: []
components:
  parameters:
    paginationNextToken:
      name: nextToken
      in: query
      description: Cursor to start the list from
      required: false
      schema:
        type: string
    paginationLimit:
      name: limit
      in: query
      description: Maximum number of items to return per page
      required: false
      schema:
        type: integer
        format: int32
        minimum: 1
        default: 100
        maximum: 100
  headers:
    XNextToken:
      description: Cursor to fetch the next page of results, if more exist
      schema:
        type: string
  schemas:
    Secret:
      type: object
      description: Metadata of a secret. It never carries the secret value.
      required:
        - secretID
        - name
        - currentVersion
        - metadata
        - createdAt
        - updatedAt
      properties:
        secretID:
          type: string
          description: Identifier of the secret
        name:
          type: string
          description: Name of the secret, unique within the project
        currentVersion:
          type: integer
          format: int64
          description: Version served to readers that do not name one
        metadata:
          $ref: '#/components/schemas/SecretMetadata'
        createdAt:
          type: string
          format: date-time
          description: Time when the secret was created
        updatedAt:
          type: string
          format: date-time
          description: Time when the secret was last updated
    SecretMetadata:
      type: object
      description: >
        Customer metadata of the secret. Always present, empty when unset. At
        most 32 entries; keys are limited to 128 bytes, values to 1024 bytes,
        and a secret's metadata to 8192 bytes in total.
      maxProperties: 32
      additionalProperties:
        type: string
        maxLength: 1024
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````