Skip to main content

PATCH /api/roles//activate

Activates a role that was previously deactivated. Once activated, the role can be assigned to users and its permissions will take effect.

Authentication

This endpoint requires authentication. Include a valid JWT token in the Authorization header.

Path Parameters

id
UUID
required
The unique identifier of the role to activate

Response

This endpoint returns 204 No Content on success with an empty response body.

Error Responses

  • 404 Not Found: Role with the specified ID does not exist
  • 500 Internal Server Error: Unexpected server error

Example Request

curl -X PATCH https://api.example.com/api/roles/550e8400-e29b-41d4-a716-446655440000/activate \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Success Response

HTTP/1.1 204 No Content

Example Error Response

{
  "timestamp": "2024-01-15T10:30:00Z",
  "requestId": "abc-123-def",
  "message": "Role not found",
  "detail": "No role exists with ID: 550e8400-e29b-41d4-a716-446655440000"
}

Usage Notes

  • Activating a role that is already active has no effect
  • After activation, the role’s status will be set to ACTIVE
  • Users with this role will immediately gain access to its associated permissions
  • This action is logged in the audit trail with action type ACTIVAR_ROL

Build docs developers (and LLMs) love