Set an enrollment's notification address
const url = 'https://example.com/api/certs/service/enrollments/example/notification-email';const options = { method: 'PATCH', headers: { 'X-Ssoossh-Key-Secret': '<X-Ssoossh-Key-Secret>', 'Content-Type': 'application/json' }, body: '{}'};
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/certs/service/enrollments/example/notification-email \ --header 'Content-Type: application/json' \ --header 'X-Ssoossh-Key-Secret: <X-Ssoossh-Key-Secret>' \ --data '{}'Points every notification about this enrollment at one address instead of fanning out to every holder of its service account. An empty value clears it and restores fan-out.
This exists for the cases fan-out cannot serve: a service account whose holders have never logged in reaches nobody, an identity provider that releases no email claim silences every holder, and a large holder set turns every redemption into a mailshot where a team alias would do.
Allowed to any holder of the enrollment’s service account, and to SOC operators. Auditor is not enough: it is a read role, and this write redirects every future message about a credential.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The enrollment’s UUID
Request Bodyrequired
Section titled “Request Bodyrequired”The address, or empty to clear it
object
The address, or empty to clear it
object
NotificationEmail is the address every notification about this enrollment goes to. Empty clears it, restoring fan-out to every holder of the service account.
No omitempty: an absent field and an empty one must mean the same thing here, because clearing the address is the whole reason to send an empty one.
Example generated
{}Responses
Section titled “Responses”The stored address
object
object
NotificationEmail is the address every notification about this enrollment goes to. Empty clears it, restoring fan-out to every holder of the service account.
No omitempty: an absent field and an empty one must mean the same thing here, because clearing the address is the whole reason to send an empty one.
Example generated
{ "data": { "notification_email": "example" }, "error": "example"}Not a valid email address
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"}No valid session
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 a holder of the service account
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"}No such enrollment
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"}