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

# Update Custom Secret

> Update a custom secret.

Updates the name and/or description of an existing custom secret.

Returns:
    200: Secret updated successfully
    400: Secret name already exists
    404: Secret not found
    500: Error updating secret



## OpenAPI

````yaml /openapi/openhands-cloud.json put /api/v1/secrets/{secret_id}
openapi: 3.1.0
info:
  title: OpenHands
  description: 'OpenHands: Code Less, Make More'
  version: 0.0.1
servers: []
security: []
paths:
  /api/v1/secrets/{secret_id}:
    put:
      tags:
        - Secrets
      summary: Update Custom Secret
      description: |-
        Update a custom secret.

        Updates the name and/or description of an existing custom secret.

        Returns:
            200: Secret updated successfully
            400: Secret name already exists
            404: Secret not found
            500: Error updating secret
      operationId: update_custom_secret_api_v1_secrets__secret_id__put
      parameters:
        - name: secret_id
          in: path
          required: true
          schema:
            type: string
            title: Secret Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomSecretWithoutValue'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EditResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    CustomSecretWithoutValue:
      properties:
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
      type: object
      required:
        - name
      title: CustomSecretWithoutValue
      description: Custom secret model without value (for listing secrets).
    EditResponse:
      properties:
        message:
          type: string
          title: Message
      type: object
      required:
        - message
      title: EditResponse
      description: General response to an edit operation
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Access-Token

````