Add New Record
Create a new DNS record for a registered domain. This endpoint supports various record types including A, AAAA, CNAME, MX, TXT, SRV, CAA, and NAPTR.
Endpoint
POSThttps://api.alinflow.com/v1/domain/records/add
Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer <token> | Yes |
Content-Type | application/json | Yes |
Body Parameters
Common parameters required for all record types:
| Parameter | Type | Required | Description |
|---|---|---|---|
domainName | string | Yes | The root domain name (e.g., example.com). |
name | string | Yes | The record name/host. Use @ for root or sub for subdomains. |
type | string | Yes | Record type (A, AAAA, CNAME, MX, TXT, SRV, CAA, NAPTR). |
value | string | Yes | The content/target of the record (e.g., IP address or hostname). |
ttl | integer | No | Time to Live in seconds. Default is 300. |
Type-specific parameters:
| Parameter | Type | Applies To | Description |
|---|---|---|---|
priority | integer | MX, SRV | Priority value (0-65535). |
weight | integer | SRV | Relative weight for records with same priority. |
port | integer | SRV | TCP/UDP port number. |
flags | integer | CAA, NAPTR | Issuer critical flag (0-255) or NAPTR flags (e.g., "s"). |
tag | string | CAA | Property tag (issue, issuewild, iodef). |
order | integer | NAPTR | Processing order. |
preference | integer | NAPTR | Order preference. |
service | string | NAPTR | Service parameter (e.g., "SIP+D2U"). |
regexp | string | NAPTR | Substitution expression. |
replacement | string | NAPTR | Next domain name to query. |
Example Requests
1. Standard A Record
curl -X POST "https://api.alinflow.com/v1/domain/records/add" \
-H "Authorization: Bearer <YOUR_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"domainName": "example.com",
"name": "blog",
"type": "A",
"value": "192.0.2.123",
"ttl": 3600
}'2. MX Record
curl -X POST "https://api.alinflow.com/v1/domain/records/add" \
-H "Authorization: Bearer <YOUR_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"domainName": "example.com",
"name": "@",
"type": "MX",
"value": "mail.example.com",
"priority": 10
}'Success Response
{
"success": true,
"message": "Record added successfully",
"data": {
"name": "blog.example.com",
"type": "A",
"content": "192.0.2.123",
"ttl": 3600
}
}