---
title: "write relationships"
method: POST
path: "/v1/tenants/{tenant_id}/relationships/write"
tags: ["Data"]
---

# write relationships

`POST /v1/tenants/{tenant_id}/relationships/write`

## Path parameters

- `tenant_id` string, required

## Request body

- WriteRelationshipsBody — Represents a request to write relationship data.
  - `metadata` RelationshipWriteRequestMetadata
    - `schema_version` string
  - `tuples` Tuple[] — List of tuples for the request. Must have between 1 and 100 items.
    - `entity` Entity — Entity represents an entity with a type and an identifier.
      - `type` string
      - `id` string
    - `relation` string
    - `subject` Subject — Subject represents an entity subject with a type, an identifier, and a relation.
      - `type` string
      - `id` string
      - `relation` string

## Response `200`

A successful response.

- RelationshipWriteResponse
  - `snap_token` string — The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)

## Other responses

- `default` — An unexpected error response.

## Changes

- **2025-12-28** `f37e45046dd2` — 1 breaking
  - the `details/items/additionalProperties/` response's property type/format changed from `object`/`` to ``/`` for status `default`
- **2024-08-23** `f3b10e35081b` — 1 breaking, 2 info
  - added required request body
  - added the media type `application/json` for the response with the status `200`
  - added the media type `application/json` for the response with the status `default`
- **2024-08-22** `282fb7ba2640` — 3 breaking
  - removed the request body
  - removed the media type `application/json` for the response with the status `200`
  - removed the media type `application/json` for the response with the status `default`
- **2024-03-19** `0bc305aa169f` — 1 breaking
  - the `details/items/additionalProperties/` response's property type/format changed from ``/`` to `object`/`` for status `default`

[Change history](https://skmtc.dev/permify/apis/permify-api/changes/v1/tenants/:tenant_id/relationships/write/post.md)

---

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