---
type: api
title: Delete a private location
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-delete-private-location
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-delete-private-location
products:
  - Kibana
---

# Delete a private location

- Server: `https://{kibana_url}`

## Paths

- `DELETE` `/api/synthetics/private_locations/{id}`
- `DELETE` `/s/{space_id}/api/synthetics/private_locations/{id}`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#basicauth)

#### Path Parameters

- `id` (string · min: 1 · max: 1024)
  The unique identifier of the private location to be deleted.

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

You must have `all` privileges for the Synthetics and Uptime feature in the Observability section of the Kibana feature privileges.
The API does not return a response body for deletion, but it will return an appropriate status code upon successful deletion.
A location cannot be deleted if it has associated monitors in use. You must delete all monitors associated with the location before deleting the location.

## Response

OK

## Code Examples

#### Console

```console
DELETE /api/synthetics/private_locations/{id}
```

#### curl

```curl
curl -X DELETE "https://{kibana_url}/api/synthetics/private_locations/{id}"
```

