Skip to content

Approve a request

POST
/api/certs/requests/{id}/approve
curl --request POST \
--url https://example.com/api/certs/requests/example/approve \
--header 'Content-Type: application/json' \
--header 'X-Ssoossh-Key-Secret: <X-Ssoossh-Key-Secret>' \
--data '{}'

Session-authed and CSRF-guarded. Publishes a signing job; the certificate reaches the client over its own SSE stream, not in this response.

Approving a service-type request requires a body naming which of the approver’s own service accounts the certificate is for; that account becomes the certificate principal. Other types take no body.

id
required
string

The certificate request’s UUID

Service-account selection (service-type requests only)

Media typeapplication/json
One of:
object

Example generated

{}

Queued for signing

Media typeapplication/json
object
data
required
object
status
required

Status is always “signing” today — included so the response shape can carry more without a breaking change later.

string
error
string

Example generated

{
"data": {
"status": "example"
},
"error": "example"
}

Malformed body, or a service-type approval that names no service account

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

No valid session

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

Bound to another user, refused by the type’s require condition, a service account the approver is not associated with, or a cross-origin call

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

No such request

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

Already decided: denied, or approved and signing or signed

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

Expired before it was decided

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