---
title: "🔒 Отключить репозиторий от проекта. Репозиторий без проектов остаётся в каталоге интеграции, но не синхронизируется; у GitLab снимается вебхук."
method: POST
path: "/projects/project/repository/unlink"
tags: ["Projects"]
---

# 🔒 Отключить репозиторий от проекта. Репозиторий без проектов остаётся в каталоге интеграции, но не синхронизируется; у GitLab снимается вебхук.

`POST /projects/project/repository/unlink`

## Request

- Base URL: `http://localhost`
- URL: `http://localhost/projects/project/repository/unlink`
- Auth: one of:
  - API key in header `sid` and API key in header `rts` and API key in header `sig`
  - HTTP bearer

Отключить репозиторий от проекта. Репозиторий без проектов остаётся в каталоге интеграции, но не синхронизируется; у GitLab снимается вебхук.

**Access:** `authorized` (10 ) · **Scope:** `write`

**Allows:** `project:update`, `integration:git` (все обязательны; проверка в команде по ресурсу из запроса)

### TypeScript (copy-paste)

**`POST /projects/project/repository/unlink`**

<details open><summary><b>Params</b></summary>

```typescript
export interface ProjectsProjectRepositoryUnlinkParams {
  ID: string
  repositoryID: string
}
```

</details>

<details open><summary><b>Response</b></summary>

```typescript
export type ProjectsProjectRepositoryUnlinkResponse = IServerResponse<Resp_projects_project_repository_unlink>

export interface IServerResponse<T = any> {
  code: number
  data: T
  srvTS: number
  rkey: string
}
```

</details>

> Полный файл типов: [`/docs/types`](/docs/types) · raw: [`/docs/api-types.ts`](/docs/api-types.ts)

## Query parameters

- `ID` string, uuid, required
- `repositoryID` string, uuid, required

## Headers

- `devID` string, uuid, required
- `tz` string, required
- `app` string, required
- `appVer` string, required
- `rKey` string

## Response `200`

OK — `IServerResponse<Resp_projects_project_repository_unlink>`

- object
  - `code` integer, required
  - `data` RespProjectsProjectRepositoryUnlink, required: Empty response object
  - `srvTS` integer, required: Server timestamp (ms)
  - `rkey` string, required: Request key

## Other responses

- `400`: BadRequest / Validation — неверные params/body/headers
- `401`: Unauthorized: Active user session required
- `403`: AccessNotAllowed: Privilege project:update (to the project) or integration:git required
- `406`: TimeResync — расхождение rts с сервером

---

[API](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api.md) · [All operations](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/revisions/a143b51ba29a?raw)
