Skip to Content

Update an integration

Changes an integration's settings, enabled tools, which tools run without approval, and whether replies using its data need approval.

PATCH
/v1/integrations/{integrationId}

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.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

integrationId*string
Match^intg_[0-9a-hjkmnp-tv-z]{16,24}$

Request Body

application/json
  1. body
answerWithoutApproval?AnswerWithoutApproval
enabledTools?array<>
tool?
settings?

Response Body

Integration

application/json
  1. response
app*IntegrationKey
Match^[a-z0-9][a-z0-9_-]{0,63}$
settings*
id*IntegrationId
Match^intg_[0-9a-hjkmnp-tv-z]{16,24}$
status*IntegrationStatus
Value in"pending""connected""needsReconnect"
accounts*
supportsContactAccounts*boolean
answerWithoutApproval*AnswerWithoutApproval
tools*array<>
toolPage*
installedBy*|null
createdAt*string
updatedAt*string
Example Request
import { 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"
}

Related documentation