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

# Delete an endpoint

> Delete a Frontier Gateway endpoint and stop routing its slug.

Delete an endpoint. The call tears down the endpoint and its targets and stops routing its slug. The slug is freed for reuse: you can `POST /v1/gateway/endpoints` again with the same value to provision a fresh endpoint.

### Authentication

<ParamField header="Authorization" type="string" required>
  Workspace API key with management scope, passed as `Authorization: Api-Key $BASETEN_API_KEY` (or `Bearer`; both are accepted).
</ParamField>

### Path parameters

<ParamField path="endpoint_id" type="string" required>
  Identifier of the endpoint to delete, returned as `id` by [Create an endpoint](/reference/gateway/endpoints/create-an-endpoint).
</ParamField>

### Response

<ResponseField name="id" type="string" required>
  Identifier of the deleted endpoint.
</ResponseField>

<ResponseField name="slug" type="string" required>
  Slug of the deleted endpoint.
</ResponseField>

### Errors

| Status          | Meaning                                                                                       |
| --------------- | --------------------------------------------------------------------------------------------- |
| `403 Forbidden` | The endpoint exists but isn't in your workspace, or the caller doesn't have management scope. |
| `404 Not Found` | No endpoint with this `id` in your workspace, or it has already been deleted.                 |

<RequestExample>
  ```bash curl theme={"system"}
  curl --request DELETE \
    --url https://api.baseten.co/v1/gateway/endpoints/abc123hash \
    --header "Authorization: Api-Key $BASETEN_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"system"}
  {
    "id": "abc123hash",
    "slug": "my-org/glm-5.2"
  }
  ```
</ResponseExample>
