Skip to content

Expire an enrollment (admin or SOC)

PATCH
/api/admin/enrollments/{id}/expire
curl --request PATCH \
--url https://example.com/api/admin/enrollments/example/expire \
--header 'Content-Type: application/json' \
--header 'X-Ssoossh-Key-Secret: <X-Ssoossh-Key-Secret>' \
--data '{ "reason": "example" }'

Immediately marks an enrollment as expired, preventing future service certificate retrievals. The operation is idempotent.

id
required
string

Enrollment ID

Expiry reason (required)

Media typeapplication/json

Expiry reason (required)

object
reason
required

Reason explains why the enrollment is being expired. Required and server-validated, like the user containment reasons.

string

Example generated

{
"reason": "example"
}

Enrollment expired

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"
}

Enrollment 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"
}