---
title: "Rotate the access token for a project repository"
method: POST
path: "/v1/projects/{projectId}/repositories/token"
tags: ["Repositories"]
---

# Rotate the access token for a project repository

`POST /v1/projects/{projectId}/repositories/token`

## Request

- Base URL: `https://eu1.api.matillion.com/dpc`
- URL: `https://eu1.api.matillion.com/dpc/v1/projects/{projectId}/repositories/token`
- Auth: HTTP bearer

Rotates the supplied Git provider personal access token by delegating to the Git service. The new token is stored in the customer vault under the git-m2m mount.

## Path parameters

- `projectId` string, required

## Headers

- `Git-Provider-Access-Token` string, required

## Response `204`

Repository token rotated successfully

## Other responses

- `400`: Bad request — missing or invalid token
- `401`: Unauthorized
- `403`: Forbidden — the provided token could not be rotated
- `404`: Project or associated repository not found
- `500`: Unexpected error occurred

---

[API](https://skmtc.dev/maia/apis/maia-public-rest-api.md) - [All operations](https://skmtc.dev/maia/apis/maia-public-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/maia/apis/maia-public-rest-api/revisions/6239825f68eb?raw)
