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

# Update an existing organization secret

> Updates the value or description of an existing organization secret. Requires write permissions on the secret. The secret value and/or description can be updated independently.



## OpenAPI

````yaml /openapi/em-runtime-governance-v2.yaml put /governance/resources/organizations/secrets/{secret_name}
openapi: 3.1.0
info:
  title: em_runtime_governance
  version: 5.27.0
servers: []
security: []
paths:
  /governance/resources/organizations/secrets/{secret_name}:
    put:
      tags:
        - secrets
      summary: Update an existing organization secret
      description: >-
        Updates the value or description of an existing organization secret.
        Requires write permissions on the secret. The secret value and/or
        description can be updated independently.
      operationId: update_org_secret
      parameters:
        - name: secret_name
          in: path
          required: true
          schema:
            type: string
            description: Name of the secret to update
            title: Secret Name
          description: Name of the secret to update
        - name: X-Project-ID
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Project-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SecretUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretUpdateResponse'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Service Unavailable
      security:
        - HTTPBearer: []
components:
  schemas:
    SecretUpdateRequest:
      properties:
        value:
          anyOf:
            - type: string
            - type: 'null'
          title: Value
          description: New secret value (JSON string)
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: New description for the secret
      type: object
      title: SecretUpdateRequest
      description: Request body for updating a secret.
    SecretUpdateResponse:
      properties:
        name:
          type: string
          title: Name
          description: Name of the updated secret
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Timestamp when the secret was updated
      type: object
      required:
        - name
        - updated_at
      title: SecretUpdateResponse
      description: Response body for a updated secret.
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      type: object
      required:
        - error
      title: ErrorResponse
      description: Standard error response model.
    ErrorBody:
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          title: Message
        details:
          additionalProperties: true
          type: object
          title: Details
        request_id:
          type: string
          title: Request Id
        timestamp:
          type: string
          format: date-time
          title: Timestamp
      type: object
      required:
        - code
        - message
        - request_id
        - timestamp
      title: ErrorBody
      description: Error body with structured details.
    ErrorCode:
      type: string
      enum:
        - INVALID_REQUEST
        - INVALID_TOKEN
        - INSUFFICIENT_PERMISSIONS
        - RESOURCE_NOT_FOUND
        - RESOURCE_ALREADY_EXISTS
        - VALIDATION_ERROR
        - RATE_LIMIT_EXCEEDED
        - SERVICE_UNAVAILABLE
        - INTERNAL_ERROR
      title: ErrorCode
      description: Standard error codes for API responses.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````