Skip to content
Docs

Update a connector

PATCHhttps://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

connectorstringRequired
Stable connector ID or URL-encoded team-scoped UID. Examples: scl_abc123 or slack%2Fmy-bot.
teamIdstringOptional
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.
slugstringOptional
The team slug that scopes the request. Do not send it with teamId. 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
triggersbooleanOptional
Whether the triggers are enabled for this connector.
triggerDataobjectOptional
Trigger configuration, validated and encrypted by the trigger driver. An empty object applies driver defaults.
eventsarrayOptional
Default trigger events for this connector.
dataobjectOptional11 variants
iconstringOptional
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 }),
});
backgroundColorstringOptional
accentColorstringOptional
uidstringOptional
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.
namestringOptional
Display name for the connector. It is trimmed and cannot be empty or contain control characters.
200The updated connector and any required service-side follow-up signals.
connectorobjectRequired
A connector that defines how Vercel accesses an external service.
reconsentNeededobjectOptional
Existing authorizations no longer cover the connector's configured scopes, so they must be re-authorized.
reinstallNeededbooleanOptional
When true, prompt a team owner or administrator to reinstall the connector before relying on the change.
serviceSyncobjectOptional
Provider-side configuration synchronization result.
400One of the provided values in the request body is invalid. One of the provided values in the request query is invalid.
errorobjectRequired
Error details.
401The request is not authorized.
errorobjectRequired
Error details.
403You do not have permission to access this resource.
errorobjectRequired
Error details.
404The requested resource was not found.
errorobjectRequired
Error details.
409The request conflicts with the current resource state.
errorobjectRequired
Error details.
410The requested resource is no longer available.
errorobjectRequired
Error details.
422The request cannot be completed in the current state.
errorobjectRequired
Error details.
501Error
502A dependency returned an invalid or unsuccessful response.
errorobjectRequired
Error details.
504Error