/certificates/{id}/renew
POST
/certificates/{id}/renew
const url = 'https://pki.example.com/api/v1/certificates/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/renew';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"generateNewKey":true,"validityDays":1,"updateInfo":false,"subject":{"commonName":"example","organization":"example","organizationalUnit":"example","country":"example","state":"example","locality":"example"},"sanDns":["example"],"sanIp":["example"],"sanEmail":["hello@example.com"],"revokeOriginal":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://pki.example.com/api/v1/certificates/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/renew \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "generateNewKey": true, "validityDays": 1, "updateInfo": false, "subject": { "commonName": "example", "organization": "example", "organizationalUnit": "example", "country": "example", "state": "example", "locality": "example" }, "sanDns": [ "example" ], "sanIp": [ "example" ], "sanEmail": [ "hello@example.com" ], "revokeOriginal": false }'Renew an existing certificate, optionally with new key or updated information
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
generateNewKey
Generate a new key pair for the renewed certificate
boolean
validityDays
Validity period in days (defaults to original validity)
integer
updateInfo
Update subject or SANs with new values
boolean
subject
New subject information (requires updateInfo=true)
object
commonName
string
organization
string
organizationalUnit
string
country
string
state
string
locality
string
sanDns
New DNS SANs (requires updateInfo=true)
Array<string>
sanIp
New IP SANs (requires updateInfo=true)
Array<string>
sanEmail
New Email SANs (requires updateInfo=true)
Array<string>
revokeOriginal
Revoke the original certificate after renewal
boolean
Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
id
string format: uuid
subject
string
serialNumber
string
notBefore
string format: date-time
notAfter
string format: date-time
certificatePem
string
status
string
renewedFromId
string format: uuid
Example
{ "status": "active"}Default Response
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Array<object>
object
field
string
message
string
Example generated
{ "error": { "code": "example", "message": "example", "details": [ { "field": "example", "message": "example" } ] }}Default Response
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Array<object>
object
field
string
message
string
Example generated
{ "error": { "code": "example", "message": "example", "details": [ { "field": "example", "message": "example" } ] }}Default Response
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Array<object>
object
field
string
message
string
Example generated
{ "error": { "code": "example", "message": "example", "details": [ { "field": "example", "message": "example" } ] }}