---
updatedAt: 2026-03-01T18:03:14.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/onboard/llms.txt
---

# CPS: Update your certificate to go live

```curl cURL
enrollmentId=12345
allow-staging-bypass=true
deploy-not-before="2022-08-31T00:00:00.000Z"
renewal-date-check-override=false
hostname={hostname}

egcurl --eg-section default --request PUT \
  --url "https://$hostname/cps/v2/enrollments/$enrollmentId?allow-staging-bypass=$allow-staging-bypass&deploy-not-after=$deploy-not-after&deploy-not-before=$deploy-not-before&renewal-date-check-override=$renewal-date-check-override" \
  --header "Accept: application/vnd.akamai.cps.enrollment-status.v9+json" \
  --header "Content-Type: application/vnd.akamai.cps.enrollment.v9+json" \
  --data '
{
    "autoRenewalStartTime": null,
    "changeManagement": true,
    "location": "/cps-api/enrollments/12345",
    "pendingChanges": [
        {
            "changeType": "modify-certificate",
        }
    ]
}'
```

```node Node
const EdgeGrid = require("akamai-edgegrid");
const os = require("os");
const edgercPath = os.homedir + "/.edgerc.txt";
const edgercSection = "default";  
const eg = new EdgeGrid({
  path: edgercPath,
  section: edgercSection
});   

const enrollmentId = 12345;

eg.auth({
  path: `/cps/v2/enrollments/${enrollmentId}`,
  method: "PUT",
  headers: {
    "Content-Type": "application/vnd.akamai.cps.enrollment.v9+json",

    "Accept": "application/vnd.akamai.cps.enrollment-status.v9+json"},
  body: {
    "changeManagement": true,
    "autoRenewalStartTime": null,
    "location": "/cps-api/enrollments/12345",
    "pendingChanges": [
        {
            "changeType": "modify-certificate"
        }
    ]
},
  qs: {
    "allow-staging-bypass": true,
    "deploy-not-before": "2021-01-31T00:00:00.000Z",
    "renewal-date-check-override": false
}                    
});
eg.send(function(error, response, body) {
  console.log(body);    
});
```

```python Python
import requests
from akamai.edgegrid import EdgeGridAuth, EdgeRc
from urlparse import urljoin

edgerc = EdgeRc('~/.edgerc.txt')
section = 'default'
baseurl = 'https://%s' % edgerc.get(section, 'host')

session = requests.Session()
session.auth = EdgeGridAuth.from_edgerc(edgerc, section)
enrollmentId = 12345
 

path= '/cps/v2/enrollments/{}'.format(enrollmentId)
headers = {
  "Content-Type": "application/vnd.akamai.cps.enrollment.v9+json",

  "Accept": "application/vnd.akamai.cps.enrollment-status.v9+json"}
payload = {
    "autoRenewalStartTime": null,
    "changeManagement": true,
    "location": "/cps-api/enrollments/12345",
    "pendingChanges": [
        {
            "changeType": "modify-certificate"
        }
    ]
} 
querystring = {
  "allow-staging-bypass": true,
  "deploy-not-before": "2021-01-31T00:00:00.000Z",
  "renewal-date-check-override": false
}  

result = session.put(urljoin(baseurl, path), headers=headers, json=payload, querystring=querystring)
print(result.status_code)
print(result.json())
```

```json Response Example
{
  "enrollment": "/cps/v1/enrollments/12345",
  "changes": [
    "/cps/v1/enrollments/12345/changes/678910"
  ]
}
```

# Set up authentication

<!-- curl@5-7 -->
<!-- node@1-8 -->
<!-- python@1-10 -->

If you haven't already, you need to [create your authentication credentials](https://techdocs.akamai.com/onboard/docs/set-up-identity-and-access-api#4-set-up-authentication-credentials) in an API client in Control Center. Once you have, include this code to apply the token values to authenticate your requests.

**Note**: If you're using cURL, the host value from your authentication credential serves as the {hostname} variable value.

# Choose the enrollment to update

<!-- curl@1 -->
<!-- node@10 -->
<!-- python@11 -->

Include the `enrollmentId` for the enrollment you what to update. If you haven't stored this value, you can run the [List enrollments](https://techdocs.akamai.com/onboard/docs/test-and-go-live-api#1-activate-your-cert-on-production) operation to get it.

# Form the request URL

<!-- curl@8 -->
<!-- node@13 -->
<!-- python@14 -->

Specify the target endpoint.

# Set your headers

<!-- curl@9-10 -->
<!-- node@15-18 -->
<!-- python@15-18 -->

Include these headers:

* `Accept: application/vnd.akamai.cps.enrollment-status.v9+json`
* `Content-Type: application/vnd.akamai.cps.enrollment.v9+json`

**Note**: The `v9+` portion of each header reflects the version of CPS to be used for this operation. Version 9 (v9) reflects the most recent, general availability release. See [Object versioning](https://techdocs.akamai.com/cps/reference/internal-versioning) for more information.

# Build your body component

<!-- curl@12-22 -->
<!-- node@19-28 -->
<!-- python@19-28 -->

Include the following contents:

* `changeManagement`. Set this to `true` to enable ​Akamai​'s automatic renewal of your cert when it expires. (You added the [Auto Domain Validation behavior](https://techdocs.akamai.com/onboard/docs/set-up-your-property-api#add-auto-domain-validation-recommended) to your property for this.)
If you don't include this, you'll have to manually renew your certificate on its expiration date. This is a standard TLS, domain-validated certificate enrollment. It has a lifecycle of 90 days. The automatic renewal process will begin 16 days before this lifecycle.

* `autoRenewalStartTime`. Include this and set it to `null`. This helps ensure that ​Akamai​ will use the standard, automated process to renew your certificate.

* `location`. This is the full path to your enrollment. If you haven't stored this value, you can run the [List enrollments](https://techdocs.akamai.com/onboard/docs/test-and-go-live-api#1---activate-your-cert-on-production) operation to get it.

* `pendingChanges`. Include this array with the `changeType` object set to `modify-certificate`.

# Set your query string parameters

<!-- curl@2-4 -->
<!-- node@29-33 -->
<!-- python@29-33 -->

Include these values:

* `allow-staging-bypass`. Include this and set it to `true`. This sets up the certificate to bypass the staging network and push it to production.

* `deploy-not-before`. You can optionally include this to set a start date to deploy the certificate. For example, if you'd like to wait some time before you actually start delivering your website on the ​Akamai​ network, you could include this and set it to a time in the future.

* `renewal-date-check-override`. Include this and set it to `false`. Set this way, renewal of the certificate will begin the standard 16 days before its 90-day lifecycle ends.

# Call the API

<!-- curl@1-1000 -->
<!-- node@1-1000 -->
<!-- python@1-1000 -->

Issue a PUT request.

# Review the response

<!-- curl@0 -->
<!-- node@0 -->
<!-- python@0 -->

The response object contains information about the updated certificate.