> ## Documentation Index
> Fetch the complete documentation index at: https://allhandsai-chore-regenerate-agent-sdk-openapi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Conversation Secrets

> Update secrets for a conversation.



## OpenAPI

````yaml /openapi/agent-sdk.json post /api/conversations/{conversation_id}/secrets
openapi: 3.1.0
info:
  description: OpenHands Agent Server - REST/WebSocket interface for OpenHands AI Agent
  title: OpenHands Agent Server
  version: 1.52.0
servers: []
security: []
paths:
  /api/conversations/{conversation_id}/secrets:
    post:
      tags:
        - Conversations
      summary: Update Conversation Secrets
      description: Update secrets for a conversation.
      operationId: >-
        update_conversation_secrets_api_conversations__conversation_id__secrets_post
      parameters:
        - in: path
          name: conversation_id
          required: true
          schema:
            format: uuid
            title: Conversation Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSecretsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
          description: Successful Response
        '404':
          description: Item not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - APIKeyHeader: []
components:
  schemas:
    UpdateSecretsRequest:
      description: Payload to update secrets in a conversation.
      properties:
        secrets:
          additionalProperties:
            $ref: '#/components/schemas/SecretSource-Input'
          description: Dictionary mapping secret keys to values
          title: Secrets
          type: object
      required:
        - secrets
      title: UpdateSecretsRequest
      type: object
    Success:
      properties:
        success:
          default: true
          title: Success
          type: boolean
      title: Success
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    SecretSource-Input:
      discriminator:
        mapping:
          openhands__sdk__secret__secrets__LookupSecret-Input__1: '#/components/schemas/LookupSecret-Input'
          openhands__sdk__secret__secrets__StaticSecret-Input__1: '#/components/schemas/StaticSecret-Input'
        propertyName: kind
      oneOf:
        - $ref: '#/components/schemas/LookupSecret-Input'
        - $ref: '#/components/schemas/StaticSecret-Input'
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    LookupSecret-Input:
      description: A secret looked up from some external url
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description for this secret
          title: Description
        headers:
          additionalProperties:
            type: string
          title: Headers
          type: object
        kind:
          const: LookupSecret
          title: Kind
          type: string
        url:
          title: Url
          type: string
      required:
        - url
      title: LookupSecret
      type: object
    StaticSecret-Input:
      description: A secret stored locally
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description for this secret
          title: Description
        kind:
          const: StaticSecret
          title: Kind
          type: string
        value:
          anyOf:
            - format: password
              type: string
              writeOnly: true
            - type: 'null'
          title: Value
      title: StaticSecret
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-Session-API-Key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.