---
title: "Delete a snippet"
method: DELETE
path: "/snippets/{workspace}/{encoded_id}"
tags: ["Snippets"]
---

# Delete a snippet

`DELETE /snippets/{workspace}/{encoded_id}`

Deletes a snippet and returns an empty response.

## Response `204`

If the snippet was deleted successfully.

## Other responses

- `401` — If the snippet is private and the request was not authenticated.
- `403` — If authenticated user does not have permission to delete the private snippet.
- `404` — If the snippet does not exist.

---

[API](https://skmtc.net/bitbucket/apis/bitbucket-api.md) · [All operations](https://skmtc.net/bitbucket/apis/bitbucket-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bitbucket/bitbucket-api/versions/4ec8bd2515c5/schema)
