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

# Approve a tool call



## OpenAPI

````yaml /api/platform/v1/openapi-kapso-agent.yaml post /kapso-agent/runs/{id}/approvals/{approval_id}/approve
openapi: 3.1.0
info:
  title: Kapso Agent API
  version: 0.1.0
  description: >
    Trigger runs in built-in modes with the API trigger enabled or custom modes
    with the `api` surface enabled.

    Inspect sessions, control run lifecycles, and handle approvals
    programmatically.
servers:
  - url: https://api.kapso.ai/platform/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Agent Modes
    description: Discover the agent modes and which ones accept API runs
  - name: Agent Sessions
    description: List API sessions and inspect their runs
  - name: Agent Runs
    description: Create, poll, and control Kapso Agent runs
paths:
  /kapso-agent/runs/{id}/approvals/{approval_id}/approve:
    post:
      tags:
        - Agent Runs
      summary: Approve a tool call
      operationId: approveAgentRunTool
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: approval_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Approved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunResponse'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
components:
  schemas:
    RunResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Run'
    Run:
      type: object
      properties:
        run_id:
          type: string
          format: uuid
        conversation_id:
          type: string
          format: uuid
          description: The agent session this run belongs to
        status:
          $ref: '#/components/schemas/RunStatus'
        mode:
          type: string
          examples:
            - api
        title:
          type:
            - string
            - 'null'
        kind:
          type: string
          enum:
            - ask
            - continue
        prompt:
          type:
            - string
            - 'null'
        provider_model:
          type:
            - string
            - 'null'
          examples:
            - gpt-5.5
        reasoning_effort:
          type:
            - string
            - 'null'
          examples:
            - medium
        error_message:
          type:
            - string
            - 'null'
        ai_cost_microdollars:
          type: integer
          description: AI cost of the run in microdollars
        result:
          $ref: '#/components/schemas/RunResult'
        pending_approval:
          $ref: '#/components/schemas/PendingApproval'
        created_at:
          type: string
          format: date-time
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        paused_at:
          type:
            - string
            - 'null'
          format: date-time
        finished_at:
          type:
            - string
            - 'null'
          format: date-time
        status_url:
          type: string
          description: Path to poll this run
        finding:
          type: object
          description: Present for a finding investigation run
          properties:
            id:
              type: string
              format: uuid
            investigation_id:
              type: string
              format: uuid
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message
    RunStatus:
      type: string
      enum:
        - queued
        - running
        - paused
        - waiting_for_approval
        - completed
        - failed
        - cancelled
    RunResult:
      type:
        - object
        - 'null'
      description: Present when the run completed
      properties:
        type:
          type: string
          enum:
            - message
            - finding_investigation
        message_id:
          type: string
          format: uuid
          description: Present when type is message
        content:
          type: string
          description: Present when type is message
        data:
          type: object
          description: Present when type is finding_investigation
    PendingApproval:
      type:
        - object
        - 'null'
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          examples:
            - pending
        tool_name:
          type: string
        parameters:
          type: object
          description: Sanitized tool parameters
        created_at:
          type: string
          format: date-time
  responses:
    NotFound:
      description: Resource not found or not accessible with this API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Conflict:
      description: Invalid state transition
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````