Logo
Akamai APIs API Documentation

Add or remove hostnames for a property's hostname bucket

PATCH https://{{host}}/papi/v1/properties/:propertyId/hostnames

For a property with useHostnameBucket set to true when created, this operation adds or removes up to 1000 property hostnames without incrementing the property version. Changes automatically activate on the selected network. If a property doesn't have hostname buckets enabled, this operation returns a 403 error. If another activation is in progress, whether it's a hostname activation or a property version activation, the operation fails with a 409 error. Once you perform this operation, it blocks subsequent requests until all the property hostnames are active. Note that to build the request body, you need to first obtain the edgeHostnameId either from an existing edge hostname or a new one you create by running the Create a new edge hostname operation.

Note: If you're using a new account, first register it on the Akamai network by activating any property version on either staging or production. Otherwise, your attempts to create or specify certificates will fail with a 403 error.

 

Body PARAM

Key Datatype Required Description 
contractId
string (Optional) Unique identifier for the contract. The parameter is optional if a property belongs to only one contract. Otherwise you need to specify it along with the `groupId`. In other operations that don't specify a `propertyId` URL parameter, this parameter is always required. See [ID prefixes](https://techdocs.akamai.com/property-mgr/reference/id-prefixes) for details on omitting the value's `ctr_` prefix.
groupId
string (Optional) Unique identifier for the group. The parameter is optional if a property belongs to only one group. Otherwise you need to specify it along with the `contractId`. In other operations that don't specify a `propertyId` URL parameter, this parameter is always required. See [ID prefixes](https://techdocs.akamai.com/property-mgr/reference/id-prefixes) for details on omitting the value's `grp_` prefix.
accountSwitchKey
string (Optional) For customers who manage more than one account, this [runs the operation from another account](https://techdocs.akamai.com/developer/docs/manage-many-accounts-with-one-api-client). The Identity and Access Management API provides a [list of available account switch keys](https://techdocs.akamai.com/iam-api/reference/get-client-account-switch-keys).



HEADERS

Key Datatype Required Description 
PAPI-Use-Prefixes
string (Required) __Enum__ Sets whether to represent [ID prefixes](https://techdocs.akamai.com/property-mgr/reference/id-prefixes) in response data. Set to `false` when exchanging PAPI data with other APIs.
Curl
curl -X PATCH 'https://host/papi/v1/properties/:propertyId/hostnames?contractId=&groupId=&accountSwitchKey=' -H 'PAPI-Use-Prefixes: PAPI-Use-Prefixes' -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"add":[{"certProvisioningType":"DEFAULT","cnameFrom":"m.example.com","cnameType":"EDGE_HOSTNAME","edgeHostnameId":"ehn_895824"},{"certProvisioningType":"CPS_MANAGED","cnameFrom":"www.example3.com","cnameType":"EDGE_HOSTNAME","edgeHostnameId":"ehn_895824"}],"network":"PRODUCTION","note":"Sample hostname activation","notifyEmails":["you@example.com","them@example.com"],"remove":["www.example.com","m.example3.com"]}'

ENDPOINTS