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

# Get Environment Secret By Id



## OpenAPI

````yaml /openapi.json get /secrets/{workspace_id}/{team_id}/{project_id}/{environment_id}/{secret_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /secrets/{workspace_id}/{team_id}/{project_id}/{environment_id}/{secret_id}:
    get:
      tags:
        - SECRET MANAGEMENT
      summary: Get Environment Secret By Id
      operationId: >-
        get_environment_secret_by_id_secrets__workspace_id___team_id___project_id___environment_id___secret_id__get
      parameters:
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Team Id
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Project Id
        - name: environment_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Environment Id
        - name: secret_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Secret Id
        - name: workspace_id
          in: path
          required: true
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Workspace Id
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Workspace-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
        - APIKeyHeader: []
components:
  schemas:
    SecretResponse:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
        key:
          type: string
          title: Key
        value:
          type: string
          title: Value
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        current_version:
          type: integer
          title: Current Version
        environment_type:
          $ref: '#/components/schemas/EnvironmentType'
      type: object
      required:
        - id
        - key
        - value
        - created_at
        - updated_at
        - current_version
        - environment_type
      title: SecretResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EnvironmentType:
      type: string
      enum:
        - dev
        - staging
        - prod
        - pilot
        - custom
      title: EnvironmentType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /auth/login
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````