Permanently removes a permission from the system by its numericDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/TheSerchCp/SEAM-API/llms.txt
Use this file to discover all available pages before exploring further.
id. The deletion runs inside a database transaction: all entries in the permissionXRole pivot table referencing this permission are deleted first, then the permission record itself is removed. If the permission does not exist, a 404 is returned.
Authentication
Requires a valid JWT and theDELETE /api/v1/permission/:id permission assigned to the caller’s role.
Request
Method:DELETE
Path: /api/v1/permission/:id
Headers
Bearer token obtained from the login endpoint. Format:
Bearer <token>Path Parameters
The numeric ID of the permission to delete. Must match
^\d+$ (digits only, no decimals or negative values).Response
200 OK
Returnsnull for data on a successful deletion.
Always
true for successful responses.Human-readable confirmation message. Value:
"Permiso eliminado exitosamente".Always
null for delete operations.Example Response
Error Responses
| Status | Description |
|---|---|
400 Bad Request | id path parameter is not a valid numeric string. |
401 Unauthorized | Missing or invalid JWT token. |
403 Forbidden | Authenticated user’s role lacks the DELETE /api/v1/permission/:id permission. |
404 Not Found | No permission with the given id exists. |
404 Not Found
Code Example
cURL
Socket.IO Events
On success, the server emits the following events:| Event | Target | Operation | Status sequence |
|---|---|---|---|
operation:progress | Requesting socket | permissions:delete | start → success |
data:changed | All connected clients | permissions:delete | Broadcast with no data payload (null) |
data:changed can use the initiatorSocketId field in the payload to skip redundant UI updates if they already know the result from the HTTP response.