curl --request PATCH \
--url https://api.gcore.com/cdn/aliases/{alias_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"active": false,
"ssl_id": 891
}
'import requests
url = "https://api.gcore.com/cdn/aliases/{alias_id}"
payload = {
"active": False,
"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, 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,
'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 \"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 \"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 \"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"
}{
"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.
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.
curl --request PATCH \
--url https://api.gcore.com/cdn/aliases/{alias_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"active": false,
"ssl_id": 891
}
'import requests
url = "https://api.gcore.com/cdn/aliases/{alias_id}"
payload = {
"active": False,
"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, 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,
'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 \"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 \"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 \"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"
}{
"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
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 only for aliases with automated set to false.
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.
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"
Was this page helpful?