---
title: "Delete a location"
method: DELETE
path: "/api/locations/{location_id}"
tags: ["Location"]
---

# Delete a location

`DELETE /api/locations/{location_id}`

## Request

- Base URL: `https://api.sponsorunited.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.sponsorunited.com/api/locations/{location_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/sponsorunited/apis/sponsorunited-api/docs/api/locations/:location_id/delete.ts> (a function with typed inputs; its response is checked against the schema)

Deletes a location and detaches it from the associated entity

## Path parameters

- `location_id` integer, required

## Query parameters

- `entity_type` string
- `entity_id` integer

## Response `204`

Location deleted successfully

## Other responses

- `400`: Failed to delete location
- `401`: Unauthenticated
- `403`: Forbidden: the caller lacks the create-location permission
- `404`: Location not found, or the entity to detach from not found

---

[API](https://skmtc.dev/sponsorunited/apis/sponsorunited-api.md) - [All operations](https://skmtc.dev/sponsorunited/apis/sponsorunited-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sponsorunited/apis/sponsorunited-api/revisions/cbf1ca5bff8f?raw)
