---
title: "Delete a role"
method: DELETE
path: "/settings/roles/{id}"
tags: ["Admin Settings: Roles"]
---

# Delete a role

`DELETE /settings/roles/{id}`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/settings/roles/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/settings/roles/:id/delete.ts> (a function with typed inputs; its response is checked against the schema)

Refuses with HTTP 400 when the role is assigned to any admin (admins.role_id), or when it is the only remaining role.

## Path parameters

- `id` integer, required

## Response `200`

Role deleted.

## Other responses

- `400`: In use or last remaining role.
- `404`: Role not found.

---

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