Crea record DNS
Aggiungi un nuovo record DNS per un dominio specifico
Content-Type
application/json
categoria
dns
azione
create_record
Parametri della richiesta
| Nome del parametro | Tipo | Descrizione | Esempio |
|---|---|---|---|
| domain | Stringa (3-60) | Nome di dominio | example.com |
| type | String | Tipo di record DNS (A, MX, CNAME, TXT, ecc.) | A |
| host | String | Nome host per il record DNS | www |
| value | String | Valore del record DNS | 192.168.1.1 |
| pri | Intero (opzionale) | Valore di priorità (usato per record MX e SRV) | 20 |
Parametri di risposta
| Nome del parametro | Tipo | Descrizione |
|---|---|---|
| id | Intero | ID del record DNS |
| type | String | Tipo di record DNS (A, MX, CNAME, TXT, ecc.) |
| host | String | Nome host |
| value | String | Valore del record DNS |
| ttl | Intero | Tempo di vita in secondi |
| pri | Intero | Priorità (per record MX) |
Esempio di richiesta
{
curl https://api.nicenic.net/v2/?category=dns&action=create_record&domain={domain}&type={type}&host={host}&value={value}&pri={pri}
-H "Authorization: username:api_secret"
-H "Content-Type: application/json"
}
Risultato della risposta
0 OK Risposta riuscita
{
"code": 0,
"msg" : "success",
"data" : {
{
"id": 12345,
"type": "A",
"host": "@",
"value": "192.168.1.1",
"ttl": 3600,
"pri": 0
}
}
}
400 Richiesta non valida
{
"code": 400,
"msg" : "Request parameter error",
}






