Create/edit record
- PATCH
- /workspaces
- /:workspace
- /domains
- /:domain_id
- /records
- /:record_name
- /:type
Create or edit a record.
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" }
STATUS200 OK
LIMITSX-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" ] } }
STATUS200 OK
LIMITSX-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" }
STATUS200 OK
LIMITSX-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999