> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apinizer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Endpoint

> Deletes an endpoint (API method) from an API proxy. This operation is only available for REST API proxies. The endpoint is permanently removed.

## Endpoint

```
POST /apiops/projects/{projectName}/apiProxies/{apiProxyName}/endpoints/delete/
```

## Authentication

Requires a Personal API Access Token.

### Header

```
Authorization: Bearer YOUR_TOKEN
```

## Request

### Headers

| Header        | Value            | Required |
| ------------- | ---------------- | -------- |
| Authorization | Bearer {token}   | Yes      |
| Content-Type  | application/json | Yes      |

### Path Parameters

| Parameter    | Type   | Required | Description                        |
| ------------ | ------ | -------- | ---------------------------------- |
| projectName  | string | Yes      | Project name                       |
| apiProxyName | string | Yes      | API Proxy name (must be REST type) |

### Request Body

#### Full JSON Body Example

```json theme={null}
{
  "name": "/api/users",
  "httpMethod": "GET"
}
```

#### Request Body Fields

| Field      | Type   | Required | Description                                                                                                       |
| ---------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------- |
| name       | string | Yes      | Endpoint path/name (used to identify the endpoint)                                                                |
| httpMethod | string | Yes      | HTTP method for the endpoint (used to identify the endpoint). See [EnumHttpRequestMethod](#enumhttprequestmethod) |

### Query Parameters

None

## Response

### Success Response (200 OK)

```json theme={null}
{
  "success": true
}
```

#### Response Fields

| Field   | Type    | Description                             |
| ------- | ------- | --------------------------------------- |
| success | boolean | Indicates if the request was successful |

### Error Response (400 Bad Request)

```json theme={null}
{
  "error": "bad_request",
  "error_description": "Endpoint can only be deleted from REST API Proxies!"
}
```

#### Common Causes

* API Proxy is not REST type (SOAP endpoints cannot be deleted manually)
* Missing `name` or `httpMethod` fields
* Endpoint with specified name and httpMethod does not exist

### Error Response (401 Unauthorized)

```json theme={null}
{
  "error": "unauthorized_client",
  "error_description": "Invalid token"
}
```

### Error Response (404 Not Found)

```json theme={null}
{
  "error": "not_found",
  "error_description": "ApiProxy (name: MyAPI) was not found!"
}
```

## cURL Example

```bash theme={null}
curl -X POST \
  "https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/endpoints/delete/" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "/api/users",
    "httpMethod": "GET"
  }'
```

## Full JSON Body Example

```json theme={null}
{
  "name": "/api/users",
  "httpMethod": "GET"
}
```

## Permissions

User must have **`API_MANAGEMENT` + `MANAGE`** permission in the project.

## Notes and Warnings

* **REST Only**: Endpoints can only be deleted from REST API proxies. SOAP endpoints are managed through WSDL reparsing
* **Permanent Deletion**: Endpoint deletion is permanent and cannot be undone
* **Policies**: All policies associated with the endpoint are also deleted
* **Endpoint Identifier**: Endpoint is identified by `name` and `httpMethod` combination (not by ID)

## Related Documentation

* [List Endpoints](/api-reference/api-proxies/endpoints/list-endpoints) - List all endpoints
* [Get Endpoint](/api-reference/api-proxies/endpoints/get-endpoint) - Get endpoint details
* [Create Endpoint](/api-reference/api-proxies/endpoints/create-endpoint) - Create a new endpoint
* [Update Endpoint](/api-reference/api-proxies/endpoints/update-endpoint) - Update an endpoint
