Skip to main content

Set Nameserver

Set nameserver

Endpoint: /api/reseller/domain/update-nameserver

Method: POST

Request Parameters

Parameters

Type

Description

username

string


api_key

string


domain

string


name_servers

array


testmode

string (on, off)


Response Parameters

Parameters

Type

Description

success

boolean (true, false)


message

string


errors

array

It will only be returned if success is false

data

array

It will only be returned when success is true

Example Request

{
  "username" : "test@navicosoft.com",
  "api_key" : "^H^HHGTG******)((",
  "domain" : "domain.com",
  "testmode": "on",
  "name_servers": [
    "ns1.navicosoft.com",
    "ns2.navicosoft.com"
    ]
}

Example Response

Success

If is true then the domain information is available and if it is false then it is domain information not found

{
  "success": true,
  "message": "Domain info fetched",
  "data": {
    "id": 1,
    "client_id": 1,
    "type": "register",
    "registration_date": "2024-10-03",
    "expiry_date": "2025-10-03",
    "domain": "domain.com",
    "roid": null,
    "sld": null,
    "tld": null,
    "domain_id": null,
    "registrar": "Navicosoft",
    "period": null,
    "status": "Active",
    "auto_renew": 1,
    "next_due_date": "2025-10-03",
    "additional_notes": null,
    "domain_password": null,
    "first_amount": "20.00",
    "recurring_amount": "20.00",
    "nameservers": ["ns1.navicosoft.com","ns2.navicosoft.com"],
    "domain_statuses": ["clientTransferProhibited"],
    "created_at": "2024-10-03T09:50:16.000000Z",
    "updated_at": "2024-10-22T10:07:20.000000Z",
    "deletion_date": null,
    "deleted_at": null,
    "id_protection": "0",
    "epp_status": "test",
    "theft_protection": "0",
    "encrypted_id": null,
    "data": {
      "mailsend": [
        {
          "date": "2024-10-03"
        }
      ],
      "notes": "First note\\r\\nsecond comment\\r\\nthird comment",
      "verified": {
        "date": "2024-10-22",
        "verified_by": "Domain contact verified by qamar.navicosoft@gmail.com"
      }
    },
    "raw_mail": "1",
    "suspended_by": null,
    "client": {
      "id": 1,
      "reseller_id": 3,
      "customer_id": "34",
      "first_name": "Navicosoft",
      "last_name": "Customer",
      "company_name": "Navicosoft",
      "email": "customer@navicosoft.com",
      "address_1": "Lahore",
      "address_2": "",
      "city": "85655",
      "state": "Punjab",
      "zip_code": "64200",
      "country_code": "Pakistan",
      "phone_number": "+923000000000",
      "selling_currency": null,
      "meta_data": null,
      "status": "active",
      "created_at": "2024-10-03T09:49:22.000000Z",
      "updated_at": "2024-10-03T09:49:22.000000Z",
      "user_id": 34,
      "data": null,
      "deleted_at": null,
      "subscribe": "0"
    },
    "domain_contacts": [
      {
        "id": 1,
        "domain_id": 1,
        "contact_id": "NAV*******",
        "first_name": "Navicosoft",
        "last_name": "Customer",
        "company_name": "Navicosoft",
        "email": "customer@navicosoft.com",
        "address_1": "Lahore",
        "address_2": "",
        "city": "Lahore",
        "state": "Punjab",
        "zip_code": "64200",
        "country_code": "Pakistan",
        "phone_number": "+923000000000",
        "type": "tech",
        "created_at": "2024-10-03T09:50:16.000000Z",
        "updated_at": "2024-10-03T09:50:27.000000Z",
        "deleted_at": null,
        "editRequest": "0",
        "encrypted_domain_id": null
      },
      {
        "id": 2,
        "domain_id": 1,
        "contact_id": "NAV********",
        "first_name": "Navicosoft",
        "last_name": "Customer",
        "company_name": "Navicosoft",
        "email": "customer@navicosoft.com",
        "address_1": "Lahore",
        "address_2": "",
        "city": "Lahore",
        "state": "Punjab",
        "zip_code": "64200",
        "country_code": "Pakistan",
        "phone_number": "+923000000000",
        "type": "billing",
        "created_at": "2024-10-03T09:50:16.000000Z",
        "updated_at": "2024-10-03T09:50:16.000000Z",
        "deleted_at": null,
        "editRequest": "0",
        "encrypted_domain_id": null
      },
      {
        "id": 3,
        "domain_id": 1,
        "contact_id": "NAV********",
        "first_name": "Navicosoft",
        "last_name": "Customer",
        "company_name": "Navicosoft",
        "email": "customer@navicosoft.com",
        "address_1": "Lahore",
        "address_2": "",
        "city": "Lahore",
        "state": "Punjab",
        "zip_code": "64200",
        "country_code": "Pakistan",
        "phone_number": "+92300000000",
        "type": "admin",
        "created_at": "2024-10-03T09:50:16.000000Z",
        "updated_at": "2024-10-03T09:50:16.000000Z",
        "deleted_at": null,
        "editRequest": "0",
        "encrypted_domain_id": null
      },
      {
        "id": 4,
        "domain_id": 1,
        "contact_id": "NAV********",
        "first_name": "Navicosoft",
        "last_name": "Customer",
        "company_name": "Navicosoft",
        "email": "customernavicosoft.com",
        "address_1": "Lahore",
        "address_2": "",
        "city": "Lahore",
        "state": "Punjab",
        "zip_code": "64200",
        "country_code": "Pakistan",
        "phone_number": "+923000000000",
        "type": "registrant",
        "created_at": "2024-10-03T09:50:16.000000Z",
        "updated_at": "2024-10-03T09:50:16.000000Z",
        "deleted_at": null,
        "editRequest": "0",
        "encrypted_domain_id": null
      }
    ]
  }
}

Response code 200

Errors

{
  "success": false,
  "message": "The given data is invalid.",
  "errors": [
    "Domain name is required"
  ]
}

Response code 422

If the given domain is incorrect or not properly formatted then this error will occur

Correct nameserver formats are eg. ( ns1.example.com )

Incorrect nameserver formats eg. ( ns1.example, example.com)

{
  "success": false,
  "message": "The given data is invalid.",
  "errors": [
    "Each Name Server must be a valid hostname format (e.g., ns1.example.com)."
  ]
}

Response code 422