---
title: "`DELETE /styles/{id}`: remove a style and every version of it."
method: DELETE
path: "/styles/{spec}"
tags: ["styles"]
---

# \`DELETE /styles/{id}\`: remove a style and every version of it.

`DELETE /styles/{spec}`

## Request

- Base URL: `https://api.mapmap.ai`
- URL: `https://api.mapmap.ai/styles/{spec}`
- Auth: one of:
  - HTTP bearer
  - API key in query parameter `api_key`

Same ownership rule as publishing (`check_publish_allowed`), taken
INSIDE the lock. Deletion breaks every map still embedding one of the
style's capability URLs: that is the owner's call to make, and it is
the only way the "immutable versions are kept forever" storage story
stays bounded now that creation is capped rather than unlimited.

## Path parameters

- `spec` string, required

## Response `204`

Style and all versions removed

## Other responses

- `403`: Not the style's owner
- `404`: Hosted styles not configured or unknown style

---

[API](https://skmtc.dev/mapmap/apis/sn-gateway.md) · [All operations](https://skmtc.dev/mapmap/apis/sn-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/mapmap/apis/sn-gateway/revisions/2293be8b4c38?raw)
