Domain Registration API
POST /services/domains/v1/dns/records/create Auth

Create DNS Record

Request Body Required

FieldTypeRequiredDescriptionExample
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

Responses

500
200
422
404
401
403
429
Internal server error
Headers
HeaderTypeDescriptionExample
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
FieldTypeDescription
error boolean
message string
data mixed[]
Successful response
Headers
HeaderTypeDescriptionExample
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
FieldTypeDescription
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)
Validation error
FieldTypeDescription
message string Errors overview.
errors object A detailed description of each field that failed validation.
Resource not found
Headers
HeaderTypeDescriptionExample
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
FieldTypeDescription
error boolean
message string
data mixed[]
Unauthenticated — missing or invalid Bearer token
Headers
HeaderTypeDescriptionExample
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
FieldTypeDescription
error boolean
message string
Forbidden — insufficient permissions for this resource
Headers
HeaderTypeDescriptionExample
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
FieldTypeDescription
error boolean
message string
Too Many Requests — rate limit exceeded
Headers
HeaderTypeDescriptionExample
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
FieldTypeDescription
error boolean
message string
Base URL
https://api.wemasy.nl/api
Authentication

Request Sample
cURL
JS
PHP
Python
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())
Response Example
{
    "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"
    }
}

Try It
Request Body Required

Export