Create/edit
- PATCH
- /workspaces
- /:workspace
- /domains
- /:domain_id
- /records
- /:record_name
- /:type
Create or update record
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" }
STATUS200 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" }
STATUS200 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" ] } }
STATUS200 Record updated successfully