---
title: "Create a relation"
method: POST
path: "/v1/cases/{caseId}/relations"
tags: ["Cases"]
---

# Create a relation

`POST /v1/cases/{caseId}/relations`

Create a relation from an individual or a company to a company.

---

#### See also  
Learn more about [Cases](./cases-guide)

## Path parameters

- `caseId` string, uuid, required

## Request body

- union
  - CaseRelationCreateCompanyTarget
    - `from_company_id` string, uuid, required
    - `to_company_id` string, uuid — When omitted, will default to the `main` company of the case
    - `voting_rights_percentage` number, float, nullable
    - `ownership_percentage` number, float, nullable
    - `roles` string[] — `legal_representative` `shareholder`
    - `position` string, nullable
  - CaseRelationCreateIndividualTarget
    - `from_individual_id` string, uuid, required
    - `to_company_id` string, uuid — When omitted, will default to the `main` company of the case
    - `voting_rights_percentage` number, float, nullable
    - `ownership_percentage` number, float, nullable
    - `roles` string[] — `legal_representative` `shareholder`
    - `position` string, nullable

## Response `201`

Relation has been created in the case

**ℹ️ Click to see full payload**

- CaseRelation
  - `id` string, uuid, required
  - `from_company_id` string, uuid, nullable, required
  - `from_individual_id` string, uuid, nullable, required
  - `to_company_id` string, uuid, required
  - `voting_rights_percentage` number, float, nullable, required
  - `ownership_percentage` number, float, nullable, required
  - `roles` string[], required — `legal_representative` `shareholder`
  - `position` string, nullable, required
  - `created_at` string, date-time, required — Creation date Date time in format [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) (`yyyy-MM-ddTHH:mm:ss.S+X` eg `2023-01-31T13:30:00.000Z`)
  - `updated_at` string, date-time, required — Latest update date Date time in format [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) (`yyyy-MM-ddTHH:mm:ss.S+X` eg `2023-01-31T13:30:00.000Z`)

## Other responses

- `400` — The request is either malformed or contain invalid parameters. - Make sure the identifier specified in the URL is a valid UUID - Make sure the body payload matches the expected schema - A case must have a `main` company to create relation in it. - Relation from a given individual or company to another company must be unique.
- `404` — No case, company or individual can be found.

---

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