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

# Set Conversation Confirmation Policy

> Set the confirmation policy for a conversation.



## OpenAPI

````yaml /openapi/agent-sdk.json post /api/conversations/{conversation_id}/confirmation_policy
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}/confirmation_policy:
    post:
      tags:
        - Conversations
      summary: Set Conversation Confirmation Policy
      description: Set the confirmation policy for a conversation.
      operationId: >-
        set_conversation_confirmation_policy_api_conversations__conversation_id__confirmation_policy_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/SetConfirmationPolicyRequest'
        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:
    SetConfirmationPolicyRequest:
      description: Payload to set confirmation policy for a conversation.
      properties:
        policy:
          $ref: '#/components/schemas/ConfirmationPolicyBase-Input'
          description: The confirmation policy to set
      required:
        - policy
      title: SetConfirmationPolicyRequest
      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
    ConfirmationPolicyBase-Input:
      discriminator:
        mapping:
          openhands__sdk__security__confirmation_policy__AlwaysConfirm-Input__1: '#/components/schemas/AlwaysConfirm-Input'
          openhands__sdk__security__confirmation_policy__ConfirmRisky-Input__1: '#/components/schemas/ConfirmRisky-Input'
          openhands__sdk__security__confirmation_policy__NeverConfirm-Input__1: '#/components/schemas/NeverConfirm-Input'
        propertyName: kind
      oneOf:
        - $ref: '#/components/schemas/AlwaysConfirm-Input'
        - $ref: '#/components/schemas/ConfirmRisky-Input'
        - $ref: '#/components/schemas/NeverConfirm-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
    AlwaysConfirm-Input:
      properties:
        kind:
          const: AlwaysConfirm
          title: Kind
          type: string
      title: AlwaysConfirm
      type: object
    ConfirmRisky-Input:
      properties:
        confirm_unknown:
          default: true
          title: Confirm Unknown
          type: boolean
        kind:
          const: ConfirmRisky
          title: Kind
          type: string
        threshold:
          $ref: '#/components/schemas/SecurityRisk'
          default: HIGH
      title: ConfirmRisky
      type: object
    NeverConfirm-Input:
      properties:
        kind:
          const: NeverConfirm
          title: Kind
          type: string
      title: NeverConfirm
      type: object
    SecurityRisk:
      description: |-
        Security risk levels for actions.

        Based on OpenHands security risk levels but adapted for agent-sdk.
        Integer values allow for easy comparison and ordering.
      enum:
        - UNKNOWN
        - LOW
        - MEDIUM
        - HIGH
      title: SecurityRisk
      type: string
  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.