# DeleteEndpoint

## Description

Deletes the specified endpoint. Note that an endpoint can only be deleted if it is not in use by any task.

Required User Role: See [Required Enterprise Manager permissions](https://help.qlik.com/en-US/enterprise-manager/November2024/Content/EnterpriseManager/EnterpriseManager_APIGuide/Introduction/AEMPermissions.htm).

## Syntax

`public void DeleteEndpoint(` ` string server,  ` `string endpoint` `);`

## Parameters

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| server | - | The server where the endpoint is defined. |
| endpoint | - | The name of the endpoint to be deleted. |

## Return values

N/A

## Errors

Error responses

| Error | Message | Description |
| --- | --- | --- |
| AEM\_ENDPOINT\_NOT\_FOUND | Replicate endpoint {endpoint} on server {server} could not be found. | Endpoint name unknown to Qlik Enterprise Manager. |
| AEM\_DELETE\_ENDPOINT\_INNER\_ERR | Failed to delete Replicate endpoint {endpoint} from server {server}. | Replicate encountered an error/exception when trying to delete the endpoint. |
| AEM\_ENDPOINT\_IS\_IN\_USE | Replicate endpoint {endpoint} on server {server} cannot be deleted as it is currently in use by one or more tasks. | The Replicate endpoint must be removed from its associated tasks before it can be deleted. |