Skip to content
API reference6dde9f4 · docs(api): domains

Domains

A custom domain is a hostname you own, such as app.example.com, that serves a cube besides its generated address. A cube can have up to 10.

Endpoints

Adding one takes four steps. Add the hostname with an Idempotency-Key. The answer is 201 with the domain in pending_verification, and the DNS records to create at your DNS provider. Create them. Read the domain until its status is active or failed.

Shell
curl -sS -X POST "https://api.cubecen.com/v1/organizations/<org>/projects/<project>/applications/<cube>/domains" \
  -H "Authorization: Bearer $CUBECEN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"hostname": "app.example.com"}'

There are two records in dns_records. The ownership record is a TXT record that proves you control the hostname. The routing record points the hostname at Cubecen: copy its value as it is, because it can differ between domains. An apex domain such as example.com can't have a plain CNAME. Its record then has a note that asks for your DNS provider's CNAME flattening or ALIAS record, or it is a set of A and AAAA records. Each record has ok, which says whether Cubecen has seen it work.

A domain in pending_verification or provisioning moves on its own. Read it every 10 seconds for a minute, then every 30 seconds. After you fix a record, check the domain to ask for a check at once, instead of waiting. A failed domain is no longer checked until you check it yourself. error says what needs your attention.

Adding a hostname claims nothing. Until a domain is verified, other cubes can add the same hostname, and the first one whose ownership record appears gets it.

To take a hostname away, remove the domain. The answer is 202, and usually within a minute the domain is gone. A domain that still uses an older connection has reconnect set; reconnect it to move it to the current one.

List the custom domains of a cube

GET/v1/organizations/{org}/projects/{project}/applications/{cube}/domains
Read-only key

Returns the custom domains of a cube, oldest first. It needs only read access. The list is not paged.

A custom domain is a hostname that you own, such as app.example.com, which serves the cube besides its generated address. Each domain comes with the DNS records that you create at your DNS provider and whether Cubecen has seen them work (dns_records, each with ok), its status, and an error when something needs your attention.

A domain that is pending_verification or provisioning moves on its own. After you add, check or remove a domain, read the list every 10 seconds for a minute, then every 30 seconds, and stop when every domain is active or failed.

Path parameters

NameTypeDescription
orgrequiredstring

The ID or slug of the organization. A key works in one organization. Another organization, by ID or by slug, is refused with 403, and so is a slug that matches no organization. An ID that matches no organization at all is 404.

projectrequiredstring

The ID or slug of the project. A slug is unique within the organization.

cuberequiredstring

The ID or slug of the cube. A slug is unique within the project.

Responses

StatusDescription
200

The custom domains of the cube, oldest first.

DomainList object1 field
dataarray of objectrequired

The domains.

data items12 fields
idstringrequired

The domain's ID.

hostnamestringrequired

The hostname, in lowercase. An international name is in punycode (xn--...).

apexbooleanrequired

true for a registrable domain itself, such as example.com, which cannot have a plain CNAME.

statusstringrequired

pending_verification waits for the ownership record. provisioning is verified, and waits for the routing record, the certificate and the route to the cube. active is served over HTTPS. failed is no longer checked: error says why, and checkDomain starts it over. removing is going away after removeDomain.

One of: pending_verification, provisioning, active, failed, removing

dns_recordsarray of objectrequired

The DNS records to create at your DNS provider, with whether Cubecen has seen each one work.

dns_records items6 fields
purposestringrequired

ownership proves that you control the hostname. routing points the hostname at Cubecen.

One of: ownership, routing

typestringrequired

The record type: TXT, CNAME, A or AAAA.

One of: TXT, CNAME, A, AAAA

namestringrequired

The record's full name.

valuestringrequired

What the record holds. Copy it as it is.

notestring

Advice for this record, such as the CNAME flattening that an apex domain needs.

okboolean | nullrequired

Whether Cubecen has seen the record work. null until it can tell.

certificateobject | nullrequired

The hostname's certificate. null until Cubecen has set the hostname up.

errorobject

Why the domain is not active yet, or has failed.

error object2 fields
codestringrequired

A short code. DNS_NOT_VERIFIED: the ownership record was not found within seven days, and the domain failed. DNS_NOT_POINTED: the routing record does not point at Cubecen yet; after seven days the domain fails. CERTIFICATE_PENDING: the certificate is not issued yet, for example because a CAA record does not allow its issuer. PROVIDER_REFUSED: the hostname was refused or blocked, and the domain failed. ROUTING_REFUSED: Cubecen cannot route the hostname yet, or at all, and then the domain failed. ROUTING_PENDING: the hostname is served and is being routed to the cube, within a minute, or with the cube's next successful deployment when it has none yet. DOMAIN_TAKEN: another cube proved the hostname first, and the domain failed.

One of: DNS_NOT_VERIFIED, DNS_NOT_POINTED, CERTIFICATE_PENDING, PROVIDER_REFUSED, ROUTING_REFUSED, ROUTING_PENDING, DOMAIN_TAKEN

messagestringrequired

What went wrong, in words you can show.

reconnectobject | nullrequired

Set while the domain uses an older connection that stops serving it: see reconnectDomain. null otherwise.

created_atstringrequired

When the domain was added.

checked_atstring | nullrequired

When the domain was last checked. null before the first check.

verified_atstring | nullrequired

When the ownership record was seen. null until then.

activated_atstring | nullrequired

When the domain first served the cube over HTTPS. null until then.

401

The API key is missing, unknown, expired or revoked.

403

The key may not do this. Its access level or its owner's role does not allow it, or the organization is not the key's.

404

Nothing was found at this address. An organization ID that matches no organization is 404, and so is a project, cube or other ID or slug in the path that matches nothing in the organization (or in the project or cube that the path names). An organization slug that matches nothing, and another organization by ID or by slug, is 403, not 404.

429

The key made too many requests. Wait for the number of seconds in Retry-After, then retry.

500

Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the error.requestId.

503

The service is temporarily unavailable. Retry the same request with backoff: wait a little longer after each failed attempt. The error code can differ from the one shown.

Example

Shell
curl -sS "https://api.cubecen.com/v1/organizations/<org>/projects/<project>/applications/<cube>/domains" \
  -H "Authorization: Bearer $CUBECEN_API_KEY"
Response
{
  "data": [
    {
      "id": "6f2d9c41-8a37-4e05-b1d6-3c7a90e5f284",
      "hostname": "www.example.com",
      "apex": false,
      "status": "active",
      "dns_records": [
        {
          "purpose": "ownership",
          "type": "TXT",
          "name": "_cubecen-challenge.www.example.com",
          "value": "cubecen-verify=3f1c9a7e5b2d4c6f8a0b1c2d3e4f5a6b",
          "ok": true
        },
        {
          "purpose": "routing",
          "type": "CNAME",
          "name": "www.example.com",
          "value": "customers.cubecen.com",
          "ok": true
        }
      ],
      "certificate": {
        "status": "active"
      },
      "reconnect": null,
      "created_at": "2026-10-16T12:00:00Z",
      "checked_at": "2026-10-25T09:10:00Z",
      "verified_at": "2026-10-16T12:01:00Z",
      "activated_at": "2026-10-16T12:07:30Z"
    },
    {
      "id": "b3a8e517-2c94-4f60-9d1e-7a5c0f2e8b46",
      "hostname": "app.example.com",
      "apex": false,
      "status": "provisioning",
      "dns_records": [
        {
          "purpose": "ownership",
          "type": "TXT",
          "name": "_cubecen-challenge.app.example.com",
          "value": "cubecen-verify=8d2e4a6c0b1f3e5a7c9d1b3f5e7a9c2d",
          "ok": true
        },
        {
          "purpose": "routing",
          "type": "CNAME",
          "name": "app.example.com",
          "value": "customers.cubecen.com",
          "ok": false
        }
      ],
      "certificate": {
        "status": "pending"
      },
      "error": {
        "code": "DNS_NOT_POINTED",
        "message": "custom hostname does not CNAME to this zone."
      },
      "reconnect": null,
      "created_at": "2026-10-25T08:55:12Z",
      "checked_at": "2026-10-25T09:05:12Z",
      "verified_at": "2026-10-25T09:01:03Z",
      "activated_at": null
    }
  ]
}

Add a custom domain to a cube

POST/v1/organizations/{org}/projects/{project}/applications/{cube}/domains

Adds a hostname that you own to a cube. It needs a key with full access, and an Idempotency-Key header.

Send {"hostname": "app.example.com"}. A pasted URL gives its host. The hostname is stored in lowercase, without a trailing dot, and an international name in punycode (xn--...). A wildcard, an IP address, a name with a port or a path, a public suffix such as co.uk, a name longer than 253 characters and a domain of Cubecen itself are refused with 400. The cube can be active or still being created. A cube that has failed is refused with 409 APPLICATION_NOT_READY.

The answer is 201 with the domain in pending_verification, and the records to create at your DNS provider. The Location header gives the domain's path.

  • The ownership record is a TXT record that proves that you control the hostname. You can delete it once the domain is active.
  • The routing record points the hostname at Cubecen. Copy its value as it is: it can differ between domains. An apex domain (apex is true, such as example.com) cannot have a plain CNAME. Its record then carries a note that asks for your DNS provider's CNAME flattening or ALIAS record, or it is a set of A and AAAA records.

Cubecen checks the ownership record, then the routing record, and issues the certificate. Follow status with getDomain until it is active or failed. After you fix a record, checkDomain asks for a check at once.

Adding a hostname claims nothing. Until a domain is verified, other cubes can add the same hostname, and the first one whose ownership record appears gets it. A cube can have at most 10 custom domains.

Path parameters

NameTypeDescription
orgrequiredstring

The ID or slug of the organization. A key works in one organization. Another organization, by ID or by slug, is refused with 403, and so is a slug that matches no organization. An ID that matches no organization at all is 404.

projectrequiredstring

The ID or slug of the project. A slug is unique within the organization.

cuberequiredstring

The ID or slug of the cube. A slug is unique within the project.

Body

NameTypeDescription
hostnamerequiredstring

The hostname, such as app.example.com. A pasted URL gives its host. It is stored in lowercase, without a trailing dot, and an international name in punycode.

Responses

StatusDescription
201

The domain was added. It waits for its ownership record.

Domain object12 fields
idstringrequired

The domain's ID.

hostnamestringrequired

The hostname, in lowercase. An international name is in punycode (xn--...).

apexbooleanrequired

true for a registrable domain itself, such as example.com, which cannot have a plain CNAME.

statusstringrequired

pending_verification waits for the ownership record. provisioning is verified, and waits for the routing record, the certificate and the route to the cube. active is served over HTTPS. failed is no longer checked: error says why, and checkDomain starts it over. removing is going away after removeDomain.

One of: pending_verification, provisioning, active, failed, removing

dns_recordsarray of objectrequired

The DNS records to create at your DNS provider, with whether Cubecen has seen each one work.

dns_records items6 fields
purposestringrequired

ownership proves that you control the hostname. routing points the hostname at Cubecen.

One of: ownership, routing

typestringrequired

The record type: TXT, CNAME, A or AAAA.

One of: TXT, CNAME, A, AAAA

namestringrequired

The record's full name.

valuestringrequired

What the record holds. Copy it as it is.

notestring

Advice for this record, such as the CNAME flattening that an apex domain needs.

okboolean | nullrequired

Whether Cubecen has seen the record work. null until it can tell.

certificateobject | nullrequired

The hostname's certificate. null until Cubecen has set the hostname up.

errorobject

Why the domain is not active yet, or has failed.

error object2 fields
codestringrequired

A short code. DNS_NOT_VERIFIED: the ownership record was not found within seven days, and the domain failed. DNS_NOT_POINTED: the routing record does not point at Cubecen yet; after seven days the domain fails. CERTIFICATE_PENDING: the certificate is not issued yet, for example because a CAA record does not allow its issuer. PROVIDER_REFUSED: the hostname was refused or blocked, and the domain failed. ROUTING_REFUSED: Cubecen cannot route the hostname yet, or at all, and then the domain failed. ROUTING_PENDING: the hostname is served and is being routed to the cube, within a minute, or with the cube's next successful deployment when it has none yet. DOMAIN_TAKEN: another cube proved the hostname first, and the domain failed.

One of: DNS_NOT_VERIFIED, DNS_NOT_POINTED, CERTIFICATE_PENDING, PROVIDER_REFUSED, ROUTING_REFUSED, ROUTING_PENDING, DOMAIN_TAKEN

messagestringrequired

What went wrong, in words you can show.

reconnectobject | nullrequired

Set while the domain uses an older connection that stops serving it: see reconnectDomain. null otherwise.

created_atstringrequired

When the domain was added.

checked_atstring | nullrequired

When the domain was last checked. null before the first check.

verified_atstring | nullrequired

When the ownership record was seen. null until then.

activated_atstring | nullrequired

When the domain first served the cube over HTTPS. null until then.

400

The request is not valid. error.field names the field to blame, when there is one.

401

The API key is missing, unknown, expired or revoked.

403

The key may not do this. Its access level or its owner's role does not allow it, or the organization is not the key's.

404

Nothing was found at this address. An organization ID that matches no organization is 404, and so is a project, cube or other ID or slug in the path that matches nothing in the organization (or in the project or cube that the path names). An organization slug that matches nothing, and another organization by ID or by slug, is 403, not 404.

409

The request conflicts with the current state of the resource. error.code says how.

413

The request body is larger than 1 MiB.

415

The request body must be JSON. Send Content-Type: application/json.

429

The key made too many requests. Wait for the number of seconds in Retry-After, then retry.

500

Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the error.requestId.

503

The service is temporarily unavailable. Retry the same request with backoff: wait a little longer after each failed attempt. The error code can differ from the one shown.

Example

Shell
curl -sS -X POST "https://api.cubecen.com/v1/organizations/<org>/projects/<project>/applications/<cube>/domains" \
  -H "Authorization: Bearer $CUBECEN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"hostname": "app.example.com"}'
Response
{
  "id": "b3a8e517-2c94-4f60-9d1e-7a5c0f2e8b46",
  "hostname": "app.example.com",
  "apex": false,
  "status": "pending_verification",
  "dns_records": [
    {
      "purpose": "ownership",
      "type": "TXT",
      "name": "_cubecen-challenge.app.example.com",
      "value": "cubecen-verify=8d2e4a6c0b1f3e5a7c9d1b3f5e7a9c2d",
      "ok": false
    },
    {
      "purpose": "routing",
      "type": "CNAME",
      "name": "app.example.com",
      "value": "customers.cubecen.com",
      "ok": null
    }
  ],
  "certificate": null,
  "reconnect": null,
  "created_at": "2026-10-25T08:55:12Z",
  "checked_at": null,
  "verified_at": null,
  "activated_at": null
}

Get a custom domain

GET/v1/organizations/{org}/projects/{project}/applications/{cube}/domains/{domain-id}
Read-only key

Returns one custom domain of a cube, with the DNS records to create, whether Cubecen has seen them work, and its state. It needs only read access.

Use it to follow a domain that you added, checked or reconnected, until status is active or failed. status moves on its own, and checked_at is the time of the last check. error is absent while there is nothing to explain, and its message is safe to show. When status is failed, the domain is no longer checked: checkDomain starts it over.

Once a domain is removed, this request is 404.

Path parameters

NameTypeDescription
orgrequiredstring

The ID or slug of the organization. A key works in one organization. Another organization, by ID or by slug, is refused with 403, and so is a slug that matches no organization. An ID that matches no organization at all is 404.

projectrequiredstring

The ID or slug of the project. A slug is unique within the organization.

cuberequiredstring

The ID or slug of the cube. A slug is unique within the project.

domain-idrequiredstring

The ID of the domain: the id that addDomain gave, or that listDomains shows. A domain of another cube is not found.

Responses

StatusDescription
200

The custom domain.

Domain object12 fields
idstringrequired

The domain's ID.

hostnamestringrequired

The hostname, in lowercase. An international name is in punycode (xn--...).

apexbooleanrequired

true for a registrable domain itself, such as example.com, which cannot have a plain CNAME.

statusstringrequired

pending_verification waits for the ownership record. provisioning is verified, and waits for the routing record, the certificate and the route to the cube. active is served over HTTPS. failed is no longer checked: error says why, and checkDomain starts it over. removing is going away after removeDomain.

One of: pending_verification, provisioning, active, failed, removing

dns_recordsarray of objectrequired

The DNS records to create at your DNS provider, with whether Cubecen has seen each one work.

dns_records items6 fields
purposestringrequired

ownership proves that you control the hostname. routing points the hostname at Cubecen.

One of: ownership, routing

typestringrequired

The record type: TXT, CNAME, A or AAAA.

One of: TXT, CNAME, A, AAAA

namestringrequired

The record's full name.

valuestringrequired

What the record holds. Copy it as it is.

notestring

Advice for this record, such as the CNAME flattening that an apex domain needs.

okboolean | nullrequired

Whether Cubecen has seen the record work. null until it can tell.

certificateobject | nullrequired

The hostname's certificate. null until Cubecen has set the hostname up.

errorobject

Why the domain is not active yet, or has failed.

error object2 fields
codestringrequired

A short code. DNS_NOT_VERIFIED: the ownership record was not found within seven days, and the domain failed. DNS_NOT_POINTED: the routing record does not point at Cubecen yet; after seven days the domain fails. CERTIFICATE_PENDING: the certificate is not issued yet, for example because a CAA record does not allow its issuer. PROVIDER_REFUSED: the hostname was refused or blocked, and the domain failed. ROUTING_REFUSED: Cubecen cannot route the hostname yet, or at all, and then the domain failed. ROUTING_PENDING: the hostname is served and is being routed to the cube, within a minute, or with the cube's next successful deployment when it has none yet. DOMAIN_TAKEN: another cube proved the hostname first, and the domain failed.

One of: DNS_NOT_VERIFIED, DNS_NOT_POINTED, CERTIFICATE_PENDING, PROVIDER_REFUSED, ROUTING_REFUSED, ROUTING_PENDING, DOMAIN_TAKEN

messagestringrequired

What went wrong, in words you can show.

reconnectobject | nullrequired

Set while the domain uses an older connection that stops serving it: see reconnectDomain. null otherwise.

created_atstringrequired

When the domain was added.

checked_atstring | nullrequired

When the domain was last checked. null before the first check.

verified_atstring | nullrequired

When the ownership record was seen. null until then.

activated_atstring | nullrequired

When the domain first served the cube over HTTPS. null until then.

400

The request is not valid. error.field names the field to blame, when there is one.

401

The API key is missing, unknown, expired or revoked.

403

The key may not do this. Its access level or its owner's role does not allow it, or the organization is not the key's.

404

Nothing was found at this address. An organization ID that matches no organization is 404, and so is a project, cube or other ID or slug in the path that matches nothing in the organization (or in the project or cube that the path names). An organization slug that matches nothing, and another organization by ID or by slug, is 403, not 404.

429

The key made too many requests. Wait for the number of seconds in Retry-After, then retry.

500

Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the error.requestId.

503

The service is temporarily unavailable. Retry the same request with backoff: wait a little longer after each failed attempt. The error code can differ from the one shown.

Example

Shell
curl -sS "https://api.cubecen.com/v1/organizations/<org>/projects/<project>/applications/<cube>/domains/<domain-id>" \
  -H "Authorization: Bearer $CUBECEN_API_KEY"
Response
{
  "id": "b3a8e517-2c94-4f60-9d1e-7a5c0f2e8b46",
  "hostname": "app.example.com",
  "apex": false,
  "status": "provisioning",
  "dns_records": [
    {
      "purpose": "ownership",
      "type": "TXT",
      "name": "_cubecen-challenge.app.example.com",
      "value": "cubecen-verify=8d2e4a6c0b1f3e5a7c9d1b3f5e7a9c2d",
      "ok": true
    },
    {
      "purpose": "routing",
      "type": "CNAME",
      "name": "app.example.com",
      "value": "customers.cubecen.com",
      "ok": false
    }
  ],
  "certificate": {
    "status": "pending"
  },
  "error": {
    "code": "DNS_NOT_POINTED",
    "message": "custom hostname does not CNAME to this zone."
  },
  "reconnect": null,
  "created_at": "2026-10-25T08:55:12Z",
  "checked_at": "2026-10-25T09:05:12Z",
  "verified_at": "2026-10-25T09:01:03Z",
  "activated_at": null
}

Remove a custom domain from a cube

DELETE/v1/organizations/{org}/projects/{project}/applications/{cube}/domains/{domain-id}

Starts removing a custom domain from a cube. It needs a key with full access.

The answer is 202 with the domain, which is now removing. Usually within a minute, Cubecen stops serving the hostname and stops routing it to the cube. Then getDomain answers 404 and the hostname is free. Repeating the request while the domain is still being removed answers 202 again. After the removal you can delete the DNS records. Deleting a cube removes its domains too.

Path parameters

NameTypeDescription
orgrequiredstring

The ID or slug of the organization. A key works in one organization. Another organization, by ID or by slug, is refused with 403, and so is a slug that matches no organization. An ID that matches no organization at all is 404.

projectrequiredstring

The ID or slug of the project. A slug is unique within the organization.

cuberequiredstring

The ID or slug of the cube. A slug is unique within the project.

domain-idrequiredstring

The ID of the domain: the id that addDomain gave, or that listDomains shows. A domain of another cube is not found.

Responses

StatusDescription
202

The domain is being removed. getDomain answers 404 once it is gone.

Domain object12 fields
idstringrequired

The domain's ID.

hostnamestringrequired

The hostname, in lowercase. An international name is in punycode (xn--...).

apexbooleanrequired

true for a registrable domain itself, such as example.com, which cannot have a plain CNAME.

statusstringrequired

pending_verification waits for the ownership record. provisioning is verified, and waits for the routing record, the certificate and the route to the cube. active is served over HTTPS. failed is no longer checked: error says why, and checkDomain starts it over. removing is going away after removeDomain.

One of: pending_verification, provisioning, active, failed, removing

dns_recordsarray of objectrequired

The DNS records to create at your DNS provider, with whether Cubecen has seen each one work.

dns_records items6 fields
purposestringrequired

ownership proves that you control the hostname. routing points the hostname at Cubecen.

One of: ownership, routing

typestringrequired

The record type: TXT, CNAME, A or AAAA.

One of: TXT, CNAME, A, AAAA

namestringrequired

The record's full name.

valuestringrequired

What the record holds. Copy it as it is.

notestring

Advice for this record, such as the CNAME flattening that an apex domain needs.

okboolean | nullrequired

Whether Cubecen has seen the record work. null until it can tell.

certificateobject | nullrequired

The hostname's certificate. null until Cubecen has set the hostname up.

errorobject

Why the domain is not active yet, or has failed.

error object2 fields
codestringrequired

A short code. DNS_NOT_VERIFIED: the ownership record was not found within seven days, and the domain failed. DNS_NOT_POINTED: the routing record does not point at Cubecen yet; after seven days the domain fails. CERTIFICATE_PENDING: the certificate is not issued yet, for example because a CAA record does not allow its issuer. PROVIDER_REFUSED: the hostname was refused or blocked, and the domain failed. ROUTING_REFUSED: Cubecen cannot route the hostname yet, or at all, and then the domain failed. ROUTING_PENDING: the hostname is served and is being routed to the cube, within a minute, or with the cube's next successful deployment when it has none yet. DOMAIN_TAKEN: another cube proved the hostname first, and the domain failed.

One of: DNS_NOT_VERIFIED, DNS_NOT_POINTED, CERTIFICATE_PENDING, PROVIDER_REFUSED, ROUTING_REFUSED, ROUTING_PENDING, DOMAIN_TAKEN

messagestringrequired

What went wrong, in words you can show.

reconnectobject | nullrequired

Set while the domain uses an older connection that stops serving it: see reconnectDomain. null otherwise.

created_atstringrequired

When the domain was added.

checked_atstring | nullrequired

When the domain was last checked. null before the first check.

verified_atstring | nullrequired

When the ownership record was seen. null until then.

activated_atstring | nullrequired

When the domain first served the cube over HTTPS. null until then.

400

The request is not valid. error.field names the field to blame, when there is one.

401

The API key is missing, unknown, expired or revoked.

403

The key may not do this. Its access level or its owner's role does not allow it, or the organization is not the key's.

404

Nothing was found at this address. An organization ID that matches no organization is 404, and so is a project, cube or other ID or slug in the path that matches nothing in the organization (or in the project or cube that the path names). An organization slug that matches nothing, and another organization by ID or by slug, is 403, not 404.

429

The key made too many requests. Wait for the number of seconds in Retry-After, then retry.

500

Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the error.requestId.

503

The service is temporarily unavailable. Retry the same request with backoff: wait a little longer after each failed attempt. The error code can differ from the one shown.

Example

Shell
curl -sS -X DELETE "https://api.cubecen.com/v1/organizations/<org>/projects/<project>/applications/<cube>/domains/<domain-id>" \
  -H "Authorization: Bearer $CUBECEN_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response
{
  "id": "b3a8e517-2c94-4f60-9d1e-7a5c0f2e8b46",
  "hostname": "app.example.com",
  "apex": false,
  "status": "removing",
  "dns_records": [
    {
      "purpose": "ownership",
      "type": "TXT",
      "name": "_cubecen-challenge.app.example.com",
      "value": "cubecen-verify=8d2e4a6c0b1f3e5a7c9d1b3f5e7a9c2d",
      "ok": true
    },
    {
      "purpose": "routing",
      "type": "CNAME",
      "name": "app.example.com",
      "value": "customers.cubecen.com",
      "ok": true
    }
  ],
  "certificate": {
    "status": "active"
  },
  "reconnect": null,
  "created_at": "2026-10-16T12:00:00Z",
  "checked_at": "2026-10-25T09:10:00Z",
  "verified_at": "2026-10-16T12:01:00Z",
  "activated_at": "2026-10-16T12:07:30Z"
}

Check a custom domain now

POST/v1/organizations/{org}/projects/{project}/applications/{cube}/domains/{domain-id}/check

Asks for a custom domain to be checked now. Use it after you created or fixed a DNS record, instead of waiting for the next check. It needs a key with full access.

The answer is 202 with the domain as it is: Cubecen looks at it within seconds. Read it with getDomain for the outcome. A failed domain starts over, as pending_verification or, once its ownership is verified, as provisioning. A domain that was checked in the last 10 seconds, or that is being removed, is answered as it is.

Path parameters

NameTypeDescription
orgrequiredstring

The ID or slug of the organization. A key works in one organization. Another organization, by ID or by slug, is refused with 403, and so is a slug that matches no organization. An ID that matches no organization at all is 404.

projectrequiredstring

The ID or slug of the project. A slug is unique within the organization.

cuberequiredstring

The ID or slug of the cube. A slug is unique within the project.

domain-idrequiredstring

The ID of the domain: the id that addDomain gave, or that listDomains shows. A domain of another cube is not found.

Responses

StatusDescription
202

The domain as it is. It is checked within seconds.

Domain object12 fields
idstringrequired

The domain's ID.

hostnamestringrequired

The hostname, in lowercase. An international name is in punycode (xn--...).

apexbooleanrequired

true for a registrable domain itself, such as example.com, which cannot have a plain CNAME.

statusstringrequired

pending_verification waits for the ownership record. provisioning is verified, and waits for the routing record, the certificate and the route to the cube. active is served over HTTPS. failed is no longer checked: error says why, and checkDomain starts it over. removing is going away after removeDomain.

One of: pending_verification, provisioning, active, failed, removing

dns_recordsarray of objectrequired

The DNS records to create at your DNS provider, with whether Cubecen has seen each one work.

dns_records items6 fields
purposestringrequired

ownership proves that you control the hostname. routing points the hostname at Cubecen.

One of: ownership, routing

typestringrequired

The record type: TXT, CNAME, A or AAAA.

One of: TXT, CNAME, A, AAAA

namestringrequired

The record's full name.

valuestringrequired

What the record holds. Copy it as it is.

notestring

Advice for this record, such as the CNAME flattening that an apex domain needs.

okboolean | nullrequired

Whether Cubecen has seen the record work. null until it can tell.

certificateobject | nullrequired

The hostname's certificate. null until Cubecen has set the hostname up.

errorobject

Why the domain is not active yet, or has failed.

error object2 fields
codestringrequired

A short code. DNS_NOT_VERIFIED: the ownership record was not found within seven days, and the domain failed. DNS_NOT_POINTED: the routing record does not point at Cubecen yet; after seven days the domain fails. CERTIFICATE_PENDING: the certificate is not issued yet, for example because a CAA record does not allow its issuer. PROVIDER_REFUSED: the hostname was refused or blocked, and the domain failed. ROUTING_REFUSED: Cubecen cannot route the hostname yet, or at all, and then the domain failed. ROUTING_PENDING: the hostname is served and is being routed to the cube, within a minute, or with the cube's next successful deployment when it has none yet. DOMAIN_TAKEN: another cube proved the hostname first, and the domain failed.

One of: DNS_NOT_VERIFIED, DNS_NOT_POINTED, CERTIFICATE_PENDING, PROVIDER_REFUSED, ROUTING_REFUSED, ROUTING_PENDING, DOMAIN_TAKEN

messagestringrequired

What went wrong, in words you can show.

reconnectobject | nullrequired

Set while the domain uses an older connection that stops serving it: see reconnectDomain. null otherwise.

created_atstringrequired

When the domain was added.

checked_atstring | nullrequired

When the domain was last checked. null before the first check.

verified_atstring | nullrequired

When the ownership record was seen. null until then.

activated_atstring | nullrequired

When the domain first served the cube over HTTPS. null until then.

400

The request is not valid. error.field names the field to blame, when there is one.

401

The API key is missing, unknown, expired or revoked.

403

The key may not do this. Its access level or its owner's role does not allow it, or the organization is not the key's.

404

Nothing was found at this address. An organization ID that matches no organization is 404, and so is a project, cube or other ID or slug in the path that matches nothing in the organization (or in the project or cube that the path names). An organization slug that matches nothing, and another organization by ID or by slug, is 403, not 404.

429

The key made too many requests. Wait for the number of seconds in Retry-After, then retry.

500

Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the error.requestId.

503

The service is temporarily unavailable. Retry the same request with backoff: wait a little longer after each failed attempt. The error code can differ from the one shown.

Example

Shell
curl -sS -X POST "https://api.cubecen.com/v1/organizations/<org>/projects/<project>/applications/<cube>/domains/<domain-id>/check" \
  -H "Authorization: Bearer $CUBECEN_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response
{
  "id": "b3a8e517-2c94-4f60-9d1e-7a5c0f2e8b46",
  "hostname": "app.example.com",
  "apex": false,
  "status": "provisioning",
  "dns_records": [
    {
      "purpose": "ownership",
      "type": "TXT",
      "name": "_cubecen-challenge.app.example.com",
      "value": "cubecen-verify=8d2e4a6c0b1f3e5a7c9d1b3f5e7a9c2d",
      "ok": true
    },
    {
      "purpose": "routing",
      "type": "CNAME",
      "name": "app.example.com",
      "value": "customers.cubecen.com",
      "ok": false
    }
  ],
  "certificate": {
    "status": "pending"
  },
  "error": {
    "code": "DNS_NOT_POINTED",
    "message": "custom hostname does not CNAME to this zone."
  },
  "reconnect": null,
  "created_at": "2026-10-25T08:55:12Z",
  "checked_at": "2026-10-25T09:05:12Z",
  "verified_at": "2026-10-25T09:01:03Z",
  "activated_at": null
}

Move a custom domain to the current connection

POST/v1/organizations/{org}/projects/{project}/applications/{cube}/domains/{domain-id}/reconnect

Moves a domain that uses an older connection to the current one. Such a domain has reconnect set, with by, the date after which the older connection stops serving it, which is null until a date is set. It needs a key with full access. There is no body.

The answer is 202 with the domain. An active domain stays active and keeps serving over the older connection meanwhile. Its routing record now shows the new target: point your DNS record at it, then call checkDomain. While the certificate is issued, error can say DNS_NOT_POINTED or CERTIFICATE_PENDING. Once the new connection works, the older one is removed and reconnect becomes null. A domain that is not active moves at once and starts over on the new connection. Its ownership stays proven: no new TXT record is needed.

Asking again while the move is going on changes nothing. A domain that already uses the current connection, or that is being removed, is refused with 409 CONFLICT.

Path parameters

NameTypeDescription
orgrequiredstring

The ID or slug of the organization. A key works in one organization. Another organization, by ID or by slug, is refused with 403, and so is a slug that matches no organization. An ID that matches no organization at all is 404.

projectrequiredstring

The ID or slug of the project. A slug is unique within the organization.

cuberequiredstring

The ID or slug of the cube. A slug is unique within the project.

domain-idrequiredstring

The ID of the domain: the id that addDomain gave, or that listDomains shows. A domain of another cube is not found.

Responses

StatusDescription
202

The domain, now moving to the current connection.

Domain object12 fields
idstringrequired

The domain's ID.

hostnamestringrequired

The hostname, in lowercase. An international name is in punycode (xn--...).

apexbooleanrequired

true for a registrable domain itself, such as example.com, which cannot have a plain CNAME.

statusstringrequired

pending_verification waits for the ownership record. provisioning is verified, and waits for the routing record, the certificate and the route to the cube. active is served over HTTPS. failed is no longer checked: error says why, and checkDomain starts it over. removing is going away after removeDomain.

One of: pending_verification, provisioning, active, failed, removing

dns_recordsarray of objectrequired

The DNS records to create at your DNS provider, with whether Cubecen has seen each one work.

dns_records items6 fields
purposestringrequired

ownership proves that you control the hostname. routing points the hostname at Cubecen.

One of: ownership, routing

typestringrequired

The record type: TXT, CNAME, A or AAAA.

One of: TXT, CNAME, A, AAAA

namestringrequired

The record's full name.

valuestringrequired

What the record holds. Copy it as it is.

notestring

Advice for this record, such as the CNAME flattening that an apex domain needs.

okboolean | nullrequired

Whether Cubecen has seen the record work. null until it can tell.

certificateobject | nullrequired

The hostname's certificate. null until Cubecen has set the hostname up.

errorobject

Why the domain is not active yet, or has failed.

error object2 fields
codestringrequired

A short code. DNS_NOT_VERIFIED: the ownership record was not found within seven days, and the domain failed. DNS_NOT_POINTED: the routing record does not point at Cubecen yet; after seven days the domain fails. CERTIFICATE_PENDING: the certificate is not issued yet, for example because a CAA record does not allow its issuer. PROVIDER_REFUSED: the hostname was refused or blocked, and the domain failed. ROUTING_REFUSED: Cubecen cannot route the hostname yet, or at all, and then the domain failed. ROUTING_PENDING: the hostname is served and is being routed to the cube, within a minute, or with the cube's next successful deployment when it has none yet. DOMAIN_TAKEN: another cube proved the hostname first, and the domain failed.

One of: DNS_NOT_VERIFIED, DNS_NOT_POINTED, CERTIFICATE_PENDING, PROVIDER_REFUSED, ROUTING_REFUSED, ROUTING_PENDING, DOMAIN_TAKEN

messagestringrequired

What went wrong, in words you can show.

reconnectobject | nullrequired

Set while the domain uses an older connection that stops serving it: see reconnectDomain. null otherwise.

created_atstringrequired

When the domain was added.

checked_atstring | nullrequired

When the domain was last checked. null before the first check.

verified_atstring | nullrequired

When the ownership record was seen. null until then.

activated_atstring | nullrequired

When the domain first served the cube over HTTPS. null until then.

400

The request is not valid. error.field names the field to blame, when there is one.

401

The API key is missing, unknown, expired or revoked.

403

The key may not do this. Its access level or its owner's role does not allow it, or the organization is not the key's.

404

Nothing was found at this address. An organization ID that matches no organization is 404, and so is a project, cube or other ID or slug in the path that matches nothing in the organization (or in the project or cube that the path names). An organization slug that matches nothing, and another organization by ID or by slug, is 403, not 404.

409

The request conflicts with the current state of the resource. error.code says how.

429

The key made too many requests. Wait for the number of seconds in Retry-After, then retry.

500

Something went wrong on our side. Retry the request with backoff. If it keeps failing, give support the error.requestId.

503

The service is temporarily unavailable. Retry the same request with backoff: wait a little longer after each failed attempt. The error code can differ from the one shown.

Example

Shell
curl -sS -X POST "https://api.cubecen.com/v1/organizations/<org>/projects/<project>/applications/<cube>/domains/<domain-id>/reconnect" \
  -H "Authorization: Bearer $CUBECEN_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response
{
  "id": "6f2d9c41-8a37-4e05-b1d6-3c7a90e5f284",
  "hostname": "www.example.com",
  "apex": false,
  "status": "active",
  "dns_records": [
    {
      "purpose": "ownership",
      "type": "TXT",
      "name": "_cubecen-challenge.www.example.com",
      "value": "cubecen-verify=3f1c9a7e5b2d4c6f8a0b1c2d3e4f5a6b",
      "ok": true
    },
    {
      "purpose": "routing",
      "type": "CNAME",
      "name": "www.example.com",
      "value": "customers.cubecen.com",
      "ok": null
    }
  ],
  "certificate": {
    "status": "active"
  },
  "reconnect": {
    "by": "2026-11-20T00:00:00Z",
    "started_at": "2026-10-25T13:02:44Z"
  },
  "created_at": "2026-10-16T12:00:00Z",
  "checked_at": "2026-10-25T09:10:00Z",
  "verified_at": "2026-10-16T12:01:00Z",
  "activated_at": "2026-10-16T12:07:30Z"
}