Create/edit record

  • PATCH
  • /workspaces
  • /:workspace
  • /domains
  • /:domain_id
  • /records
  • /:record_name
  • /:type

Create or edit a record.

Request

REQUIRED SCOPES
WORKSPACE, ZONE_WRITE
URL PARAMETERS
workspacerequired string
The workspace name.
domain_idrequired string
The ID of the domain.
record_namerequired string
The full record name with domain.
typerequired string
The domain record type. Available values: SOA, NS, A, AAAA, CNAME, CAA, SPF, MX, TXT, SRV, NAPTR
POST PARAMETERS
valuesrequired string[]
Data contained in the DNS record.
ttlrequired integer
Time To Live in seconds for the DNS record.
routingstring
Routing strategy for the record. Available values: Simple or Geolocation.
countryobject
Country-specific routing configuration. Only used if routing is set to Geolocation.
continentobject
Continent-specific routing configuration. Only used if routing is set to Geolocation.

Last modified on Oct 13, 2025

Example: Simple

curl -X PATCH "https://api.buddy.works/workspaces/:workspace/domains/:domain_id/records/:record_name/:type" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "values": [
    "192.168.1.100",
    "192.168.1.101"
  ],
  "ttl": 300,
  "routing": "Simple"
}'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/domains/00pvXRgw/records/api.my-domain.com/A", "html_url": "https://app.buddy.works/buddy/-/domain/00pvXRgw", "name": "api", "type": "A", "values": [ "192.168.1.100", "192.168.1.101" ], "ttl": 300, "routing": "Simple" }
STATUS
200 OK
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999

Example: Geolocation

curl -X PATCH "https://api.buddy.works/workspaces/:workspace/domains/:domain_id/records/:record_name/:type" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "values": [
    "203.0.113.10",
    "203.0.113.11"
  ],
  "ttl": 3600,
  "routing": "Geolocation",
  "country": {
    "US": [
      "198.51.100.15",
      "198.51.100.16"
    ]
  },
  "continent": {
    "Europe": [
      "203.0.113.20"
    ]
  }
}'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/domains/00pvXRgw/records/api.my-domain.com/A", "html_url": "https://app.buddy.works/buddy/-/domain/00pvXRgw", "name": "api", "type": "A", "values": [ "203.0.113.10", "203.0.113.11" ], "ttl": 3600, "routing": "Geolocation", "country": { "US": [ "198.51.100.15", "198.51.100.16" ] }, "continent": { "Europe": [ "203.0.113.20" ] } }
STATUS
200 OK
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999

Example: CNAME Record

curl -X PATCH "https://api.buddy.works/workspaces/:workspace/domains/:domain_id/records/:record_name/:type" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "values": [
    "target.example.com"
  ],
  "ttl": 3600,
  "routing": "Simple"
}'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/domains/00pvXRgw/records/docs.my-domain.com/CNAME", "html_url": "https://app.buddy.works/buddy/-/domain/00pvXRgw", "name": "docs", "type": "CNAME", "values": [ "target.example.com" ], "ttl": 3600, "routing": "Simple" }
STATUS
200 OK
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999