# Delete auth credential

`DELETE /v1/authcredentials/{id}`

Available as MCP tool `delete-auth-cred` (Delete).

Credential endpoints allow you to manage custom authentication strategies for your organization's destinations. Destinations are the endpoints in your system that receive data from Redox. 

You may choose custom authentication for your destinations if you want more secure authentication credentials for any data coming into your system. 

With this set of Platform API endpoints, you can:

- retrieve a list of existing auth credentials for an environment;
- retrieve one auth credential by its ID;
- retrieve a list of supported auth strategies;
- create a new auth credential;
- update an existing auth credential; or
- delete an existing auth credential.

### Delete auth credential

Delete an existing auth credential if it's not being used. The request only requires the auth credential ID.

The response contains an `OK` acknowledgement if the delete is successful. If the delete isn't successful, the auth credential is likely in use. Any auth credentials that are in use can't be deleted.

## Request parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | Yes | Displays the unique identifier of the auth credential. |

## Request example

```bash
curl 'https://api.redoxengine.com/platform/v1/authcredentials/{id}' \
--request DELETE \
--header 'Authorization: Bearer $API_TOKEN' \
--header 'accept: application/json'
```

## Responses

### 200

Contains a `payload` object with the available authentication strategies.

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 auth credential no longer exists within the specified environment. |

```json
{
  "meta": "1.0.0",
  "payload": {
    "message": "Auth credential id [98765] was successfully deleted."
  }
}
```

### 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.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
    }
  }
}
```
