---
updatedAt: 2025-01-08T23:23:44.000Z
agentTools:
  projectIndex: https://dev.frontapp.com/llms.txt
---

# removeLink

> 📘
>
> This function is only available on context of types  `singleConversation`, `multiConversations`, and `messageComposer`

```text
removeLink(linkId: string, cancelToken?: ApplicationCancelToken): Promise<void>;
```

## Parameters

| Parameter   | Type                                                  | Description                 |
| :---------- | :---------------------------------------------------- | :-------------------------- |
| linkId      | String                                                | Id of the link to remove    |
| cancelToken | [CancelToken](https://dev.frontapp.com/reference/plugin-sdk-cancel-token) (optional) | Token to cancel the request |

## Return value

The function returns a promise that resolves once the link is removed

## Errors

| Message                                     | Description                                                                                                                                                                                                                                                                                                                                                                                                            |
| :------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `The draft's conversation is not selected.` | This error applies to composer plugins. It occurs when the `messageComposer` context for composer plugins does not have access to the conversation. To avoid this error, disable the functionality of this method whenever the `conversation` property does not exist in the `messageComposer` context. Learn more in the [Context](https://dev.frontapp.com/reference/plugin-sdk-context#properties-within-the-composer-plugin-context-types) topic. |