Create a new CP code

Note: You can skip this operation if you want to use a default Content Provider code that's been generated for your contract. To use a default value, make sure in the cpCode behavior you specify enableDefaultContentProviderCode: true.

To create a new CP code, you need to associate it with a product. You can assign any CP code within a property's rule tree as detailed in the Rule Trees section. Make sure the CP code's productId value matches the one assigned to the properties that invoke your CP code, otherwise you may get a warning about problems this may cause in traffic reports. To use the newly created CP code, make sure in the cpCode behavior you specify enableDefaultContentProviderCode: false and provide the value.id.

To view or update certain CP code data, such as name, time zone, and purgeability, use the CP Codes and Reporting Groups API. You can write contractid and groupId data only on the initial POST operation. They're read-only in subsequent PUT operations. To reassign a CP code's contract or group, contact your Akamai representative for help.

Recipes
Create a new CP code
Open Recipe
Language
URL
Click Try It! to start a request and see the response here!