---
title: "🔒 Изменение типа, комментария или meta связи. Концы не меняются — удали и создай новую."
method: POST
path: "/relation/update"
tags: ["Relations"]
---

# 🔒 Изменение типа, комментария или meta связи. Концы не меняются — удали и создай новую.

`POST /relation/update`

## Request

- Base URL: `http://localhost`
- URL: `http://localhost/relation/update`
- Auth: one of:
  - API key in header `sid` and API key in header `rts` and API key in header `sig`
  - HTTP bearer

Изменение типа, комментария или meta связи. Концы не меняются — удали и создай новую.

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

**Allows:** `task:relations`, `task:read`, `feature:update`, `feature:read`, `meeting:update`, `meeting:read` (все обязательны; проверка в команде по ресурсу из запроса)

### TypeScript (copy-paste)

**`POST /relation/update`**

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

```typescript
export interface RelationUpdateParams {
  ID: string
}
```

</details>

<details open><summary><b>Body</b></summary>

```typescript
export interface RelationUpdateBody {
  type?: RelationType | null
  note?: string | null
  meta?: Record<string, any> | null
}
```

</details>

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

```typescript
export type RelationUpdateResponse = IServerResponse<Relation>

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

## Headers

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

## Request body

- RelationUpdateBody: JSON body for `relation/update`
  - `type` 'blocker' | 'regression' | 'derived' | 'duplicate' | 'related': `blocker` = "blocker", `regression` = "regression", `derived` = "derived", `duplicate` = "duplicate", `related` = "related"
  - `note` string, nullable
  - `meta` object, nullable

## Response `200`

OK — `IServerResponse<Relation>`

- object
  - `code` integer, required
  - `data` Relation, required: Schema Relation (inferred from ResponseData AST)
  - `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: privilegeRequired - relations of neither end or the other end is not visible (params.allow)
- `404`: NotFound: Relation with specified ID does not exist
- `406`: TimeResync — расхождение rts с сервером
- `422`: UnprocessableContent: Invalid relation type or comment

---

[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)
