Skip to content

Re-enable a user (admin or SOC)

PATCH
/api/admin/users/{id}/enable
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.

id
required
string

User ID

Re-enable reason (required)

Media typeapplication/json

Re-enable reason (required)

object
reason
required

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.

string

Example generated

{
"reason": "example"
}

User re-enabled

Media typeapplication/json
object
key
additional properties

Example generated

{
"additionalProperty": "example"
}

Not authenticated

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

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.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}

Not authorized as admin or SOC

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

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.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}

User not found

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

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.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}