Skip to content
Docs

Create or update a connector project connection

POSThttps://api.vercel.com/v1/connect/connectors/{connector}/projects/{projectId}
Connect a connector to a project, or replace the environments on an existing project connection.
https://api.vercel.com/v1/connect/connectors/{connector}/projects/{projectId}
const response = await fetch('https://api.vercel.com/v1/connect/connectors/connector/projects/projectId?teamId=string&slug=string', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"environments": []
}),
});
const data = await response.json();
console.log(data);
Response
{
"connectorId": "example_id",
"createdAt": "123",
"enabledEnvironments": [],
"project": {
"customEnvironments": [
{
"id": "icfg_1234567890",
"slug": "string"
}
],
"id": "icfg_1234567890",
"name": "Example Name"
},
"updatedAt": "123"
}
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.
projectIdstringRequired
Vercel project ID.
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
environmentsarrayRequired
One or more built-in environment names or stable custom environment IDs that belong to the project. Duplicate values are accepted and removed.
200The connector project connection was created or updated.
connectorIdstringRequired
Stable scl_ connector ID, even when the request used a UID.
createdAtnumberRequired
Time when the project connection was created, in epoch milliseconds.
enabledEnvironmentsarrayRequired
Environments where the connector is enabled for the project.
projectobjectRequired
Vercel project connected to the connector.
updatedAtnumberRequired
Time when the project connection was last updated, in epoch milliseconds.
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.