Update an integration
Changes an integration's settings, enabled tools, which tools run without approval, and whether replies using its data need approval.
PATCH
Changes an integration's settings, enabled tools, which tools run without approval, and whether replies using its data need approval. Only an organization owner may change answerWithoutApproval or a tool's runsWithoutApproval: false makes a read tool ask first, true lets a tool that changes something run, each for the tool's current effect. Fields not named keep their values. What an agent may do with the integration is the agent's grant.
apiKeyheader
x-api-key<token>integrationId*stringMatch
^intg_[0-9a-hjkmnp-tv-z]{16,24}$application/json- body
answerWithoutApproval?AnswerWithoutApprovalenabledTools?array<>tool?settings?Integration
application/json- response
app*IntegrationKeyMatch
^[a-z0-9][a-z0-9_-]{0,63}$settings*id*IntegrationIdMatch
^intg_[0-9a-hjkmnp-tv-z]{16,24}$status*IntegrationStatusValue in
"pending""connected""needsReconnect"accounts*supportsContactAccounts*booleananswerWithoutApproval*AnswerWithoutApprovaltools*array<>toolPage*installedBy*|nullcreatedAt*stringupdatedAt*stringimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.integrations.update({
"integrationId": "example"
});Example Response
{
"app": "string",
"settings": {
"property1": "string",
"property2": "string"
},
"id": "string",
"status": "pending",
"accounts": {
"property1": "string",
"property2": "string"
},
"supportsContactAccounts": true,
"answerWithoutApproval": true,
"tools": [
{
"name": "string",
"title": "string",
"kind": "query",
"effect": "read",
"guards": [
"pinnedDestination"
],
"granted": true,
"unavailableReason": "input_schema_too_large",
"enabled": true,
"runsWithoutApproval": true
}
],
"toolPage": {
"nextOffset": 0,
"total": 0,
"revision": "string"
},
"installedBy": "string",
"createdAt": "string",
"updatedAt": "string"
}