Set a User's sign-in status
PATCH
/api/v1/auth/users/{id}/disabled
const url = 'https://example.com/api/v1/auth/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/disabled';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"disabled":true}'};
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/disabled \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "disabled": true }'Sets a User’s sign-in status. It requires a signed-in User with the admin scope and the admin or owner Role. It also requires a recent passkey check. It can return 401 if the session is missing or expired, 403 if access is denied and 429 if the request limit is reached. Route: /api/v1/auth/users/{id}/disabled. Inputs: id. A recent account assertion is required. Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
User id
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
disabled
required
boolean
Examplegenerated
{ "disabled": true}Responses
Section titled “Responses”Media typeapplication/json
object
code
required
string
message
required
string
Examplegenerated
{ "code": "example", "message": "example"}