Skip to main content
POST
/
domains
/
{id}
/
zone-records
Typescript (SDK)
import { Crevio } from "@crevio/sdk";

const crevio = new Crevio({
  apiKey: process.env["CREVIO_API_KEY"] ?? "",
});

async function run() {
  const result = await crevio.domains.createZoneRecord({
    id: "<id>",
    requestBody: {
      type: "<value>",
      content: "<value>",
    },
  });

  console.log(result);
}

run();
{
  "id": "<string>",
  "type": "<string>",
  "name": "<string>",
  "value": "<string>",
  "ttl": 123,
  "ownership": "<string>",
  "locked": true,
  "priority": 123,
  "proxied": true,
  "comment": "<string>"
}

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

Path Parameters

id
string
required

The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")

Body

application/json
type
string
required

DNS record type, e.g. A, AAAA, CNAME, TXT, MX.

content
string
required

Record value (IP address, hostname, text, etc.).

name
string

Record name. Defaults to the domain apex when omitted.

ttl
integer

Time to live in seconds. Defaults to 1 (automatic).

priority
integer

Priority, for record types that use it (e.g. MX).

proxied
boolean

Whether to proxy the record through the CDN. Defaults to false.

mode
enum<string>

replace (default) swaps existing records of the same type and name; append adds alongside them.

Available options:
replace,
append
acknowledge_unowned
boolean

Required to replace a record that was not created by Crevio.

Response

The created DNS record

A DNS record in the live zone of a Crevio-registered domain.

object
enum<string>
required
Available options:
dns_record
id
string
required
type
string
required

DNS record type, e.g. A, AAAA, CNAME, TXT, MX.

name
string
required
value
string
required

Record value (IP address, hostname, text, etc.).

ttl
integer
required
ownership
string
required

Whether Crevio created this record (crevio-managed) or it is otherwise unowned.

locked
boolean
required

True for the apex/www routing records that keep the storefront online; these cannot be changed via the zone-records API.

priority
integer | null
proxied
boolean | null
comment
string | null