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

# Bulk Update Environment Secrets



## OpenAPI

````yaml /openapi.json patch /secrets/{workspace_id}/{team_id}/{project_id}/{environment_id}/
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /secrets/{workspace_id}/{team_id}/{project_id}/{environment_id}/:
    patch:
      tags:
        - SECRET MANAGEMENT
      summary: Bulk Update Environment Secrets
      operationId: >-
        bulk_update_environment_secrets_secrets__workspace_id___team_id___project_id___environment_id___patch
      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: 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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SecretBulkUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretBulkUpdateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
        - APIKeyHeader: []
components:
  schemas:
    SecretBulkUpdate:
      properties:
        secrets:
          items:
            $ref: '#/components/schemas/SecretBulkUpdateItem'
          type: array
          title: Secrets
      type: object
      required:
        - secrets
      title: SecretBulkUpdate
    SecretBulkUpdateResponse:
      properties:
        secrets:
          items:
            $ref: '#/components/schemas/SecretUpdateResponse'
          type: array
          title: Secrets
      type: object
      required:
        - secrets
      title: SecretBulkUpdateResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SecretBulkUpdateItem:
      properties:
        key:
          type: string
          title: Key
          description: Existing secret name used to look the secret up
        value:
          anyOf:
            - type: string
            - type: 'null'
          title: Value
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        new_key:
          anyOf:
            - type: string
            - type: 'null'
          title: New Key
          description: Rename the secret to this
      type: object
      required:
        - key
      title: SecretBulkUpdateItem
    SecretUpdateResponse:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
        key:
          type: string
          title: Key
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        version:
          type: integer
          title: Version
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - key
        - version
        - updated_at
      title: SecretUpdateResponse
    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

````