---
title: "Create a case link"
method: POST
path: "/api/v2/cases/link"
tags: ["Case Management"]
---

# Create a case link

`POST /api/v2/cases/link`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/cases/link`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `cases_write`

Creates a directional link between two cases (for example, case A blocks case B). The parent and child cases and their relationship type must be specified.

## Request body

- CaseLinkCreateRequest: Request payload for creating a link between two entities.
  - `data` CaseLinkCreate, required: Data object for creating a case link.
    - `attributes` CaseLinkAttributes, required: Attributes describing a directional relationship between two entities (cases, incidents, or pages).
      - `child_entity_id` string, required: The UUID of the child (target) entity in the relationship.
      - `child_entity_type` string, required: The type of the child entity. Allowed values: `CASE`, `INCIDENT`, `PAGE`, `AGENT_CONVERSATION`.
      - `parent_entity_id` string, required: The UUID of the parent (source) entity in the relationship.
      - `parent_entity_type` string, required: The type of the parent entity. Allowed values: `CASE`, `INCIDENT`, `PAGE`, `AGENT_CONVERSATION`.
      - `relationship` string, required: The type of directional relationship. Allowed values: `RELATES_TO` (bidirectional association), `CAUSES` (parent causes child), `BLOCKS` (parent blocks child), `DUPLICATES` (parent duplicates child), `PARENT_OF` (hierarchical), `SUCCESSOR_OF` (sequence), `ESCALATES_TO` (priority escalation).
    - `type` 'link', required: JSON:API resource type for case links.

## Response `201`

Created

- CaseLinkResponse: Response containing a single case link.
  - `data` CaseLink, required: A directional link representing a relationship between two entities. At least one entity must be a case.
    - `attributes` CaseLinkAttributes, required: Attributes describing a directional relationship between two entities (cases, incidents, or pages).
      - `child_entity_id` string, required: The UUID of the child (target) entity in the relationship.
      - `child_entity_type` string, required: The type of the child entity. Allowed values: `CASE`, `INCIDENT`, `PAGE`, `AGENT_CONVERSATION`.
      - `parent_entity_id` string, required: The UUID of the parent (source) entity in the relationship.
      - `parent_entity_type` string, required: The type of the parent entity. Allowed values: `CASE`, `INCIDENT`, `PAGE`, `AGENT_CONVERSATION`.
      - `relationship` string, required: The type of directional relationship. Allowed values: `RELATES_TO` (bidirectional association), `CAUSES` (parent causes child), `BLOCKS` (parent blocks child), `DUPLICATES` (parent duplicates child), `PARENT_OF` (hierarchical), `SUCCESSOR_OF` (sequence), `ESCALATES_TO` (priority escalation).
    - `id` string, required: The case link identifier.
    - `type` 'link', required: JSON:API resource type for case links.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
