---
title: "Add a repository permission"
method: POST
path: "/v1/vcr/repository/{idOrName}/permissions"
tags: ["vcr"]
---

# Add a repository permission

`POST /v1/vcr/repository/{idOrName}/permissions`

## Request

- Base URL: `https://api.vercel.com`
- URL: `https://api.vercel.com/v1/vcr/repository/{idOrName}/permissions`
- Auth: HTTP bearer

Grant a team access to a VCR repository. Sharing applies to the whole repository.

## Path parameters

- `idOrName` string, required

## Query parameters

- `projectId` string, required: Project ID or name (slug) within the authenticated team. IDs take precedence over names. Missing or empty values return HTTP 400.
- `teamId` string
- `slug` string

## Request body

- object
  - `teamId` string: ID of a team that is granted access to a repository.
  - `teamSlug` string: Slug of a team that is granted access to a repository.

## Response `200`

- object
  - `permission` VcrRepositoryPermission, required: A team's access grant to a Vercel Container Registry repository.
    - `createdAt` string, required: ISO 8601 timestamp of when the permission was created.
    - `repositoryId` string, required: Identifier of the repository the permission grants access to.
    - `teamId` string, required: Identifier of the team that is granted access to the repository.
    - `teamSlug` string, required: Slug of the team that is granted access to the repository.

## Other responses

- `400`: One of the provided values in the request body is invalid. One of the provided values in the request query is invalid.
- `401`: The request is not authorized.
- `403`: You do not have permission to access this resource.
- `404`
- `410`

## Changes

- **2026-08-04** `0b0420c2223a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/vercel/apis/vercel-api/changes/v1/vcr/repository/:idOrName/permissions/post.md)

---

[API](https://skmtc.dev/vercel/apis/vercel-api.md) - [All operations](https://skmtc.dev/vercel/apis/vercel-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vercel/apis/vercel-api/revisions/60686c0e1f6a?raw)
