Re-enable a user (admin or SOC)
const url = 'https://example.com/api/admin/users/example/enable';const options = { method: 'PATCH', headers: { 'X-Ssoossh-Key-Secret': '<X-Ssoossh-Key-Secret>', 'Content-Type': 'application/json' }, body: '{"reason":"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/admin/users/example/enable \ --header 'Content-Type: application/json' \ --header 'X-Ssoossh-Key-Secret: <X-Ssoossh-Key-Secret>' \ --data '{ "reason": "example" }'Re-enables a previously disabled user, whichever role or directory sync disabled it. The operation is idempotent. Note: service enrollments that have already expired are not un-expired; the user must request new enrollments.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”User ID
Request Bodyrequired
Section titled “Request Bodyrequired”Re-enable reason (required)
Re-enable reason (required)
object
Reason explains why the user is being re-enabled, e.g. “cleared with security, SEC-1234”. Required on the same terms as the disable reason, and as valuable to the person after this one.
Example generated
{ "reason": "example"}Responses
Section titled “Responses”User re-enabled
object
Example generated
{ "additionalProperty": "example"}Not authenticated
object
Data is always null on an error response.
Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.
ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.
Example
{ "error": "certificate request \"9f1c…\" not found", "error_code": "not_found"}Not authorized as admin or SOC
object
Data is always null on an error response.
Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.
ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.
Example
{ "error": "certificate request \"9f1c…\" not found", "error_code": "not_found"}User not found
object
Data is always null on an error response.
Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.
ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.
Example
{ "error": "certificate request \"9f1c…\" not found", "error_code": "not_found"}