Skip to content

Request a renewal

POST
/v1/certificates/{id}/renew
curl --request POST \
--url https://api.nextpki.com/v1/certificates/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/renew \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "connector_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "csr": "example", "org_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Opens a renewal request in state pending_approval. This does not return a certificate: an approver has to approve the request in the Console before any certificate authority is contacted, because issuance costs money. Poll GET /v1/requests/{id} to follow progress.

Requires a PKCS#10 CSR and the connector to order through. Send the CSR only - NextPKI never accepts or wants a private key. Generate the key on the host that will serve the certificate.

Not idempotent in v1: there is no idempotency key, so after an ambiguous timeout check GET /v1/requests for this certificate before retrying, or you may open a second renewal.

id
required
string format: uuid
Media typeapplication/json
object
connector_id
required
string format: uuid
csr
required

PEM-encoded PKCS#10 certificate signing request. Public data only - never send a private key.

string
org_id

Optional organisation assignment. Inherited from the certificate when omitted.

string format: uuid
Examplegenerated
{
"connector_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"csr": "example",
"org_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Renewal request created

Media typeapplication/json
object
id
string format: uuid
state
string
Examplegenerated
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"state": "example"
}

Malformed request - fix it rather than retrying

Media typeapplication/json
object
error
string
Examplegenerated
{
"error": "example"
}

Missing, malformed, unknown or revoked token

Media typeapplication/json
object
error
string
Examplegenerated
{
"error": "example"
}

The token’s scopes do not cover this endpoint

Media typeapplication/json
object
error
string
Examplegenerated
{
"error": "example"
}

Not found, or not visible to this tenant

Media typeapplication/json
object
error
string
Examplegenerated
{
"error": "example"
}