---
title: "Create a CI Relation For a Given CI ID"
method: POST
path: "/cis/{ciId}/relations"
tags: ["CIs"]
---

# Create a CI Relation For a Given CI ID

`POST /cis/{ciId}/relations`

Creates a CI relation for a given CI ID.

## Request body

- CIRelation
  - `targetCiId` integer, required — The ID of the linked target CI.
  - `relationTypeId` integer, required — The unique identifier of the CI relation type.

## Response `201`

The created CI relation.

- CIRelationResponse
  - `targetCiId` integer, required — The ID of the linked target CI.
  - `relationTypeId` integer, required — The unique identifier of the CI relation type.
  - `srcDependencyRole` 'affecting' | 'affected_by', required — Indicates the CI relation affecting role.

## Other responses

- `400` — The request was invalid or cannot be served
- `401` — Authentication information is missing or invalid
- `404` — The specified resource was not found
- `409` — The request could not be completed due to a conflict with the current state of the resource. This typically occurs when attempting to create a duplicate resource, update a resource that has been modified by another process, or when business rules prevent the operation.

---

[API](https://skmtc.net/sysaid/apis/sysaid-public-api.md) · [All operations](https://skmtc.net/sysaid/apis/sysaid-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sysaid/sysaid-public-api/revisions/38a43a1b2981/schema)
