# Delete link

`DELETE /v2/environments/{environmentId}/alertLinks/{alertLinkId}`

Available as MCP tool `delete-link-v2` (Delete).

Alert endpoints allow you to review or manage traffic alert rules, which monitor your integrations for healthy traffic. [Learn about alert rules](https://docs.redoxengine.com/permalink/RqjicoYocYtUDfFmaaoSt/#monitor-data-exchange-health) or [manage alert rules in the Redox dashboard](https://docs.redoxengine.com/permalink/39Lf3qtqeHmCZkFaKf5jKz).

There are different types of traffic alert rules: 

<details>
<summary>No traffic alert rule</summary>

A <u>No traffic</u> alert rule monitors whether traffic is flowing appropriately in a given subscription. 

With this type of alert rule, you receive a notification when no logs reach a terminal state (i.e., `Succeeded`, `Filtered`, `Failed`) during a given time period (i.e., as little as 30 minutes up to 72 hours). 

This type of alert isn’t meant for tracking errors since failed logs count as completed traffic. 

> **Pending logs not included**
>
> This doesn’t include pending logs since they aren’t in a terminal state.

</details>

<details>
<summary>Low traffic alert rule</summary>

A <u>Low traffic</u> alert rule monitors whether traffic is flowing as anticipated in a given subscription. 

With this type of alert rule, you receive a notification if less than X number of logs reach a terminal state (i.e., `Succeeded`, `Filtered`, `Failed`) within a specified time (i.e., as little as 30 minutes up to 72 hours).

This type of alert rule is one step more preemptive than a <u>no traffic</u> alert type since it can help you catch an unexpected dip in traffic before reaching no traffic at all. However, it still isn’t meant for tracking errors since failed logs count as completed traffic. 

> **Pending logs not included**
>
> This doesn’t include pending logs since they aren’t in a terminal state.

</details>

<details>
<summary>Error threshold alert rules</summary>

An <u>Error Threshold</u> alert rule monitors the number of errors in a given subscription. 

With this type of alert rule, you receive a notification if X number of logs reach a terminal state of `Failed` and will no longer be retried within a specified time (i.e., as little as 15 minutes up to 24 hours).

</details>

<details>
<summary>Retry threshold alert rule</summary>

A <u>Retry threshold</u> alert rule monitors the number of retries for any log in a given subscription. 

With this type of alert rule, you receive a notification if one or more logs has been retried more than X number of times within 15 minutes (this is a static lookback time).

For example, if you configure an alert rule with a retry threshold of 10, the alert rule triggers if one or more logs have reached at least 10 retries within the last 15 minutes. These logs might continue retrying, but the alert rule doesn’t clear until all logs for the linked subscription reach a terminal state or have fewer than 10 retries within 15 minutes. 

> **What’s not included**
>
> A <u>Retry threshold</u> alert doesn’t measure the cumulative number of retries for all logs combined, nor does it measure the number of individual logs that are retrying.

</details>

You can retrieve an alert rule, as well as create, update, or delete it. Alternatively, you can retrieve a list of alert rules. An alert rule response contains details about any related subscription links.  

You can also retrieve a subscription link for an alert rule, as well as create, pause, or delete it.

 

### Delete link

Delete an existing subscription link for an alert rule within a Redox organization.

> **Only for engineer or support roles**
>
> Any user in an environment may view either your organization’s traffic alert rules. However, you must be assigned to an engineer or a support role to manage alert rules. [Learn about roles](/basics/managing-access-for-your-redox-organization/what-are-user-roles-and-groups).
>
> Alert rules aren’t available for free Redox accounts, so they won’t be visible in the dashboard or available via API. You must upgrade your Redox account to use alert rules.

## Request parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `environmentId` | path | string | Yes | Identifies the specific environment that you're operating in or on behalf of. |
| `alertLinkId` | path | string | Yes | Contains the unique identifier of the alert link. |

## Request example

```bash
curl 'https://api.redoxengine.com/platform/v2/environments/{environmentId}/alertLinks/{alertLinkId}' \
--request DELETE \
--header 'Authorization: Bearer $API_TOKEN' \
--header 'accept: application/json'
```

## Responses

### 200

Contains a payload that indicates whether the delete request was successful.

Describes the outcome of the delete request.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No |  |
| `meta.version` | string | No | Lists the major and minor version number for the format of the returned payload. The payload format or shape may change between minor versions, like including additional or extended fields in later versions. We include the version data in each response so that you have the option to handle the signaled differences. |
| `payload` | object | No |  |
| `payload.message` | string | No | Explains that the delete request was successful, so the alert link no longer exists. This action doesn't delete the related alert; any related alerts but be explicitly deleted with the "Delete alert" endpoint. |

_Generated from the schema: the values are placeholders, not a real payload._

```json
{
  "meta": {
    "version": "1.0.0"
  },
  "payload": {
    "message": "string"
  }
}
```

### 400

Bad Request

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `payload` | object | No | Contains the error message. |
| `payload.error` | object | No | Contains the error message details. |
| `payload.error.id` | string | No | Contains a unique identifier for the given error instance. |
| `payload.error.title` | string | No | Displays the high-level error message, typically something succinct like `Bad Request`. |
| `payload.error.code` | string | No | Contains an alternative ID for the error type, which can be used to find relevant troubleshooting information. |
| `payload.error.detail` | string | No | Contains the specific error details for this message. |
| `payload.error.status` | number | No | Displays the corresponding HTTP status code for the error. |
| `payload.error.transient` | boolean | No | Describes whether the error will resolve itself. If `true`, no further action needs to be taken. If `false`, you may need to troubleshoot on your end to resolve the issue before the error can be processed. |

```json
{
  "payload": {
    "error": {
      "title": "Bad Request",
      "code": "validation.error.bad.request",
      "detail": "Error details",
      "status": 400,
      "transient": false
    }
  }
}
```

### 403

Forbidden

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `payload` | object | No | Contains the error message. |
| `payload.errors` | Array of object | No |  |
| `payload.errors[].title` | string | No | Displays the high-level error message, typically something succinct like `Forbidden`. |
| `payload.errors[].code` | string | No | Contains an alternative ID for the error type, which can be used to find relevant troubleshooting information. |

```json
{
  "payload": {
    "errors": [
      {
        "title": "Forbidden",
        "code": "authorization.forbidden"
      }
    ]
  }
}
```

### 500

Internal Server Error

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `payload` | object | No | Contains the error message. |
| `payload.error` | object | No | Contains the error message details. |
| `payload.error.title` | string | No | Displays the high-level error message, typically something succinct like `Failed in step X`. |
| `payload.error.code` | string | No | Contains an alternative ID for the error type, which can be used to find relevant troubleshooting information. |
| `payload.error.detail` | string | No | Contains the specific error details for this message. |
| `payload.error.status` | number | No | Displays the corresponding HTTP status code for the error. |
| `payload.error.transient` | boolean | No | Describes whether the error will resolve itself. If `true`, no further action needs to be taken. If `false`, you may need to troubleshoot on your end to resolve the issue before the error can be processed. |

```json
{
  "payload": {
    "error": {
      "title": "Internal Server Error",
      "code": "failed.db.lookup",
      "detail": "Error details",
      "status": 500,
      "transient": true
    }
  }
}
```
