Import Records
http
POST /dns/{domain}/import
Bulk creates DNS records in one change. A record joins any existing records with the same name and type rather than replacing them. Records that fail our checks are skipped and listed in errors as name (TYPE): reason. The rest are added together: if the DNS server refuses any of them, none are added and errors says why. 201 when at least one record was created, otherwise 422 with the same body.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| records | array | Yes | Array of records (max 500) |
| records.*.name | string | Yes | Record name |
| records.*.type | string | Yes | Record type |
| records.*.content | string | Yes | Record value |
| records.*.ttl | integer | No | TTL in seconds (60-86400). Leave it out to keep an existing name and type’s TTL, or get our default (1 hour) for a new one |
Response (201)
json
{
"message": "Imported 12 records.",
"created": 12,
"errors": []
}