/services/domains/v1/dns/records/create
Auth
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
domain_id |
integer | Yes | 42 |
|
type |
string
A, AAAA, CNAME, MX, TXT, NS, SRV, PTR, CAA, TLSA, SSHFP, NAPTR, SVCB, HTTPS, ALIAS |
Yes | A |
|
name |
string
max: 255 |
Yes | @ |
|
record_data |
string[] | Yes | Structured record data fields (type-specific, e.g. {"ip":"1.2.3.4"} for A records) | |
ttl |
integer
min: 300 max: 86400 |
No | 3600 |
|
priority |
integer|null | No | 10 |
|
comment |
string|null
max: 500 |
No | Primary mail server |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string | |
data |
mixed[] |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string | |
data |
object | |
data.id |
integer | |
data.domain_id |
integer | |
data.type |
string | |
data.name |
string | |
data.value |
string | |
data.ttl |
integer | |
data.priority |
integer|null | |
data.record_data |
array|null | |
data.comment |
string|null | |
data.provider_record_id |
string|null | |
data.last_synced_at |
string|null (date-time) | |
data.created_at |
string|null (date-time) | |
data.updated_at |
string|null (date-time) | |
data.deleted_at |
string|null (date-time) |
| Field | Type | Description |
|---|---|---|
message |
string | Errors overview. |
errors |
object | A detailed description of each field that failed validation. |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string | |
data |
mixed[] |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 60 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 57 |
Retry-After |
integer | Seconds until the rate limit resets | 60 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string |
curl -X POST "https://api.wemasy.nl/api/services/domains/v1/dns/records/create" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"domain_id": 42,
"type": "A",
"name": "@",
"record_data": [],
"ttl": 3600,
"priority": 10,
"comment": "Primary mail server"
}'
fetch('https://api.wemasy.nl/api/services/domains/v1/dns/records/create', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"domain_id": 42,
"type": "A",
"name": "@",
"record_data": [],
"ttl": 3600,
"priority": 10,
"comment": "Primary mail server"
})})
.then(r => r.json())
.then(data => console.log(data));
$response = Http::withToken('YOUR_API_TOKEN')
->accept('application/json')
->post('https://api.wemasy.nl/api/services/domains/v1/dns/records/create', {
"domain_id": 42,
"type": "A",
"name": "@",
"record_data": [],
"ttl": 3600,
"priority": 10,
"comment": "Primary mail server"
});
$data = $response->json();
import requests
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
data = {
"domain_id": 42,
"type": "A",
"name": "@",
"record_data": [],
"ttl": 3600,
"priority": 10,
"comment": "Primary mail server"
}
r = requests.post("https://api.wemasy.nl/api/services/domains/v1/dns/records/create", headers=headers, json=data)
print(r.json())
{
"error": false,
"message": "string",
"data": {
"id": 0,
"domain_id": 0,
"type": "string",
"name": "string",
"value": "string",
"ttl": 0,
"priority": 0,
"record_data": [],
"comment": "string",
"provider_record_id": "string",
"last_synced_at": "string",
"created_at": "string",
"updated_at": "string",
"deleted_at": "string"
}
}