Update a connector
PATCH
https://api.vercel.com/v2/connect/connectors/{connector}Update a connector and return the connector with any service-side update signals that the caller must handle.
Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",});
async function run() { const result = await vercel.connect.updateConnector({ connector: "<value>", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", connectUpdateConnectorRequest: {}, });
console.log(result);}
run();Response
{ "connector": { "accentColor": "string", "appTokens": { "crossInstallation": "false", "permissionsUrl": "https://example.com", "requiresReinstallation": "false", "scopes": [], "supportedAuthorizationDetails": [], "supportsRefinement": "false", "supportsResources": "false" }, "backgroundColor": "string", "clientUrl": "https://example.com", "connectionMethod": "string", "createdAt": "123", "createdBy": { "id": "icfg_1234567890", "type": "user" }, "creationMode": "managed", "defaultInstallationId": "example_id", "devsite": "string", "displayName": "Example Name", "docsite": "string", "events": [], "icon": "string", "id": "icfg_1234567890", "knownStale": "false", "managed": { "sync": "false" }, "name": "Example Name", "redirectUri": "https://example.com", "reinstallAt": "123", "service": "string", "serviceIcon": "string", "supportedSubjectTypes": [], "supportsIcon": "false", "supportsInstallation": "false", "supportsRevocation": "false", "supportsTriggers": "false", "target": "string", "triggerDestinations": [ { "branch": "string", "customEnvironmentId": "example_id", "path": "string", "projectId": "example_id" } ], "triggers": { "enabled": "false" }, "type": "api-key", "typeIcon": "string", "typeName": "Example Name", "uid": "example_id", "updatedAt": "123", "updatedBy": { "id": "icfg_1234567890", "type": "user" }, "userTokens": { "crossInstallation": "false", "manualCredentialInput": "false", "scopes": [], "supportedAuthorizationDetails": [], "supportsRefinement": "false", "supportsResources": "false" }, "website": "string" }, "reconsentNeeded": { "scope": "user" }, "reinstallNeeded": "false", "serviceSync": { "errors": [ { "fields": [], "message": "string", "vendor": "value" } ], "status": "done" }}Errors
{ "error": { "code": "string", "message": "string" }}AuthorizationbearerToken
Default authentication mechanism
The team ID that scopes the request. Do not send it with slug. If both are omitted, Vercel uses the team associated with the token or the authenticated user's default team. The request returns 401 if no team can be selected.
application/json
Trigger configuration, validated and encrypted by the trigger driver. An empty object applies driver defaults.
SHA-1 digest of a PNG or JPEG icon that is at least 640 by 640 pixels. This field does not accept a URL or image bytes.
First compute the digest and upload the raw image with POST /v2/files. Send
Content-Length and the same 40-character digest in x-vercel-digest. Then set icon to that digest.import { createHash } from 'node:crypto';import { readFile } from 'node:fs/promises';const VERCEL_TOKEN = process.env.VERCEL_TOKEN;const connectorId = 'scl_...';const bytes = await readFile('icon.png');const digest = createHash('sha1').update(bytes).digest('hex');await fetch('https://api.vercel.com/v2/files', {method: 'POST',headers: {Authorization: `Bearer ${VERCEL_TOKEN}`,'Content-Type': 'application/octet-stream','Content-Length': String(bytes.length),'x-vercel-digest': digest,},body: bytes,});await fetch(`https://api.vercel.com/v2/connect/connectors/${connectorId}`, {method: 'PATCH',headers: {Authorization: `Bearer ${VERCEL_TOKEN}`,'Content-Type': 'application/json',},body: JSON.stringify({ icon: digest }),});
Full team-scoped UID, such as
slack/my-bot. It cannot contain whitespace, %, #, control characters, or Vercel-owned namespaces. Changing it breaks callers that use the old UID. The stable connector ID does not change.200The updated connector and any required service-side follow-up signals.
Existing authorizations no longer cover the connector's configured scopes, so they must be re-authorized.
When true, prompt a team owner or administrator to reinstall the connector before relying on the change.
400One of the provided values in the request body is invalid.
One of the provided values in the request query is invalid.
501Error
504Error