Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(api): state when the last-admin guard refuses a key change

Yudhi Armyndharis4343ebb4aedf
diff --git a/docs/06-api-specification.md b/docs/06-api-specification.md
index 3f0338bc2..a34423c5d 100644
--- a/docs/06-api-specification.md
+++ b/docs/06-api-specification.md
@@ -4973,7 +4973,7 @@ Returns the updated key (no plaintext).
}
```
-**Errors:** `400` validation (incl. `forbidNonWhitelisted` for unknown fields such as `isActive`) · `401` missing/invalid key · `403` key role below ADMIN, or the key is session-scoped or restricted with `allowedChats` · `404` not found · `409` change would remove the last usable admin key
+**Errors:** `400` validation (incl. `forbidNonWhitelisted` for unknown fields such as `isActive`) · `401` missing/invalid key · `403` key role below ADMIN, or the key is session-scoped or restricted with `allowedChats` · `404` not found · `409` change would remove the last usable admin key, or no other usable admin key lasts at least as long
#### POST /api/auth/api-keys/:id/revoke
@@ -5003,7 +5003,7 @@ Sets `isActive` to `false` and returns the key with explicit HTTP `200`. After r
}
```
-**Errors:** `401` missing/invalid key · `403` key role below ADMIN, or the key is session-scoped or restricted with `allowedChats` · `404` not found · `409` target is the last usable admin key
+**Errors:** `401` missing/invalid key · `403` key role below ADMIN, or the key is session-scoped or restricted with `allowedChats` · `404` not found · `409` target is the last usable admin key, or no other usable admin key lasts at least as long
#### DELETE /api/auth/api-keys/:id
@@ -5021,7 +5021,7 @@ Permanently delete an API key (hard delete). Also drops any un-flushed usage acc
`@HttpCode(204)` — no response body.
-**Errors:** `401` missing/invalid key · `403` key role below ADMIN, or the key is session-scoped or restricted with `allowedChats` · `404` `"API key with id '<id>' not found"` · `409` target is the last usable admin key
+**Errors:** `401` missing/invalid key · `403` key role below ADMIN, or the key is session-scoped or restricted with `allowedChats` · `404` `"API key with id '<id>' not found"` · `409` target is the last usable admin key, or no other usable admin key lasts at least as long
#### POST /api/auth/validate