# Link Delete

**Link – Delete**

## Overview

Deletes links between two entities from the end system.

## API URI

```bash
POST: /entities/{entityTypeId}/{entityId}/links/delete?projectId=<projectId>
```

## URI Parameters

| Name         | In    | Required | Type   | Description                                           |
| ------------ | ----- | -------- | ------ | ----------------------------------------------------- |
| entityTypeId | path  | True     | String | `id` of the entity type for the given entity id.      |
| entityId     | path  | True     | String | `id` of the entity in which links need to be deleted. |
| projectId    | query | True     | String | Project in which the given entity exists.             |

## Request Payload

| Name     | Required | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| -------- | -------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| linkType | True     | String | <p>The type of link for which links are to be deleted. Example: <code>Parent</code>, <code>Child</code>, <code>Related</code>.<br><br><strong>If connector supports rank:</strong><br>If <code>links.rank.orderType</code> from <a href="entity-type-get">Entity Type – Get</a> API is either <code>HIERARCHY\_SINGLE</code> or <code>HIERARCHY\_MULTIPLE</code>, handle additional link types <code>Hierarchy Parent</code> and <code>Hierarchy Child</code>.</p>                                                                                         |
| links    | True     | List   | <p>List of links to be deleted. Each link in the list has the following structure:<br><br>\[<br>{ <code>"\<linkedEntityIdField>"</code>: "The name will be the field name in which entity of the linked entity will come, and the value will be the entity id to which entityId coming in request URI need to be deleted",<br><code>"\<linkedEntityTypeField>"</code>: "The name will be the field name in which entity type of linked entity will come, and the value will be the entity type of linked entity id that needs to be deleted"<br>}<br>]</p> |

**Example**

```json
{
  "linkType": "Parent",
  "links": [
    {
      "linkedEntityId": "1234",
      "linkedEntityType": "Task"
    },
    {
      "linkedEntityId": "5678",
      "linkedEntityType": "Story"
    }
  ]
}
```

## Response Payload

Only HTTP status `204`.
