Create/edit

View as Markdown
  • PATCH
  • /workspaces
  • /:workspace
  • /domains
  • /:domain_id
  • /records
  • /:record_name
  • /:type

Create or update record

Request

REQUIRED SCOPES
DOMAIN_WRITE
URL PARAMETERS
workspacerequiredstring
The human-readable ID of the workspace

Example: "my-company"

domain_idrequiredstring
The ID of the domain

Example: "4krmDRPw"

record_namerequiredstring
The full record name with domain

Example: "api.example.com"

typerequiredstring enum
The record type
Allowed enum:
SOA,
NS,
A,
AAAA,
CNAME,
ALIAS,
CAA,
SPF,
MX,
TXT,
SRV,
NAPTR,
PTR

Example: "A"

BODY PARAMETERS
valuesrequiredstring[]
New values to set for the DNS record
ttlrequiredinteger
New TTL value for the DNS record in seconds
routingstring enum
Routing strategy: Simple (uses only values field) or Geolocation (uses country/continent fields, values field is used as default/fallback). Matched case-insensitively
Allowed enum:
Simple,
Geolocation
countryobject
Country-specific routing values (only used when routing is Geolocation). Keys are ISO 3166-1 alpha-2 country codes
continentobject
Continent-specific routing values (only used when routing is Geolocation). Available values: Africa, Antarctica, Asia, Europe, NorthAmerica, Oceania, SouthAmerica
notestring
Note for this resource
agent_notestring
YAML note for AI agents operating on this resource

Response

RESPONSE BODY
typestring enum
The record type
Allowed enum:
SOA,
NS,
A,
AAAA,
CNAME,
ALIAS,
CAA,
SPF,
MX,
TXT,
SRV,
NAPTR,
PTR
urlread-onlystring
API endpoint to GET this object
html_urlread-onlystring
Web URL to view this object in Buddy.works
namestring
The record name (subdomain or @ for root)
valuesstring[]
ttlinteger
Time To Live in seconds for the DNS record
routingstring
Routing strategy for the record (Simple or Geolocation)
countryobject
Country-specific routing configuration for geolocation records (only used when routing is Geolocation). Keys are ISO 3166-1 alpha-2 country codes
continentobject
Continent-specific routing configuration for geolocation records (only used when routing is Geolocation). Available values: Africa, Antarctica, Asia, Europe, NorthAmerica, Oceania, SouthAmerica
notestring
Note for this resource
agent_notestring
YAML note for AI agents operating on this resource

Last modified on Apr 22, 2026

Examples

Example: Upsert A 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": [
    "192.168.1.100",
    "192.168.1.101"
  ],
  "ttl": 300,
  "routing": "simple"
}'
EXAMPLE RESPONSE
{
  "url": "https://api.buddy.works/workspaces/my-company/domains/4krmDRPw/records/example.com./A",
  "html_url": "https://app.buddy.works/my-company/-/domain/4krmDRPw",
  "name": "@",
  "type": "A",
  "values": [
    "192.168.1.100",
    "192.168.1.101"
  ],
  "ttl": 300,
  "routing": "simple"
}
STATUS
200 Record updated successfully

Example: Upsert 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/my-company/domains/4krmDRPw/records/blog.example.com./CNAME",
  "html_url": "https://app.buddy.works/my-company/-/domain/4krmDRPw",
  "name": "blog",
  "type": "CNAME",
  "values": [
    "target.example.com."
  ],
  "ttl": 3600,
  "routing": "simple"
}
STATUS
200 Record updated successfully

Example: Upsert Geolocation 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": [
    "192.168.1.100"
  ],
  "ttl": 300,
  "routing": "geolocation",
  "country": {
    "US": [
      "192.168.1.101",
      "192.168.1.102"
    ],
    "DE": [
      "192.168.1.103",
      "192.168.1.104"
    ],
    "JP": [
      "192.168.1.105"
    ]
  },
  "continent": {
    "Europe": [
      "192.168.1.110",
      "192.168.1.111"
    ],
    "NorthAmerica": [
      "192.168.1.112",
      "192.168.1.113"
    ],
    "Asia": [
      "192.168.1.114"
    ]
  }
}'
EXAMPLE RESPONSE
{
  "url": "https://api.buddy.works/workspaces/my-company/domains/4krmDRPw/records/api.example.com./A",
  "html_url": "https://app.buddy.works/my-company/-/domain/4krmDRPw",
  "name": "api",
  "type": "A",
  "values": [
    "192.168.1.100"
  ],
  "ttl": 300,
  "routing": "geolocation",
  "country": {
    "US": [
      "192.168.1.101",
      "192.168.1.102"
    ],
    "DE": [
      "192.168.1.103",
      "192.168.1.104"
    ],
    "JP": [
      "192.168.1.105"
    ]
  },
  "continent": {
    "Europe": [
      "192.168.1.110",
      "192.168.1.111"
    ],
    "NorthAmerica": [
      "192.168.1.112",
      "192.168.1.113"
    ],
    "Asia": [
      "192.168.1.114"
    ]
  }
}
STATUS
200 Record updated successfully