Authentication
This endpoint requires authentication and admin role access.URL Parameters
id(string, required): Supabase UUID of the user to update
Request Body
persona_id(integer, optional): Update the linked personarole(string, optional): Update the user role
Key Information
- The user
id(Supabase UUID) cannot be changed - If a field is not provided, the existing value is preserved
- You can unlink a persona by sending
persona_id: null
Response
Returns the updated user object:id(string): Supabase UUID identifying the userpersona_id(integer, nullable): Updated persona linkrole(string): Updated user rolecreated_at(datetime): Original creation timestamp
Error Responses
404: User not found
Related Endpoints
For updating only the role, you can also usePUT /api/usuarios/:id/rol.