---
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`

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.net/maia/apis/maia-public-rest-api.md) · [All operations](https://skmtc.net/maia/apis/maia-public-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/maia/maia-public-rest-api/revisions/6239825f68eb/schema)
