---
title: "Create relationship rule"
method: POST
path: "/v1/workspaces/{workspaceId}/relationship-rules"
---

# Create relationship rule

`POST /v1/workspaces/{workspaceId}/relationship-rules`

## Path parameters

- `workspaceId` string, required

## Request body

- CreateRelationshipRuleRequest
  - `cel` string, required
  - `description` string
  - `metadata` object, required
  - `name` string, required
  - `reference` string, required

## Response `201`

Resource created successfully

- RelationshipRule
  - `cel` string, required
  - `description` string
  - `id` string, required
  - `metadata` object, required
  - `name` string, required
  - `reference` string, required
  - `workspaceId` string, required

## Other responses

- `400` — Invalid request

## Changes

- **2026-03-10** `4507a7cb420a` — 5 breaking, 8 warning, 1 info
  - added the new required request property `cel`
  - removed the required property `fromType` from the response with the `201` status
  - removed the required property `matcher` from the response with the `201` status
  - removed the required property `relationshipType` from the response with the `201` status
  - …10 more
- **2026-02-19** `e61389fc98ac` — 5 breaking, 1 warning, 8 info
  - added the new required request property `fromType`
  - added the new required request property `matcher`
  - added the new required request property `relationshipType`
  - added the new required request property `toType`
  - …10 more

[Change history](https://skmtc.dev/ctrlplanedev/apis/ctrlplane-api/changes/v1/workspaces/:workspaceId/relationship-rules/post.md)

---

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