Skip to content
Docs

Add a repository permission

POSThttps://api.vercel.com/v1/vcr/repository/{idOrName}/permissions
Grant a team access to a VCR repository. Sharing applies to the whole repository.
Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.vcr.addRepositoryPermission({
projectId: "<id>",
idOrName: "<value>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: {
teamId: "team_LLHUOMOoDlqOp8wPE4kFo9pE",
teamSlug: "my-team",
},
});
console.log(result);
}
run();
Response
{
"permission": {
"createdAt": "2026-06-30T10:00:00.000Z",
"repositoryId": "repo_a1b2c3d4e5f6",
"teamId": "team_a1b2c3d4e5f6",
"teamSlug": "my-team"
}
}
AuthorizationbearerToken

Default authentication mechanism

idOrNamestringRequired
projectIdstringRequired
Project ID or name (slug) within the authenticated team. IDs take precedence over names. Missing or empty values return HTTP 400.
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
application/json
teamIdstringOptional
ID of a team that is granted access to a repository.
teamSlugstringOptional
Slug of a team that is granted access to a repository.
200Success
permissionobjectRequired
A team's access grant to a Vercel Container Registry repository.
400One of the provided values in the request body is invalid. One of the provided values in the request query is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404Error
410Error