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

# Update tool approval settings

> Batch update approval_required settings for multiple tools. Works with both HTTP and MCP tools. Tools requiring approval need explicit user confirmation before execution.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/integration/{integration_id}/tool-approval
openapi: 3.1.0
info:
  title: Diga API
  version: 0.1.0
servers:
  - url: https://api.diga.io
    description: Production
security: []
paths:
  /v1/integration/{integration_id}/tool-approval:
    patch:
      tags:
        - Integration
      summary: Update tool approval settings
      description: >-
        Batch update approval_required settings for multiple tools. Works with
        both HTTP and MCP tools. Tools requiring approval need explicit user
        confirmation before execution.
      operationId: >-
        update_tools_approval_v1_integration__integration_id__tool_approval_patch
      parameters:
        - name: integration_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: Integration ID
            title: Integration Id
          description: Integration ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateToolsApprovalRequest'
      responses:
        '204':
          description: Successful Response
        '403':
          description: Forbidden - Insufficient permissions
          content:
            application/json:
              example:
                status: error
                error_code: INTERNAL_SERVER_ERROR
                message: Missing required permissions to update integration tools
              schema:
                $ref: '#/components/schemas/ErrorResponseSchema'
        '404':
          description: Integration Not Found
          content:
            application/json:
              example:
                status: error
                error_code: INTEGRATION_NOT_FOUND
                message: Integration 550e8400-e29b-41d4-a716-446655440000 not found
              schema:
                $ref: '#/components/schemas/ErrorResponseSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              example:
                status: error
                error_code: INTERNAL_SERVER_ERROR
                message: 'Error: Internal Server Error'
              schema:
                $ref: '#/components/schemas/ErrorResponseSchema'
      security:
        - CustomHTTPBearer: []
components:
  schemas:
    UpdateToolsApprovalRequest:
      properties:
        tools:
          items:
            $ref: '#/components/schemas/ToolApprovalUpdate'
          type: array
          minItems: 1
          title: Tools
          description: List of tools to update with their new approval settings
      type: object
      required:
        - tools
      title: UpdateToolsApprovalRequest
      description: Request to bulk update approval settings for tools.
    ErrorResponseSchema:
      properties:
        status:
          type: string
          title: Status
          description: Status of the response, always 'error' for error responses
          default: error
        error_code:
          type: string
          title: Error Code
          description: Machine-readable error code in SCREAMING_SNAKE_CASE format
          examples:
            - PROJECT_NOT_FOUND
            - INVALID_EMAIL
            - UNAUTHORIZED_ROLE
        message:
          type: string
          title: Message
          description: Human-readable error message with details
          examples:
            - Project with id 550e8400-e29b-41d4-a716-446655440000 not found
            - The email invalid@email is not valid
            - Insufficient permissions to perform this action
      type: object
      required:
        - error_code
        - message
      title: ErrorResponseSchema
      description: Standard error response format for all API errors.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ToolApprovalUpdate:
      properties:
        tool_id:
          type: string
          format: uuid
          title: Tool Id
          description: Tool ID (UUID). Can be used for both HTTP and MCP tools.
        approval_required:
          type: boolean
          title: Approval Required
          description: Whether approval is required before executing this tool
      type: object
      required:
        - tool_id
        - approval_required
      title: ToolApprovalUpdate
      description: Single tool approval update.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    CustomHTTPBearer:
      type: http
      scheme: bearer

````