Skip to Content

Disconnect an account

Revokes Samva's access at the provider and deletes the account with the integrations that link it, and their grants from every agent's draft.

DELETE
/v1/accounts/{accountId}

Revokes Samva's access at the provider and deletes the account with the integrations that link it, and their grants from every agent's draft. A published agent version that granted them can no longer use them; publish the agent to drop the grants.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

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

Response Body

DeleteAccountResponse

application/json
  1. response
id*IntegrationAccountId
Match^intgacct_[0-9a-hjkmnp-tv-z]{16,24}$
deleted*true
Value intrue
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.accounts.remove({
  "accountId": "example"
});
Example Response
{
  "id": "string",
  "deleted": true
}

Related documentation