DNS Records¶
DNS records are managed per site for sites that have managed DNS enabled
(set dns: true on the site first — see Sites). Records are
synchronized to the managed DNS provider automatically.
Endpoints¶
Method |
Path |
Description |
|---|---|---|
|
|
List records |
|
|
Create a record |
|
|
Retrieve a record |
|
|
Update a record |
|
|
Delete a record |
Record fields¶
typeRecord type:
A,AAAA,CNAME,ANAME,MX,TXT, etc.nameRecord name / host (use
@for the zone apex).ttlTime-to-live in seconds (default
3600).priorityPriority for
MXrecords (optional).contentThe record value.
Create a record¶
curl -X POST https://api.skip2.net/v1/sites/1000/dns \
-H "Authorization: Bearer $SKIP2_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type": "A", "name": "www", "ttl": 3600, "content": "203.0.113.10"}'
{
"success": true,
"data": {
"id": 1000, "site_id": 1000, "type": "A", "name": "www",
"ttl": 3600, "priority": null, "content": "203.0.113.10",
"enabled": true, "auto_created": false
}
}
Update a record (partial)¶
Only the supplied fields change; the rest are preserved.
curl -X PATCH https://api.skip2.net/v1/sites/1000/dns/1000 \
-H "Authorization: Bearer $SKIP2_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ttl": 300}'
Auto-created records¶
Some records are created and managed automatically by the platform (for
example for the image proxy or storage custom domains). These are flagged with
auto_created: true and cannot be modified or deleted through the API; such
requests return
HTTP 403.
Delete a record¶
curl -X DELETE https://api.skip2.net/v1/sites/1000/dns/1000 \
-H "Authorization: Bearer $SKIP2_API_KEY"