Skip to main content
Contents

Custom domains and certificates

Custom domains of a resource, domain validation files and certificates.

Literal response from the frozen contract

GET/api/v1/resources/{resource}/custom_domains

List custom domains

Returns the custom domains of the resource.

Authentication
HTTP Basic with the user API key
Host
https://api.cdnify.lat, https://reseller.cdnify.lat
In CDNify
Same behaviour as before
Rate limited
Yes
API v2 equivalent

Parameters

Parameters v1ListCustomDomains
NameInTypeRequiredRules
resourcePathstringYes
  • Pattern: ^[a-z0-9]{7}$

Responses

  • 200OKapplication/json

    Headers: X-RateLimit-Limit: 1000, X-RateLimit-Remaining: 999, X-RateLimit-Reset: 1768474800

    Fields (12)
    Responses v1ListCustomDomains 200
    FieldTypeRequiredRules
    domainsarray<object>Yes
    domains[].hostnamestringYes
    domains[].sslstringYes
    • One of: custom, shared
    domains[].created_atstringYes
    domains[].valid_tooneOfYes
    domains[].valid_to.#1anyNo
    • Can be null
    domains[].valid_to.#2objectNo
    domains[].valid_to.#2.datestringYes
    domains[].valid_to.#2.timezone_typeintegerYes
    domains[].valid_to.#2.timezonestringYes
    domains[].refstringYes
    • Can be null
    domains[].certificate_validation_pendingbooleanYes
    • Can be null
    Example
    {
      "domains": [
        {
          "hostname": "cdn.example.com",
          "ssl": "shared",
          "created_at": "2026-01-15T10:05:00+00:00",
          "valid_to": null,
          "ref": null,
          "certificate_validation_pending": false
        },
        {
          "hostname": "static.example.com",
          "ssl": "custom",
          "created_at": "2026-01-16T09:00:00+00:00",
          "valid_to": {
            "date": "2027-01-16 00:00:00",
            "timezone_type": 3,
            "timezone": "UTC"
          },
          "ref": "co-synthetic01",
          "certificate_validation_pending": false
        }
      ]
    }
  • 401Unauthorized

    Headers: WWW-Authenticate: Basic realm="Secured Area"

  • 404Not foundapplication/json

    Fields (3)
    Responses v1ListCustomDomains 404
    FieldTypeRequiredRules
    errorsarray<object>Yes
    • At least 1 items
    errors[].codeintegerYes
    errors[].messagestringYes
    Example
    {
      "errors": [
        {
          "code": 404,
          "message": "HTTP: Failed to find resource"
        }
      ]
    }
  • 429Too many requeststext/plain

    Example
    You have reached the rate limit
curl
curl 'https://api.cdnify.lat/api/v1/resources/a1b2c3d/custom_domains' \
  -u "$CDNIFY_API_KEY:x"
POST/api/v1/resources/{resource}/custom_domains

Add a custom domain

Adds a custom domain to the resource, optionally with your own certificate and private key.

Authentication
HTTP Basic with the user API key
Host
https://api.cdnify.lat, https://reseller.cdnify.lat
In CDNify
Same behaviour as before
Rate limited
Yes
API v2 equivalent

Parameters

Parameters v1CreateCustomDomain
NameInTypeRequiredRules
resourcePathstringYes
  • Pattern: ^[a-z0-9]{7}$

Request body

Content types: application/x-www-form-urlencoded, application/json

Request body v1CreateCustomDomain
FieldTypeRequiredRules
hostnamestringYes
certificatesobjectNo
certificates.privateKeystringYes
certificates.certificatestringYes
Example
{
  "hostname": "cdn.example.com"
}

Responses

  • 200OKapplication/json

    Headers: X-RateLimit-Limit: 1000, X-RateLimit-Remaining: 999, X-RateLimit-Reset: 1768474800

    Fields (1)
    Responses v1CreateCustomDomain 200
    FieldTypeRequiredRules
    messagestringYes
    Example
    {
      "message": "This custom domain is already in use."
    }
  • 201Createdapplication/json

    Headers: X-RateLimit-Limit: 1000, X-RateLimit-Remaining: 999, X-RateLimit-Reset: 1768474800

    Fields (2)
    Responses v1CreateCustomDomain 201
    FieldTypeRequiredRules
    messagestringYes
    idintegerYes
    Example
    {
      "message": "Successfully added custom domain. To make it work, edit your DNS record for this domain and create a CNAME record pointing to example.a.cdnify.io",
      "id": 1234
    }
  • 400Bad requestapplication/json

    Fields (3)
    Responses v1CreateCustomDomain 400
    FieldTypeRequiredRules
    errorsobjectYes
    errors.codeintegerNo
    errors.messagestringYes
    Example
    {
      "errors": {
        "message": "certificates must be an array"
      }
    }
  • 401Unauthorized

    Headers: WWW-Authenticate: Basic realm="Secured Area"

  • 404Not foundapplication/json

    Fields (3)
    Responses v1CreateCustomDomain 404
    FieldTypeRequiredRules
    errorsarray<object>Yes
    • At least 1 items
    errors[].codeintegerYes
    errors[].messagestringYes
    Example
    {
      "errors": [
        {
          "code": 404,
          "message": "HTTP: Failed to find resource"
        }
      ]
    }
  • 422Unprocessable contentapplication/json

    Fields (1)
    Responses v1CreateCustomDomain 422
    FieldTypeRequiredRules
    messagestringYes
    Example: missing_hostname
    {
      "message": "The required option \"hostname\" is  missing."
    }
    Example: cert_expired
    {
      "message": "This certificate is out of date"
    }
    Example: cert_invalid
    {
      "message": "Not a valid certificate"
    }
    Example: cert_key_mismatch
    {
      "message": "The certificate and key do not match or the private key contains a passphrase"
    }
    Example: cert_wrong_cn
    {
      "message": "This certificate is not linked to this domain. This is the certificate for other.example.com"
    }
  • 429Too many requeststext/plain

    Example
    You have reached the rate limit
curl
curl -X POST 'https://api.cdnify.lat/api/v1/resources/a1b2c3d/custom_domains' \
  -u "$CDNIFY_API_KEY:x" \
  --data-urlencode 'hostname=cdn.example.com'
DELETE/api/v1/resources/{resource}/custom_domains/{hostname}

Remove a custom domain

Removes a custom domain from the resource.

Authentication
HTTP Basic with the user API key
Host
https://api.cdnify.lat, https://reseller.cdnify.lat
In CDNify
Same contract, with a defect corrected
Rate limited
Yes
API v2 equivalent

Parameters

Parameters v1DeleteCustomDomain
NameInTypeRequiredRules
resourcePathstringYes
  • Pattern: ^[a-z0-9]{7}$
hostnamePathstringYes

Responses

  • 204No content

    Headers: X-RateLimit-Limit: 1000, X-RateLimit-Remaining: 999, X-RateLimit-Reset: 1768474800

  • 401Unauthorized

    Headers: WWW-Authenticate: Basic realm="Secured Area"

  • 404Not foundapplication/json

    Fields (8)
    Responses v1DeleteCustomDomain 404
    FieldTypeRequiredRules
    #1objectNo
    #1.errorsarray<object>Yes
    • At least 1 items
    #1.errors[].codeintegerYes
    #1.errors[].messagestringYes
    #2objectNo
    #2.errorsobjectYes
    #2.errors.codeintegerNo
    #2.errors.messagestringYes
    Example: domain
    {
      "errors": {
        "message": "Custom domain cdn.example.com does not exist"
      }
    }
    Example: resource
    {
      "errors": [
        {
          "code": 404,
          "message": "HTTP: Failed to find resource"
        }
      ]
    }
  • 429Too many requeststext/plain

    Example
    You have reached the rate limit
  • 500Internal server errortext/html

curl
curl -X DELETE 'https://api.cdnify.lat/api/v1/resources/a1b2c3d/custom_domains/cdn.example.com' \
  -u "$CDNIFY_API_KEY:x"
POST/api/v1/resources/{resource}/custom_domains/{hostname}/certificate-domain-validation

Publish a domain validation file

Publishes on the edge the HTTP file that proves control of the domain for a certificate signing request (CSR) of your own.

Authentication
HTTP Basic with the user API key
Host
https://api.cdnify.lat, https://reseller.cdnify.lat
In CDNify
Same contract, with a defect corrected
Rate limited
Yes
API v2 equivalent

Parameters

Parameters v1CreateCdv
NameInTypeRequiredRules
resourcePathstringYes
  • Pattern: ^[a-z0-9]{7}$
hostnamePathstringYes

Request body

Content types: application/x-www-form-urlencoded, application/json

Request body v1CreateCdv
FieldTypeRequiredRules
csrstringYes
Example
{
  "csr": "-----BEGIN CERTIFICATE REQUEST-----\nSYNTHETIC\n-----END CERTIFICATE REQUEST-----"
}

Responses

  • 201Createdapplication/json

    Headers: X-RateLimit-Limit: 1000, X-RateLimit-Remaining: 999, X-RateLimit-Reset: 1768474800

    Fields (5)
    Responses v1CreateCdv 201
    FieldTypeRequiredRules
    successobjectYes
    success.messagestringYes
    success.md5stringNo
    • Pattern: ^[0-9A-F]{32}$
    success.sha256stringNo
    • Pattern: ^[0-9A-F]{64}$
    success.unique_tokenstringNo
    • Pattern: ^[0-9a-f]{20}$
    Example
    {
      "success": {
        "message": "The Certificate Domain Validation procedure has run successfully.",
        "md5": "0123456789ABCDEF0123456789ABCDEF",
        "sha256": "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
        "unique_token": "0a1b2c3d4e5f6a7b8c9d"
      }
    }
  • 400Bad requestapplication/json

    Fields (8)
    Responses v1CreateCdv 400
    FieldTypeRequiredRules
    #1objectNo
    #1.messagestringYes
    #2objectNo
    #2.errorobjectYes
    #2.error.messagestringYes
    #2.error.md5stringNo
    • Pattern: ^[0-9A-F]{32}$
    #2.error.sha256stringNo
    • Pattern: ^[0-9A-F]{64}$
    #2.error.unique_tokenstringNo
    • Pattern: ^[0-9a-f]{20}$
    Example: missing_csr
    {
      "message": "The required option \"csr\" is  missing."
    }
    Example: not_pointing
    {
      "error": {
        "message": "hostname does not point to CDNify.com or does not belong to the specific resource"
      }
    }
    Example: pop_failure
    {
      "error": {
        "message": "Errors have been encountered during the Certificate Domain Validation procedure. Please provide the following code to our support team (support@cdnify.com):  c3ludGhldGljLWNvZGU=",
        "md5": "0123456789ABCDEF0123456789ABCDEF",
        "sha256": "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
        "unique_token": "0a1b2c3d4e5f6a7b8c9d"
      }
    }
  • 401Unauthorized

    Headers: WWW-Authenticate: Basic realm="Secured Area"

  • 404Not foundapplication/json

    Fields (3)
    Responses v1CreateCdv 404
    FieldTypeRequiredRules
    errorsarray<object>Yes
    • At least 1 items
    errors[].codeintegerYes
    errors[].messagestringYes
    Example
    {
      "errors": [
        {
          "code": 404,
          "message": "HTTP: Failed to find resource"
        }
      ]
    }
  • 429Too many requeststext/plain

    Example
    You have reached the rate limit
curl
curl -X POST 'https://api.cdnify.lat/api/v1/resources/a1b2c3d/custom_domains/cdn.example.com/certificate-domain-validation' \
  -u "$CDNIFY_API_KEY:x" \
  --data-urlencode 'csr=-----BEGIN CERTIFICATE REQUEST-----
SYNTHETIC
-----END CERTIFICATE REQUEST-----'
POST/api/v1/resources/{resource}/custom_domains/{hostname}/certificate-domain-validation2

Publish a domain validation file (second variant)

Second variant of the previous route, kept for compatibility.

Authentication
HTTP Basic with the user API key
Host
https://api.cdnify.lat, https://reseller.cdnify.lat
In CDNify
Same contract, with a defect corrected
Rate limited
Yes
API v2 equivalent

Parameters

Parameters v1CreateCdv2
NameInTypeRequiredRules
resourcePathstringYes
  • Pattern: ^[a-z0-9]{7}$
hostnamePathstringYes

Request body

Content types: application/x-www-form-urlencoded, application/json

Request body v1CreateCdv2
FieldTypeRequiredRules
csrstringYes
Example
{
  "csr": "-----BEGIN CERTIFICATE REQUEST-----\nSYNTHETIC\n-----END CERTIFICATE REQUEST-----"
}

Responses

  • 201Createdapplication/json

    Headers: X-RateLimit-Limit: 1000, X-RateLimit-Remaining: 999, X-RateLimit-Reset: 1768474800

    Fields (5)
    Responses v1CreateCdv2 201
    FieldTypeRequiredRules
    successobjectYes
    success.messagestringYes
    success.md5stringNo
    • Pattern: ^[0-9A-F]{32}$
    success.sha256stringNo
    • Pattern: ^[0-9A-F]{64}$
    success.unique_tokenstringNo
    • Pattern: ^[0-9a-f]{20}$
    Example
    {
      "success": {
        "message": "The Certificate Domain Validation procedure has run successfully.",
        "md5": "0123456789ABCDEF0123456789ABCDEF",
        "sha256": "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
        "unique_token": "0a1b2c3d4e5f6a7b8c9d"
      }
    }
  • 400Bad requestapplication/json

    Fields (8)
    Responses v1CreateCdv2 400
    FieldTypeRequiredRules
    #1objectNo
    #1.messagestringYes
    #2objectNo
    #2.errorobjectYes
    #2.error.messagestringYes
    #2.error.md5stringNo
    • Pattern: ^[0-9A-F]{32}$
    #2.error.sha256stringNo
    • Pattern: ^[0-9A-F]{64}$
    #2.error.unique_tokenstringNo
    • Pattern: ^[0-9a-f]{20}$
    Example: missing_csr
    {
      "message": "The required option \"csr\" is  missing."
    }
    Example: not_pointing
    {
      "error": {
        "message": "hostname does not point to CDNify.com or does not belong to the specific resource"
      }
    }
    Example: pop_failure
    {
      "error": {
        "message": "Errors have been encountered during the Certificate Domain Validation procedure. Please provide the following code to our support team (support@cdnify.com):  c3ludGhldGljLWNvZGU=",
        "md5": "0123456789ABCDEF0123456789ABCDEF",
        "sha256": "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
        "unique_token": "0a1b2c3d4e5f6a7b8c9d"
      }
    }
  • 401Unauthorized

    Headers: WWW-Authenticate: Basic realm="Secured Area"

  • 404Not foundapplication/json

    Fields (3)
    Responses v1CreateCdv2 404
    FieldTypeRequiredRules
    errorsarray<object>Yes
    • At least 1 items
    errors[].codeintegerYes
    errors[].messagestringYes
    Example
    {
      "errors": [
        {
          "code": 404,
          "message": "HTTP: Failed to find resource"
        }
      ]
    }
  • 429Too many requeststext/plain

    Example
    You have reached the rate limit
curl
curl -X POST 'https://api.cdnify.lat/api/v1/resources/a1b2c3d/custom_domains/cdn.example.com/certificate-domain-validation2' \
  -u "$CDNIFY_API_KEY:x" \
  --data-urlencode 'csr=-----BEGIN CERTIFICATE REQUEST-----
SYNTHETIC
-----END CERTIFICATE REQUEST-----'
DELETE/api/v1/resources/{resource}/custom_domains/{hostname}/certificate-domain-validation/{md5}

Remove a domain validation file

Removes the validation file from the edge.

Authentication
HTTP Basic with the user API key
Host
https://api.cdnify.lat, https://reseller.cdnify.lat
In CDNify
Same contract, with a defect corrected
Rate limited
Yes
API v2 equivalent
No API v2 equivalent

Parameters

Parameters v1DeleteCdv
NameInTypeRequiredRules
resourcePathstringYes
  • Pattern: ^[a-z0-9]{7}$
hostnamePathstringYes
md5PathstringYes
  • Pattern: ^[0-9A-F]{32}$

Responses

  • 204No content

    Headers: X-RateLimit-Limit: 1000, X-RateLimit-Remaining: 999, X-RateLimit-Reset: 1768474800

  • 400Bad requestapplication/json

    Fields (5)
    Responses v1DeleteCdv 400
    FieldTypeRequiredRules
    errorobjectYes
    error.messagestringYes
    error.md5stringNo
    • Pattern: ^[0-9A-F]{32}$
    error.sha256stringNo
    • Pattern: ^[0-9A-F]{64}$
    error.unique_tokenstringNo
    • Pattern: ^[0-9a-f]{20}$
    Example: not_pointing
    {
      "error": {
        "message": "hostname does not point to CDNify.com or does not belong to the specific resource"
      }
    }
    Example: pop_failure
    {
      "error": {
        "message": "Errors have been encountered during the Certificate Domain Validation procedure. Please provide the following code to our support team (support@cdnify.com): c3ludGhldGljLWNvZGU="
      }
    }
  • 401Unauthorized

    Headers: WWW-Authenticate: Basic realm="Secured Area"

  • 404Not foundapplication/json

    Fields (3)
    Responses v1DeleteCdv 404
    FieldTypeRequiredRules
    errorsarray<object>Yes
    • At least 1 items
    errors[].codeintegerYes
    errors[].messagestringYes
    Example
    {
      "errors": [
        {
          "code": 404,
          "message": "HTTP: Failed to find resource"
        }
      ]
    }
  • 429Too many requeststext/plain

    Example
    You have reached the rate limit
curl
curl -X DELETE 'https://api.cdnify.lat/api/v1/resources/a1b2c3d/custom_domains/cdn.example.com/certificate-domain-validation/0123456789ABCDEF0123456789ABCDEF' \
  -u "$CDNIFY_API_KEY:x"
POST/api/v1/resources/{resource}/ssl_certificate/{hostname}

Request a free certificate

Asks for a certificate for a custom domain of the resource.

Automatic issuance through this route is not available by default: after the domain checks it answers 503. Use the managed certificates of the API v2.

Authentication
HTTP Basic with the user API key
Host
https://api.cdnify.lat, https://reseller.cdnify.lat
In CDNify
Behaviour changed for safety or pending a decision
Rate limited
Yes
API v2 equivalent

Parameters

Parameters v1RequestFreeCertificate
NameInTypeRequiredRules
resourcePathstringYes
  • Pattern: ^[a-z0-9]{7}$
hostnamePathstringYes

Request body

Content types: application/x-www-form-urlencoded, application/json

Request body v1RequestFreeCertificate
FieldTypeRequiredRules
is_testboolean | string | integerNo
Example
{}

Responses

  • 200OKapplication/json

    Headers: X-RateLimit-Limit: 1000, X-RateLimit-Remaining: 999, X-RateLimit-Reset: 1768474800

    Fields (2)
    Responses v1RequestFreeCertificate 200
    FieldTypeRequiredRules
    md5stringYes
    messageobject | array | stringYes
    • Can be null
    Example
    {
      "md5": "0123456789ABCDEF0123456789ABCDEF",
      "message": {
        "ref": "co-synthetic01",
        "order_status": "validating"
      }
    }
  • 400Bad requestapplication/json

    Fields (5)
    Responses v1RequestFreeCertificate 400
    FieldTypeRequiredRules
    errorobjectYes
    error.messagestringYes
    error.md5stringNo
    • Pattern: ^[0-9A-F]{32}$
    error.sha256stringNo
    • Pattern: ^[0-9A-F]{64}$
    error.unique_tokenstringNo
    • Pattern: ^[0-9a-f]{20}$
    Example: not_pointing
    {
      "error": {
        "message": "hostname does not point to CDNify.com or does not belong to the specific resource"
      }
    }
  • 401Unauthorized

    Headers: WWW-Authenticate: Basic realm="Secured Area"

  • 404Not foundapplication/json

    Fields (10)
    Responses v1RequestFreeCertificate 404
    FieldTypeRequiredRules
    #1objectNo
    #1.errorsarray<object>Yes
    • At least 1 items
    #1.errors[].codeintegerYes
    #1.errors[].messagestringYes
    #2objectNo
    #2.errorobjectYes
    #2.error.messagestringYes
    #2.error.md5stringNo
    • Pattern: ^[0-9A-F]{32}$
    #2.error.sha256stringNo
    • Pattern: ^[0-9A-F]{64}$
    #2.error.unique_tokenstringNo
    • Pattern: ^[0-9a-f]{20}$
    Example: domain
    {
      "error": {
        "message": "Invalid custom domain"
      }
    }
    Example: resource
    {
      "errors": [
        {
          "code": 404,
          "message": "HTTP: Failed to find resource"
        }
      ]
    }
  • 429Too many requeststext/plain

    Example
    You have reached the rate limit
curl
curl -X POST 'https://api.cdnify.lat/api/v1/resources/a1b2c3d/ssl_certificate/cdn.example.com' \
  -u "$CDNIFY_API_KEY:x"
PUT/api/v1/resources/{resource}/ssl_certificate/{hostname}

Install or replace a certificate

Installs or replaces your own certificate and private key on a custom domain.

Authentication
HTTP Basic with the user API key
Host
https://api.cdnify.lat, https://reseller.cdnify.lat
In CDNify
Same contract, with a defect corrected
Rate limited
Yes
API v2 equivalent

Parameters

Parameters v1ChangeCertificate
NameInTypeRequiredRules
resourcePathstringYes
  • Pattern: ^[a-z0-9]{7}$
hostnamePathstringYes

Request body

Content types: application/x-www-form-urlencoded, application/json

Request body v1ChangeCertificate
FieldTypeRequiredRules
privateKeystringYes
certificatestringYes
Example
{
  "privateKey": "-----BEGIN PRIVATE KEY-----\nSYNTHETIC\n-----END PRIVATE KEY-----",
  "certificate": "-----BEGIN CERTIFICATE-----\nSYNTHETIC\n-----END CERTIFICATE-----"
}

Responses

  • 200OKapplication/json

    Headers: X-RateLimit-Limit: 1000, X-RateLimit-Remaining: 999, X-RateLimit-Reset: 1768474800

    Fields (2)
    Responses v1ChangeCertificate 200
    FieldTypeRequiredRules
    messagestringYes
    validTostringYes
    • Pattern: ^\d{4}-\d{2}-\d{2}$
    Example
    {
      "message": "SSL certificate changed for domain cdn.example.com",
      "validTo": "2027-01-15"
    }
  • 401Unauthorized

    Headers: WWW-Authenticate: Basic realm="Secured Area"

  • 404Not foundapplication/json

    Fields (12)
    Responses v1ChangeCertificate 404
    FieldTypeRequiredRules
    #1objectNo
    #1.errorsarray<object>Yes
    • At least 1 items
    #1.errors[].codeintegerYes
    #1.errors[].messagestringYes
    #2objectNo
    #2.errorobjectYes
    #2.error.messagestringYes
    #2.error.md5stringNo
    • Pattern: ^[0-9A-F]{32}$
    #2.error.sha256stringNo
    • Pattern: ^[0-9A-F]{64}$
    #2.error.unique_tokenstringNo
    • Pattern: ^[0-9a-f]{20}$
    #3objectNo
    #3.messagestringYes
    Example: domain
    {
      "error": {
        "message": "Invalid custom domain"
      }
    }
    Example: resource
    {
      "errors": [
        {
          "code": 404,
          "message": "HTTP: Failed to find resource"
        }
      ]
    }
    Example: cert_invalid
    {
      "message": "Not a valid certificate"
    }
    Example: cert_key_mismatch
    {
      "message": "The certificate and key do not match or the private key contains a passphrase"
    }
  • 429Too many requeststext/plain

    Example
    You have reached the rate limit
curl
curl -X PUT 'https://api.cdnify.lat/api/v1/resources/a1b2c3d/ssl_certificate/cdn.example.com' \
  -u "$CDNIFY_API_KEY:x" \
  --data-urlencode 'privateKey=-----BEGIN PRIVATE KEY-----
SYNTHETIC
-----END PRIVATE KEY-----' \
  --data-urlencode 'certificate=-----BEGIN CERTIFICATE-----
SYNTHETIC
-----END CERTIFICATE-----'