---
type: api
title: Delete source map
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-deletesourcemap
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-deletesourcemap
products:
  - Kibana
---

# Delete source map

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

## Paths

- `DELETE` `/api/apm/sourcemaps/{id}`
- `DELETE` `/s/{space_id}/api/apm/sourcemaps/{id}`

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

#### Path Parameters

- `id` (string)
  Source map identifier

## Description

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

Delete a previously uploaded source map.

## Responses

#### `200`

Successful response

`application/json`

Type: `object`

#### `400`

Bad Request response

`application/json`

- `error` (string)
  Error type
- `message` (string)
  Error message
- `statusCode` (number)
  Error status code
#### `401`

Unauthorized response

`application/json`

- `error` (string)
  Error type
- `message` (string)
  Error message
- `statusCode` (number)
  Error status code
#### `403`

Forbidden response

`application/json`

- `error` (string)
  Error type
- `message` (string)
  Error message
- `statusCode` (number)
  Error status code
#### `500`

Internal Server Error response

`application/json`

- `error` (string)
  Error type
- `message` (string)
  Error message
- `statusCode` (number)
  Error status code
#### `501`

Not Implemented response

`application/json`

- `error` (string)
  Error type
- `message` (string)
  Error message
- `statusCode` (number)
  Error status code
## Code Examples

#### Console

```console
DELETE /api/apm/sourcemaps/{id}
```

#### curl

```curl
curl -X DELETE "https://{kibana_url}/api/apm/sourcemaps/{id}" \
  -H "elastic-api-version: string" \
  -H "kbn-xsrf: true"
```

