Skip to main content

PUT /api/permissions/

Updates the details of an existing permission. All fields in the request body are optional and only provided fields will be updated.

Authentication

This endpoint requires authentication with a valid Bearer token.

Path Parameters

id
uuid
required
The unique identifier of the permission to update

Request Body

name
string
Updated name for the permission. Maximum 100 characters.
description
string
Updated description for the permission. Maximum 200 characters.

Response

id
uuid
Unique identifier of the updated permission
name
string
The updated name of the permission
description
string
The updated description of the permission
status
string
Current status of the permission

Status Codes

  • 200 OK - Permission updated successfully
  • 400 Bad Request - Invalid input data or validation errors
  • 404 Not Found - Permission with the specified ID not found
  • 500 Internal Server Error - Server error occurred

Example Request

curl -X PUT https://api.example.com/api/permissions/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "users:write",
    "description": "Permission to create and update user data"
  }'

Example Response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "users:write",
  "description": "Permission to create and update user data",
  "status": "ACTIVE"
}

Error Response

{
  "timestamp": "2026-03-04T10:30:00Z",
  "status": 404,
  "error": "Not Found",
  "message": "Permiso no encontrado",
  "path": "/api/permissions/550e8400-e29b-41d4-a716-446655440000"
}

Build docs developers (and LLMs) love