For AI agents: markdown of this page — /docs-content-en/infra/domain/get.md documentation index — /llms.txt

Get the domain

GET /v1/infra/servers/:id/domain

Returns the domain attached to the server. Use the call both to re-read the DNS records and to wait for the certificate after verification.

Who can make the call — Access. The purpose of the records and the difference between host and name — DNS records.

Parameters

Parameter In Type Required Description
Parameterid Inpath Typestring (UUID) Requiredyes DescriptionServer ID. Source — the id field from the server list

Examples

curl — personal key

Terminal
curl -H "X-Api-Key: YOUR_API_KEY" \
  https://vibecode.bitrix24.com/v1/infra/servers/SERVER_ID/domain

curl — OAuth application

Terminal
curl -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  https://vibecode.bitrix24.com/v1/infra/servers/SERVER_ID/domain

JavaScript — personal key

javascript
const res = await fetch(
  `https://vibecode.bitrix24.com/v1/infra/servers/${serverId}/domain`,
  { headers: { 'X-Api-Key': 'YOUR_API_KEY' } }
)
const body = await res.json()
if (res.status === 404 && body.error.code === 'NO_DOMAIN') {
  console.log('No domain is attached to the server')
} else {
  const { domain } = body.data
  console.log(`${domain.fqdn}: ${domain.status}, certificate: ${domain.certIssued}`)
}

JavaScript — OAuth application

javascript
const res = await fetch(
  `https://vibecode.bitrix24.com/v1/infra/servers/${serverId}/domain`,
  {
    headers: {
      'X-Api-Key': 'YOUR_APP_KEY',
      'Authorization': 'Bearer USER_SESSION_TOKEN',
    },
  }
)

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata.domain.id Typestring (UUID) DescriptionDomain attachment ID
Fielddata.domain.fqdn Typestring DescriptionThe attached name in lowercase
Fielddata.domain.isApex Typeboolean Descriptiontrue — the zone's apex domain, false — a subdomain
Fielddata.domain.status Typestring DescriptionDomain status. Values — Domain statuses
Fielddata.domain.source Typestring DescriptionDomain origin. "BYO" — the domain is yours and you connected it
Fielddata.domain.dnsMode Typestring DescriptionWho manages the DNS records. "USER_DNS" — you, at your DNS provider
Fielddata.domain.verifiedAt Typestring (ISO 8601) | null DescriptionTime of the successful verification after which the domain became ACTIVE. null until a verification succeeds
Fielddata.domain.lastVerifiedAt Typestring (ISO 8601) | null DescriptionTime of the last record verification, including a failed one. null until a verification has been run
Fielddata.domain.createdAt Typestring (ISO 8601) DescriptionTime of attachment
Fielddata.domain.certIssued Typeboolean DescriptionWhether the certificate for https has been issued. Always false outside the ACTIVE status
Fielddata.instructions Typearray DescriptionThe domain's DNS records — the same ones the attach call returned. An empty array if the Bitrix24 account's region no longer supports custom domains
Fielddata.instructions[].type Typestring DescriptionRecord type: "TXT", "CNAME" or "A"
Fielddata.instructions[].host Typestring DescriptionFull record name
Fielddata.instructions[].zone Typestring DescriptionThe zone the record is created in
Fielddata.instructions[].name Typestring DescriptionRecord name relative to zone — enter it in the "name" field of the DNS provider's panel. For the zone itself — "@"
Fielddata.instructions[].value Typestring DescriptionRecord value

Response example

The domain has passed verification; the certificate has not been issued yet:

JSON
{
  "success": true,
  "data": {
    "domain": {
      "id": "bea9db66-411b-432e-a365-283a74f5714f",
      "fqdn": "app.example.com",
      "isApex": false,
      "status": "ACTIVE",
      "source": "BYO",
      "dnsMode": "USER_DNS",
      "verifiedAt": "2026-10-05T12:53:02.655Z",
      "lastVerifiedAt": "2026-10-05T12:53:02.653Z",
      "createdAt": "2026-10-05T12:53:02.616Z",
      "certIssued": false
    },
    "instructions": [
      {
        "type": "TXT",
        "host": "_vibecode-challenge.app.example.com",
        "zone": "example.com",
        "name": "_vibecode-challenge.app",
        "value": "vibe-verify=f36ac31f213d1e3630c75f000b6631f5"
      },
      {
        "type": "CNAME",
        "host": "app.example.com",
        "zone": "example.com",
        "name": "app",
        "value": "lb.bitrix24.site"
      }
    ]
  }
}

Error response example

404 — the server is found, but no domain is attached to it:

JSON
{
  "success": false,
  "error": {
    "code": "NO_DOMAIN",
    "message": "No domain attached"
  }
}

Errors

HTTP Code Description
HTTP404 CodeNO_DOMAIN DescriptionThe calling key manages the server, but no domain is attached to the server
HTTP404 CodeSERVER_NOT_FOUND DescriptionNo server with this id exists, or it is managed by a key other than the one making the call
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header is missing
HTTP401 CodeINVALID_API_KEY DescriptionThe key is not recognized: no such string exists on the platform
HTTP429 CodeRATE_LIMITED DescriptionExceeded the limit of 60 requests per minute on this endpoint. The exact value arrives in the x-ratelimit-limit header (the cap is divided across replicas)
HTTP503 Codeuser_self_deletion_pending DescriptionThe key owner requested deletion of their account on the portal. Access is restored once the deletion is cancelled

Full list of common API errors — Errors.

Known specifics

  • The read itself checks the certificate. While the domain is in the ACTIVE status and certIssued is false, every call opens a probe TLS connection to the domain name and therefore responds up to 4 seconds slower. Once the certificate is found, certIssued becomes true, and subsequent reads run without this delay.
  • The certificate is awaited again after recovery. A domain that returns to ACTIVE through a repeated verification from the FAILED or SUSPENDED status does not get certIssued: true immediately: the previous flag is reset, and the read waits for the certificate once more.
  • The records are needed after activation too. The platform periodically re-checks both records of an active domain, so do not delete them at the DNS provider after the domain moves to ACTIVE.

See also