Create/edit record

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

Create or edit a record.

Request

REQUIRED SCOPES
ZONE_WRITE
URL PARAMETERS
workspacerequiredstring
The workspace name.
domain_idrequiredstring
The ID of the domain.
record_namerequiredstring
The full record name with domain.
typerequiredstring
The domain record type. Available values: SOA, NS, A, AAAA, CNAME, CAA, SPF, MX, TXT, SRV, NAPTR
POST PARAMETERS
valuesrequiredstring[]
Data contained in the DNS record.
ttlrequiredinteger
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 Jan 19, 2026

Request examples

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" }'
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" ] } }'
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" }'

Response examples

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" }
Geolocation
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" ] } }
CNAME Record
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" }