---
title: "Create Relationship"
method: POST
path: "/v1/workspaces/{workspace}/access-control/relationships"
tags: ["v1", "protected", "access-control"]
---

# Create Relationship

`POST /v1/workspaces/{workspace}/access-control/relationships`

Grant a resource-ownership relation via the configured graph backend.

## Path parameters

- `workspace` string, required — Slug of the workspace the request acts in

## Request body

- RelationshipWriteRequest
  - `namespace` string, required
  - `object` string, required
  - `relation` string, required
  - `subject_id` string, nullable
  - `subject_set` SubjectSetBody
    - `namespace` string, required
    - `object` string, required
    - `relation` string, required

## Response `201`

Successful Response

- object

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-26** `d3ad8e1a3681` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/agentarea/apis/agentarea-api/changes/v1/workspaces/:workspace/access-control/relationships/post.md)

---

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