---
title: "updateRelation"
method: PUT
path: "/v1/entity/{slug}/{id}/relations/{attribute}/{entity_id}"
tags: ["Relations"]
---

# updateRelation

`PUT /v1/entity/{slug}/{id}/relations/{attribute}/{entity_id}`

Updates an existing relation between two entities.

## Path parameters

- `slug` string, required — URL-friendly identifier for the entity schema
- `id` string, uuid, required
- `attribute` string, required
- `entity_id` string, required

## Query parameters

- `async` boolean
- `activity_id` union
  - string, ulid — See https://github.com/ulid/spec
  - '' | 'null', nullable

## Request body

- object
  - `_tags` string[]

## Response `200`

Success

- RelationItem
  - `entity_id` string, uuid, required
  - `org_id` string — Organization Id the entity belongs to
  - `_schema` string — URL-friendly identifier for the entity schema
  - `attribute` string, required
  - `_tags` string[]
  - `reverse` boolean — Whether this is a reverse relation

## Other responses

- `404` — The requested resource was not found

---

[API](https://skmtc.dev/epilot/apis/entity-api.md) · [All operations](https://skmtc.dev/epilot/apis/entity-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/epilot/entity-api/revisions/46c13e283526/schema)
