# 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="/pages/7a3QCTfdPVXFS1PjhMSf">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>                                                                             |
| **linkTypeDirection** | False    | String | Specifies the direction of the link. Valid values include `FORWARD`and `BACKWARD`. Applicable only if end system supports link direction. Otherwise, it will be empty.                                                                                                                                                                                                                                                                                                                                                                                     |
| 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",
  "linkTypeDirection": "FORWARD",
  "links": [
    {
      "linkedEntityId": "1234",
      "linkedEntityType": "Task"
    },
    {
      "linkedEntityId": "5678",
      "linkedEntityType": "Story"
    }
  ]
}
```

## Response Payload

Only HTTP status `204`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://opstech.gitbook.io/opstech-docs/7.223/connector-sdk-index/sdk-connector-apis/link-delete.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
