curl --request PATCH \
--url https://api.gcore.com/cdn/aliases/{alias_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"active": false,
"automated": true,
"ssl_id": 891
}
'import requests
url = "https://api.gcore.com/cdn/aliases/{alias_id}"
payload = {
"active": False,
"automated": True,
"ssl_id": 891
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({active: false, automated: true, ssl_id: 891})
};
fetch('https://api.gcore.com/cdn/aliases/{alias_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/cdn/aliases/{alias_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'active' => false,
'automated' => true,
'ssl_id' => 891
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/cdn/aliases/{alias_id}"
payload := strings.NewReader("{\n \"active\": false,\n \"automated\": true,\n \"ssl_id\": 891\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.gcore.com/cdn/aliases/{alias_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"active\": false,\n \"automated\": true,\n \"ssl_id\": 891\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cdn/aliases/{alias_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"active\": false,\n \"automated\": true,\n \"ssl_id\": 891\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"cname": "shop.customer.com",
"resource_id": 4567,
"automated": true,
"ssl_id": 890,
"active": true,
"enabled": true,
"status": "active",
"created": "2026-09-01T10:00:00Z",
"updated": "2026-09-01T10:05:00Z",
"ssl_provisioning": {
"acme_delegation": {
"cname_name": "_acme-challenge.shop.customer.com",
"cname_target": "0a1b2c3d4e5f6789.le-challenges.gcorelabs.com"
}
}
}{
"errors": {
"field_name": [
"Error description."
]
}
}Change alias
Change an alias. The hostname and the CDN resource of an alias cannot be changed; delete the alias and create a new one instead.
Set active to false to stop serving the alias; set it back to true to resume. Resuming an alias
that has no valid certificate starts a new issuance attempt, which is rate-limited, so it cannot be
combined with automated in one request.
For an alias with your own certificate, pass a new certificate ID in ssl_id to replace it. The new
certificate must cover the alias hostname.
Pass automated to switch how the certificate is managed. Switching to your own certificate takes
effect at once and the Let’s Encrypt certificate issued for the alias is removed. Switching to a Let’s
Encrypt certificate starts an issuance attempt while your certificate keeps being served, and the alias
starts serving the new certificate once it is issued; if the attempt fails, status becomes
ssl_error and your certificate keeps being served. The certificate mode cannot be changed while the
alias is paused — resume it first.
curl --request PATCH \
--url https://api.gcore.com/cdn/aliases/{alias_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"active": false,
"automated": true,
"ssl_id": 891
}
'import requests
url = "https://api.gcore.com/cdn/aliases/{alias_id}"
payload = {
"active": False,
"automated": True,
"ssl_id": 891
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({active: false, automated: true, ssl_id: 891})
};
fetch('https://api.gcore.com/cdn/aliases/{alias_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/cdn/aliases/{alias_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'active' => false,
'automated' => true,
'ssl_id' => 891
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/cdn/aliases/{alias_id}"
payload := strings.NewReader("{\n \"active\": false,\n \"automated\": true,\n \"ssl_id\": 891\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.gcore.com/cdn/aliases/{alias_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"active\": false,\n \"automated\": true,\n \"ssl_id\": 891\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cdn/aliases/{alias_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"active\": false,\n \"automated\": true,\n \"ssl_id\": 891\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"cname": "shop.customer.com",
"resource_id": 4567,
"automated": true,
"ssl_id": 890,
"active": true,
"enabled": true,
"status": "active",
"created": "2026-09-01T10:00:00Z",
"updated": "2026-09-01T10:05:00Z",
"ssl_provisioning": {
"acme_delegation": {
"cname_name": "_acme-challenge.shop.customer.com",
"cname_target": "0a1b2c3d4e5f6789.le-challenges.gcorelabs.com"
}
}
}{
"errors": {
"field_name": [
"Error description."
]
}
}Authorizations
API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234_abcdef
Path Parameters
Alias ID.
Body
Whether the alias is enabled.
Possible values:
- true – The alias is enabled and is served once its certificate is ready.
- false – The alias is paused and is not served.
false
How the alias certificate is managed. Change it to switch the alias between a Let's Encrypt certificate and your own. Cannot be changed while the alias is paused.
Possible values:
- true – Switch to a Let's Encrypt certificate.
ssl_idmust be omitted. The current certificate keeps being served until the new one is issued. - false – Switch to your own certificate.
ssl_idis required and is served immediately.
true
ID of your own SSL certificate to serve for the alias instead of the current one. The certificate must
cover the alias hostname; a Let's Encrypt certificate issued for one of your CDN resources cannot be used.
Available for an alias with automated set to false, and together with automated set to false
to switch to your own certificate.
891
Response
Successful.
Alias ID.
123
Alias hostname. Cannot be changed after creation.
"shop.customer.com"
ID of the CDN resource whose settings the alias is served with. Cannot be changed after creation.
4567
How the alias certificate is managed. Can be changed while the alias is served.
Possible values:
- true – A Let's Encrypt certificate is issued and renewed automatically.
- false – The certificate referenced by
ssl_idwas added by you.
true
ID of the SSL certificate served for the alias.
890
Whether you have enabled the alias. Enabling it does not by itself make it live: the alias is served only
while status is active, ssl_issuing or ssl_error.
Possible values:
- true – The alias is enabled and is served once its certificate is ready.
- false – The alias is paused and is not served.
true
Whether the alias is enabled by the system. Follows the state of the CDN resource.
Possible values:
- true – The alias can be served.
- false – The alias is not served because its CDN resource is not active.
true
Alias status.
Possible values:
- pending – The certificate has not been issued yet; the alias is not served.
- active – The alias is served with its certificate.
ssl_issuing– A new certificate is being issued; the current one keeps being served.ssl_error– Certificate issuance failed; a previously issued certificate keeps being served.- inactive – The alias or its CDN resource is disabled; the alias is not served.
pending, active, ssl_issuing, ssl_error, inactive "active"
Date and time when the alias was created (ISO 8601/RFC 3339 format, UTC.)
"2026-09-01T10:00:00Z"
Date and time when the alias was last changed (ISO 8601/RFC 3339 format, UTC.)
"2026-09-01T10:05:00Z"
DNS record delegating Let's Encrypt domain validation for the alias hostname. It is null for an
alias serving a certificate you added yourself, and until a delegation record has been prepared
for the hostname.
Show child attributes
Show child attributes