Update tool approval settings
import requests
url = "https://api.diga.io/v1/integration/{integration_id}/tool-approval"
payload = { "tools": [
{
"tool_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approval_required": True
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tools: [{tool_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', approval_required: true}]
})
};
fetch('https://api.diga.io/v1/integration/{integration_id}/tool-approval', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.diga.io/v1/integration/{integration_id}/tool-approval \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tools": [
{
"tool_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approval_required": true
}
]
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.diga.io/v1/integration/{integration_id}/tool-approval"
payload := strings.NewReader("{\n \"tools\": [\n {\n \"tool_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"approval_required\": true\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "error",
"error_code": "INTERNAL_SERVER_ERROR",
"message": "Missing required permissions to update integration tools"
}{
"status": "error",
"error_code": "INTEGRATION_NOT_FOUND",
"message": "Integration 550e8400-e29b-41d4-a716-446655440000 not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"status": "error",
"error_code": "INTERNAL_SERVER_ERROR",
"message": "Error: Internal Server Error"
}Integration
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.
PATCH
/
v1
/
integration
/
{integration_id}
/
tool-approval
Update tool approval settings
import requests
url = "https://api.diga.io/v1/integration/{integration_id}/tool-approval"
payload = { "tools": [
{
"tool_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approval_required": True
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tools: [{tool_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', approval_required: true}]
})
};
fetch('https://api.diga.io/v1/integration/{integration_id}/tool-approval', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.diga.io/v1/integration/{integration_id}/tool-approval \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tools": [
{
"tool_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approval_required": true
}
]
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.diga.io/v1/integration/{integration_id}/tool-approval"
payload := strings.NewReader("{\n \"tools\": [\n {\n \"tool_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"approval_required\": true\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "error",
"error_code": "INTERNAL_SERVER_ERROR",
"message": "Missing required permissions to update integration tools"
}{
"status": "error",
"error_code": "INTEGRATION_NOT_FOUND",
"message": "Integration 550e8400-e29b-41d4-a716-446655440000 not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"status": "error",
"error_code": "INTERNAL_SERVER_ERROR",
"message": "Error: Internal Server Error"
}Autorizaciones
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parámetros de ruta
Integration ID
Cuerpo
application/json
Request to bulk update approval settings for tools.
List of tools to update with their new approval settings
Minimum array length:
1Show child attributes
Show child attributes
Respuesta
Successful Response
⌘I

