Skip to main content

Renew Certificate

Renews an existing private certificate for a communication channel, generating a new key pair while preserving an overlap period for a graceful transition.

Endpoint

POST /v2/certificates/renew

Request Body

FieldTypeRequiredConstraintsDescription
commIdintegerYesMust be a valid Comm IDCommunication channel whose certificate will be renewed
certKeyIdintegerYesMust match an existing certUnique identifier of the certificate to renew
overlapDaysintegerNo>= 0, default variesNumber of days the old certificate remains valid alongside the new one
yearsintegerNo>= 1, default 2Validity period of the new certificate in years
secureHashAlgorithmCertificateSecureHashAlgorithmNoSee ENUMsHashing algorithm for the renewed certificate
{
"commId": 5001,
"certKeyId": 88,
"overlapDays": 30,
"years": 2,
"secureHashAlgorithm": "SHA256"
}

Response

Returns the CommIDInfo object reflecting the renewed certificate.

{
"success": true,
"data": {
"commId": 5001,
"mailboxId": 101,
"commType": "as2",
"identifier": "MYCOMPANY-AS2",
"status": "Active",
"useType": "Production",
"privateKeyRequired": true,
"withCerts": true
}
}

ENUMs

This endpoint uses the CertificateSecureHashAlgorithm ENUM. See ENUMs Reference for all valid values.

Code Examples

curl -X POST "https://rest.ecgrid.io/v2/certificates/renew" \
-H "X-API-Key: $ECGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "commId": 5001, "certKeyId": 88, "overlapDays": 30, "years": 2, "secureHashAlgorithm": "SHA256" }'

See Also