Update a user (admin only)
PATCH
/api/v1/auth/users/{user_id}
const url = 'https://example.com/api/v1/auth/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"full_name":"example","role":"admin","is_active":true,"password":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/api/v1/auth/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "full_name": "example", "role": "admin", "is_active": true, "password": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”user_id
required
User Id
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Successful Response
Media typeapplication/json
object
success
required
boolean
data
required
UserRead
object
id
required
Id
string format: uuid
email
required
Email
string format: email
full_name
required
Full Name
string
role
required
UserRole
string
is_active
required
Is Active
boolean
is_system
Is System
True for the synthetic principal used when AUTH_DISABLED is set.
boolean
created_at
required
Created At
string format: date-time
Example
{ "success": true, "data": { "role": "admin", "is_system": false }}Unauthorized
Media typeapplication/json
ErrorResponse
object
Example
{ "error": { "code": "not_found", "correlation_id": "0f4b9a2e-6c2b-4f0e-9a4a-1c2b3d4e5f60", "message": "AI system not found." }}Forbidden
Media typeapplication/json
ErrorResponse
object
Example
{ "error": { "code": "not_found", "correlation_id": "0f4b9a2e-6c2b-4f0e-9a4a-1c2b3d4e5f60", "message": "AI system not found." }}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}