---
title: "Detach a database from this user (revokes privileges, removes the link)"
method: DELETE
path: "/api/client/database-users/{id}/databases/{database_id}"
tags: ["Client - Database Users"]
---

# Detach a database from this user (revokes privileges, removes the link)

`DELETE /api/client/database-users/{id}/databases/{database_id}`

Breaks the link between a database user and a database without deleting either. Required before deleting either side of the pair.

## Path parameters

- `id` integer, required
- `database_id` integer, required

## Response `200`

Database detached from user

## Other responses

- `404` — User or database not found, or they are not linked
- `422` — Detach failed

---

[API](https://skmtc.dev/adminbolt/apis/adminbolt-api-documentation.md) · [All operations](https://skmtc.dev/adminbolt/apis/adminbolt-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/adminbolt/adminbolt-api-documentation/revisions/bf4f36fbfbd3/schema)
