WIP - Wouldn't use this in production
Wrappers for all NameSilo API calls.
Some methods have been 'fluffed out' to be more idiomatic in JS land, some are simply generated wrappers around a POST request.
- Simplify calling of endpoints with single argument
 - Live integration tests against sandbox API
 - Should probably bring in eslint
 - Coverage reporting
 
@nahanil/namesilo 0.0.4
Interact with the NameSilo API
[AUTO] Register a Domain using Drop-Catching See: https://www.namesilo.com/api_reference.php#registerDomainDrop
let res = await ns.registerDomainDrop({
  'domain': 'namesilo.com',
  'years': '2',
  'private': '1',
  'auto_renew': '1'
})// Output
{
  'code': 300,
  'detail': 'success',
  'message': 'Your domain registration was successfully processed.',
  'domain': 'namesilo.com',
  'order_amount': 7.77
}Void
[AUTO] Transfer a Domain See: https://www.namesilo.com/api_reference.php#transferDomain
let res = await ns.transferDomain({
  'domain': 'namesilo.com',
  'auth': 'XXXXX',
  'private': '1',
  'auto_renew': '1'
})// Output
{
  'code': 300,
  'detail': 'success',
  'message': 'Your domain transfer was successfully processed.',
  'domain': 'namesilo.com',
  'order_amount': 7.77
}Void
[AUTO] Check Transfer Status See: https://www.namesilo.com/api_reference.php#checkTransferStatus
| Name | Type | Description | |
|---|---|---|---|
| domain | 
let res = await ns.checkTransferStatus('namesilo.com')// Output
{
  'code': 300,
  'detail': 'success',
  'date': '2010-01-01 12:30:59',
  'status': 'Pending at Registry',
  'message': 'Your transfer request has been successfully submitted to the central registry.'
}Void
[AUTO] Transfer Update (Add/Change EPP Code) See: https://www.namesilo.com/api_reference.php#transferUpdateChangeEPPCode
let res = await ns.transferUpdateChangeEPPCode({
  'domain': 'namesilo.com',
  'auth': '12345ABCDE'
})// Output
{
  'code': 300,
  'detail': 'success'
}Void
[AUTO] Transfer Update (Re-Send Administrative Email Verification) See: https://www.namesilo.com/api_reference.php#transferUpdateResendAdminEmail
| Name | Type | Description | |
|---|---|---|---|
| domain | 
let res = await ns.transferUpdateResendAdminEmail('namesilo.com')// Output
{
  'code': 300,
  'detail': 'success'
}Void
[AUTO] Transfer Update (Re-Submit a transfer to the registry) See: https://www.namesilo.com/api_reference.php#transferUpdateResubmitToRegistry
| Name | Type | Description | |
|---|---|---|---|
| domain | 
let res = await ns.transferUpdateResubmitToRegistry('namesilo.com')// Output
{
  'code': 300,
  'detail': 'success'
}Void
[AUTO] Check Availability of Domain Transfer See: https://www.namesilo.com/api_reference.php#checkTransferAvailability
| Name | Type | Description | |
|---|---|---|---|
| domains | Array | 
let res = await ns.checkTransferAvailability(['namesilo.com','namesilo.net','namesilo.org','namesilo.asia'])// Output
{
  'code': 300,
  'detail': 'success',
  'available': {
    'domain': [
      'namesilo.com',
      'namesilo.org'
    ]
  },
  'unavailable': {
    'domain': [
      {
        'reason': 'This domain cannot be transferred since it is not currently registered.',
        '$t': 'namesilo.net'
      },
      {
        'reason': 'Sorry, we do not currently support the .ASIA extension/TLD',
        '$t': 'namesilo.asia'
      }
    ]
  }
}Void
[AUTO] Get Domain Information See: https://www.namesilo.com/api_reference.php#getDomainInfo
| Name | Type | Description | |
|---|---|---|---|
| domain | 
let res = await ns.getDomainInfo('namesilo.com')// Output
{
  'code': 300,
  'detail': 'success',
  'created': '2009-01-11',
  'expires': '2017-01-11',
  'status': 'Active',
  'locked': 'Yes',
  'private': 'Yes',
  'auto_renew': 'Yes',
  'traffic_type': 'Forwarded',
  'email_verification_required': 'No',
  'portfolio': 'Main Portfolio',
  'forward_url': 'https://www.namesilo.net',
  'forward_type': 'Temporary Forward (302)',
  'nameservers': [
    'NS1.NAMESILO.COM',
    'NS2.NAMESILO.COM'
  ],
  'contact_ids': {
    'registrant': 444444,
    'administrative': 555555,
    'technical': 666666,
    'billing': 7777777
  }
}Void
[AUTO] View contact profiles See: https://www.namesilo.com/api_reference.php#contactList
let res = await ns.contactList()// Output
{
  'code': 300,
  'detail': 'success',
  'contact': [
    {
      'contact_id': 4444444,
      'default_profile': 1,
      'nickname': 'Test 1',
      'company': 'Springfield Power Plant',
      'first_name': 'Homer',
      'last_name': 'Simpson',
      'address': '742 Evergreen Terrace',
      'address2': {},
      'city': 'Springfield',
      'state': 'ST',
      'zip': 55555,
      'country': 'US',
      'email': 'homer @simpsons.com',
      'phone': '999-555-1212',
      'fax': '555-123-4567',
      'usnc': 'C21',
      'usap': 'P2',
      'calf': 'CCT',
      'caln': 'en',
      'caag': 2,
      'cawd': 1
    },
    {
      'contact_id': 5555555,
      'default_profile': 0,
      'nickname': 'Test 2',
      'company': 'NameSilo',
      'first_name': 'John',
      'last_name': 'Smith',
      'address': '555 N. 1st Street',
      'address2': 'Suite 500',
      'city': 'Anywhere',
      'state': 'AZ',
      'zip': 12345,
      'country': 'US',
      'email': 'test @test.com',
      'phone': '480-555-1212',
      'fax': '888-777-6666',
      'usnc': {},
      'usap': {},
      'calf': {},
      'caln': {},
      'caag': {},
      'cawd': {}
    }
  ]
}Void
[AUTO] Add a contact profile See: https://www.namesilo.com/api_reference.php#contactAdd
let res = await ns.contactAdd({
  'fn': 'John',
  'ln': 'Smith',
  'ad': '123 N. 1st Street',
  'cy': 'Anywhere',
  'st': 'AZ',
  'zp': '55555',
  'ct': 'US',
  'em': 'test@test.com',
  'ph': '4805555555'
})// Output
{
  'code': 300,
  'detail': 'success',
  'contact_id': 55555
}Void
[AUTO] Update a contact profile See: https://www.namesilo.com/api_reference.php#contactUpdate
let res = await ns.contactUpdate({
  'contact_id': '111111',
  'fn': 'John',
  'ln': 'Smith',
  'ad': '123 N. 1st Street',
  'cy': 'Anywhere',
  'st': 'AZ',
  'zp': '55555',
  'ct': 'US',
  'em': 'test@test.com',
  'ph': '4805555555'
})// Output
{
  'code': 300,
  'detail': 'success'
}Void
[AUTO] Delete a contact profile See: https://www.namesilo.com/api_reference.php#contactDelete
| Name | Type | Description | |
|---|---|---|---|
| contact_id | 
let res = await ns.contactDelete('111111')// Output
{
  'code': 300,
  'detail': 'success'
}Void
[AUTO] Associate a contact profile with a domain See: https://www.namesilo.com/api_reference.php#contactDomainAssociate
let res = await ns.contactDomainAssociate({
  'domain': 'namesilo.com',
  'administrative': '11111',
  'technical': '222222'
})// Output
{
  'code': 300,
  'detail': 'success'
}Void
[AUTO] List Current DNS Records See: https://www.namesilo.com/api_reference.php#dnsListRecords
| Name | Type | Description | |
|---|---|---|---|
| domain | 
let res = await ns.dnsListRecords('namesilo.com')// Output
{
  'code': 300,
  'detail': 'success',
  'resource_record': [
    {
      'record_id': '1a2b3c4d5e6f',
      'type': 'A',
      'host': 'test.namesilo.com',
      'value': '55.555.55.55',
      'ttl': 7207,
      'distance': 0
    },
    {
      'record_id': '5Brg5hw25jr',
      'type': 'CNAME',
      'host': 'dev.namesilo.com',
      'value': 'testing.namesilo.com',
      'ttl': 7207,
      'distance': 0
    },
    {
      'record_id': 'fH35aH4hsv',
      'type': 'MX',
      'host': 'namesilo.com',
      'value': 'mail.namesilo.com',
      'ttl': 7207,
      'distance': 10
    },
    {
      'record_id': 'Ldfd26Sfbh',
      'type': 'MX',
      'host': 'namesilo.com',
      'value': 'mail2.namesilo.com',
      'ttl': 7207,
      'distance': 20
    }
  ]
}Void
[AUTO] Add DNS Records See: https://www.namesilo.com/api_reference.php#dnsAddRecord
let res = await ns.dnsAddRecord({
  'domain': 'namesilo.com',
  'rrtype': 'A',
  'rrhost': 'test',
  'rrvalue': '55.55.55.55',
  'rrttl': '7207'
})// Output
{
  'code': 300,
  'detail': 'success',
  'record_id': '1a2b3c4d5e'
}Void
[AUTO] Update DNS Records See: https://www.namesilo.com/api_reference.php#dnsUpdateRecord
let res = await ns.dnsUpdateRecord({
  'domain': 'namesilo.com',
  'rrid': '1a2b3',
  'rrhost': 'test',
  'rrvalue': '55.55.55.55',
  'rrttl': '7207'
})// Output
{
  'code': 300,
  'detail': 'success',
  'record_id': '1a2b3c4d5e'
}Void
[AUTO] Delete DNS Records See: https://www.namesilo.com/api_reference.php#dnsDeleteRecord
let res = await ns.dnsDeleteRecord({
  'domain': 'namesilo.com',
  'rrid': '1a2b3'
})// Output
{
  'code': 300,
  'detail': 'success'
}Void
[AUTO] List Current DS (DNSSEC) Records See: https://www.namesilo.com/api_reference.php#dnsSecListRecords
| Name | Type | Description | |
|---|---|---|---|
| domain | 
let res = await ns.dnsSecListRecords('namesilo.com')// Output
{
  'code': 300,
  'detail': 'success',
  'ds_record': [
    {
      'digest': '123456789ABCDEFGHIJ',
      'digest_type': 1,
      'algorithm': 5,
      'key_tag': 1234
    },
    {
      'digest': '123456789ABCDEFGHIJ',
      'digest_type': 2,
      'algorithm': 3,
      'key_tag': 9876
    }
  ]
}Void
[AUTO] Add a DS record (DNSSEC) to your domain See: https://www.namesilo.com/api_reference.php#dnsSecAddRecord
let res = await ns.dnsSecAddRecord({
  'domain': 'namesilo.com',
  'digest': '123456789',
  'keyTag': '123',
  'digestType': '1',
  'alg': '5'
})// Output
{
  'code': 300,
  'detail': 'success'
}Void
[AUTO] Delete a DS record (DNSSEC) from your domain See: https://www.namesilo.com/api_reference.php#dnsSecDeleteRecord
let res = await ns.dnsSecDeleteRecord({
  'domain': 'namesilo.com',
  'digest': '123456789',
  'keyTag': '123',
  'digestType': '1',
  'alg': '5'
})// Output
{
  'code': 300,
  'detail': 'success'
}Void
[AUTO] View active portfolios See: https://www.namesilo.com/api_reference.php#portfolioList
let res = await ns.portfolioList()// Output
{
  'code': 300,
  'detail': 'success',
  'portfolios': {
    'name': [
      'Personal domains',
      'Business domains'
    ]
  }
}Void
[AUTO] Add a portfolio See: https://www.namesilo.com/api_reference.php#portfolioAdd
| Name | Type | Description | |
|---|---|---|---|
| portfolio | 
let res = await ns.portfolioAdd('New Portfolio')// Output
{
  'code': 300,
  'detail': 'success'
}Void
[AUTO] Delete a portfolio See: https://www.namesilo.com/api_reference.php#portfolioDelete
| Name | Type | Description | |
|---|---|---|---|
| portfolio | 
let res = await ns.portfolioDelete('New Portfolio')// Output
{
  'code': 300,
  'detail': 'success'
}Void
[AUTO] Assign a domain to a portfolio See: https://www.namesilo.com/api_reference.php#portfolioDomainAssociate
let res = await ns.portfolioDomainAssociate({
  'portfolio': 'New Portfolio',
  'domains': 'namesilo.com,namesilo.net,namesilo.info'
})// Output
{
  'code': 300,
  'detail': 'success',
  'message': 'All supplied domains belonging to your account have been updated.'
}Void
[AUTO] List Registered NameServers See: https://www.namesilo.com/api_reference.php#listRegisteredNameServers
| Name | Type | Description | |
|---|---|---|---|
| domain | 
let res = await ns.listRegisteredNameServers('namesilo.com')// Output
{
  'code': 300,
  'detail': 'success',
  'hosts': [
    {
      'host': 'ns1',
      'ip': [
        '123.456.78.9',
        '11.22.33.44'
      ]
    },
    {
      'host': 'ns2',
      'ip': [
        '99.88.77.6'
      ]
    }
  ]
}Void
[AUTO] Add a Registered NameServer See: https://www.namesilo.com/api_reference.php#addRegisteredNameServer
let res = await ns.addRegisteredNameServer({
  'domain': 'namesilo.com',
  'new_host': 'ns5',
  'ip1': '123.45.67.8',
  'ip2': '11.22.33.44'
})// Output
{
  'code': 300,
  'detail': 'success'
}Void
[AUTO] Modify a Registered NameServer See: https://www.namesilo.com/api_reference.php#modifyRegisteredNameServer
let res = await ns.modifyRegisteredNameServer({
  'domain': 'namesilo.com',
  ' current_host': 'ns5',
  'new_host': 'ns5',
  'ip1': '123.45.67.8',
  'ip2': '11.22.33.44'
})// Output
{
  'code': 300,
  'detail': 'success'
}Void
[AUTO] Delete a Registered NameServer See: https://www.namesilo.com/api_reference.php#deleteRegisteredNameServer
let res = await ns.deleteRegisteredNameServer({
  'domain': 'namesilo.com',
  ' current_host': 'ns5'
})// Output
{
  'code': 300,
  'detail': 'success'
}Void
[AUTO] Add WHOIS Privacy See: https://www.namesilo.com/api_reference.php#addPrivacy
| Name | Type | Description | |
|---|---|---|---|
| domain | 
let res = await ns.addPrivacy('namesilo.com')// Output
{
  'code': 300,
  'detail': 'success'
}Void
[AUTO] Remove WHOIS Privacy See: https://www.namesilo.com/api_reference.php#removePrivacy
| Name | Type | Description | |
|---|---|---|---|
| domain | 
let res = await ns.removePrivacy('namesilo.com')// Output
{
  'code': 300,
  'detail': 'success'
}Void
[AUTO] Add Auto-Renewal See: https://www.namesilo.com/api_reference.php#addAutoRenewal
| Name | Type | Description | |
|---|---|---|---|
| domain | 
let res = await ns.addAutoRenewal('namesilo.com')// Output
{
  'code': 250,
  'detail': 'Domain is already set to AutoRenew - No update made.'
}Void
[AUTO] Remove Auto-Renewal See: https://www.namesilo.com/api_reference.php#removeAutoRenewal
| Name | Type | Description | |
|---|---|---|---|
| domain | 
let res = await ns.removeAutoRenewal('namesilo.com')// Output
{
  'code': 251,
  'detail': 'Domain is already set not to AutoRenew - No update made.'
}Void
[AUTO] Retrieve EPP Code See: https://www.namesilo.com/api_reference.php#retrieveAuthCode
| Name | Type | Description | |
|---|---|---|---|
| domain | 
let res = await ns.retrieveAuthCode('namesilo.com')// Output
{
  'code': 300,
  'detail': 'Success'
}Void
[AUTO] Forward a Domain See: https://www.namesilo.com/api_reference.php#domainForward
let res = await ns.domainForward({
  'domain': 'namesilo.com',
  'protocol': 'http',
  'address': 'google.com',
  'method': '302'
})// Output
{
  'code': 300,
  'detail': 'success'
}Void
[AUTO] Forward a Sub-Domain See: https://www.namesilo.com/api_reference.php#domainForwardSubDomain
let res = await ns.domainForwardSubDomain({
  'domain': 'namesilo.com',
  'sub_domain': 'test',
  'protocol': 'http',
  'address': 'google.com',
  'method': '302'
})// Output
{
  'code': 300,
  'detail': 'success',
  'message': 'The sub-domain has been successfully (created OR modified)'
}Void
[AUTO] Delete a Sub-Domain Forward See: https://www.namesilo.com/api_reference.php#domainForwardSubDomainDelete
let res = await ns.domainForwardSubDomainDelete({
  'domain': 'namesilo.com',
  'sub_domain': 'test'
})// Output
{
  'code': 300,
  'detail': 'success'
}Void
[AUTO] Lock a Domain See: https://www.namesilo.com/api_reference.php#domainLock
| Name | Type | Description | |
|---|---|---|---|
| domain | 
let res = await ns.domainLock('namesilo.com')// Output
{
  'code': 252,
  'detail': 'Domain is already Locked - No update made.'
}Void
[AUTO] Unlock a Domain See: https://www.namesilo.com/api_reference.php#domainUnlock
| Name | Type | Description | |
|---|---|---|---|
| domain | 
let res = await ns.domainUnlock('namesilo.com')// Output
{
  'code': 253,
  'detail': 'Domain is already Unlocked - No update made.'
}Void
[AUTO] View the email forwards for your domain See: https://www.namesilo.com/api_reference.php#listEmailForwards
| Name | Type | Description | |
|---|---|---|---|
| domain | 
let res = await ns.listEmailForwards('namesilo.com')// Output
{
  'code': 300,
  'detail': 'success',
  'addresses': [
    {
      'email': 'test@namesilo.com',
      'forwards_to': [
        'test@test.com',
        'test2@test.com'
      ]
    },
    {
      'email': 'testing@namesilo.com',
      'forwards_to': 'test@test.com'
    }
  ]
}Void
[AUTO] Add or modify an email forward for your domain See: https://www.namesilo.com/api_reference.php#configureEmailForward
let res = await ns.configureEmailForward({
  'domain': 'namesilo.com',
  'email': 'test',
  'forward1': 'test@test.com',
  'forward2': 'test2@test.com'
})// Output
{
  'code': 300,
  'detail': 'success',
  'message': 'test@namesilo.com has been successfully (\'created\' or \'changed\')'
}Void
[AUTO] Delete an email forward for your domain See: https://www.namesilo.com/api_reference.php#deleteEmailForward
let res = await ns.deleteEmailForward({
  'domain': 'namesilo.com',
  'email': 'test'
})// Output
{
  'code': 300,
  'detail': 'success',
  'message': 'test@namesilo.com has been deleted'
}Void
[AUTO] View the verification status of any Registrant email addresses See: https://www.namesilo.com/api_reference.php#registrantVerificationStatus
let res = await ns.registrantVerificationStatus()// Output
{
  'code': 300,
  'detail': 'success',
  'email': [
    {
      'email_address': 'test@sample.com',
      'domains': 32,
      'verified': 'Yes'
    },
    {
      'email_address': 'anothertest@sample.com',
      'domains': 12,
      'verified': 'No'
    }
  ]
}Void
[AUTO] Verify a Registrant email address See: https://www.namesilo.com/api_reference.php#emailVerification
| Name | Type | Description | |
|---|---|---|---|
let res = await ns.emailVerification('test@example.com')// Output
{
  'code': 300,
  'detail': 'success',
  'message': 'The verification email has been sent'
}Void
[AUTO] View NameSilo Account Funds Balance See: https://www.namesilo.com/api_reference.php#getAccountBalance
let res = await ns.getAccountBalance()// Output
{
  'code': 300,
  'detail': 'success',
  'balance': 355.75
}Void
[AUTO] Add NameSilo Account Funds See: https://www.namesilo.com/api_reference.php#addAccountFunds
let res = await ns.addAccountFunds({
  'amount': '65.43',
  'payment_id': '123'
})// Output
{
  'code': 300,
  'detail': 'success',
  'new_balance': 420.61
}Void
[AUTO] View all of your active Marketplace sales See: https://www.namesilo.com/api_reference.php#marketplaceActiveSalesOverview
let res = await ns.marketplaceActiveSalesOverview()// Output
{
  'code': 300,
  'detail': 'success',
  'sale_details': [
    {
      'domain': 'example.com',
      'status': 'active',
      'reserve': 0,
      'buy_now': 0,
      'portfolio': 'none',
      'sale_type': 'Offer/Counter',
      'pay_plan_offered': 'No',
      'end_date': '2018-12-24 00:00:00',
      'auto_extend_days': 0,
      'time_remaining': '1 year',
      'private': 'No',
      'active_bid_or_offer': 'no'
    },
    {
      'domain': 'example2.com',
      'status': 'awaiting payment',
      'reserve': '25.00 (hidden)',
      'buy_now': 150,
      'portfolio': 'For Sale Domains',
      'sale_type': 'Auction',
      'pay_plan_offered': 'Yes',
      'end_date': '2018-11-21 21:21:21',
      'auto_extend_days': 15,
      'time_remaining': '13 days',
      'private': 'Yes',
      'active_bid_or_offer': 'yes'
    }
  ]
}Void
[AUTO] Allows you to add a new Marketplace sale or modify and existing sale See: https://www.namesilo.com/api_reference.php#marketplaceAddOrModifySale
let res = await ns.marketplaceAddOrModifySale({
  'domain': 'example.com',
  'action': 'add',
  'sale_type': 'auction',
  'reserve': '250.00',
  'buy_now': '750.00',
  'payment_plan_offered': '1'
})// Output
{
  'code': 300,
  'detail': 'success',
  'message': 'Your selected domains have been added to our marketplace!'
}Void
[AUTO] Allows you to update the appearance of your Marketplace Landing Page See: https://www.namesilo.com/api_reference.php#marketplaceLandingPageUpdate
let res = await ns.marketplaceLandingPageUpdate({
  'domain': 'example.com',
  'mp_template': '2',
  'mp_bgcolor': '000000'
})// Output
{
  'code': 300,
  'detail': 'success'
}Void
[AUTO] Return our price list See: https://www.namesilo.com/api_reference.php#getPrices
let res = await ns.getPrices()// Output
{
  'code': 300,
  'detail': 'success',
  'com': {
    'registration': 8.99,
    'transfer': 8.39,
    'renew': 8.99
  },
  'net': {
    'registration': 9.29,
    'transfer': 8.99,
    'renew': 9.29
  }
}Void
[AUTO] Returns Complete Account Order History See: https://www.namesilo.com/api_reference.php#listOrders
let res = await ns.listOrders()// Output
{
  'code': 300,
  'detail': 'success',
  'order': [
    {
      'order_number': 77777,
      'order_date': '2016-12-24 12:12:12',
      'method': 'Bitcoin',
      'total': 26.97
    },
    {
      'order_number': 888888,
      'order_date': '2016-12-24 13:14:15',
      'method': 'PayPal',
      'total': 8.99
    }
  ]
}Void
[AUTO] View Details For Provided Order Number See: https://www.namesilo.com/api_reference.php#orderDetails
| Name | Type | Description | |
|---|---|---|---|
| order_number | 
let res = await ns.orderDetails('77777')// Output
{
  'code': 300,
  'detail': 'success',
  'order_date': '2016-12-24 12:12:12',
  'method': 'Bitcoin',
  'total': 26.97,
  'order_details': [
    {
      'description': 'testdomain.com - registration',
      'years_qty': 2,
      'price': 8.99,
      'subtotal': 17.98,
      'status': 'Processed'
    },
    {
      'description': 'testdomain2.com - renewal',
      'years_qty': 1,
      'price': 8.99,
      'subtotal': 8.99,
      'status': 'Credited',
      'credited_date': '2016-12-25 09:09:09',
      'credited_amount': 8.99
    }
  ]
}Void
Interact with the NameSilo API You can pass either an API Key as the only parameter, or an object with more verbose configuration options.
| Name | Type | Description | |
|---|---|---|---|
| options | String Object | 
(String) API Key | (Object) Configuration options | 
| options.apiKey | Boolean | 
API Key | |
| options.sandbox=false | Boolean | 
Use sandbox/testing API | Optional | 
| options.batch=false | Boolean | 
Use Batch API | Optional | 
| options.logger | Function | 
Optional | 
const API_KEY = '1234567890'
NameSilo = require('namesilo')
ns = new NameSilo(API_KEY)// With sandbox/test mode enabled
ns = new NameSilo({
  apiKey: API_KEY,
  sandbox: true,
  batch: false,
})Void
Determine if you can register the specified domains. See: https://www.namesilo.com/api_reference.php#checkRegisterAvailability
| Name | Type | Description | |
|---|---|---|---|
| domains | Array String | 
Domain(s) to check | 
let res = await ns.checkRegisterAvailability('namesilo.com')let res = await ns.checkRegisterAvailability('namesilo.com,namesilo.net,n#mesilo.org')let res = await ns.checkRegisterAvailability(['namesilo.com' , 'namesilo.net' , 'n#mesilo.org'])// Output
{
  "code": 300,
  "detail": "success",
  "available": [
      {
          "price": 9.99,
          "domain": "namesilo.com"
      }
  ],
  "unavailable": [
      "namesilo.net"
  ],
  "invalid": [
      "n#mesilo.com"
  ]
}PromiseAPI Reply
Change the name servers associated with the provided domain name. You must provide between 2 and 13 name servers in order for this operation to be successful. See https://www.namesilo.com/api_reference.php#changeNameServers
| Name | Type | Description | |
|---|---|---|---|
| domain | String Object | 
Domain name to modify | |
| nameservers | Array Undefined | 
Nameservers to set for domain | 
let res = await ns.changeNameServers('namesilo.com', ['ns1.namesilo.com', 'ns2.namesilo.com'])let res = await ns.changeNameServers({ domain: 'namesilo.com', ns1: 'ns1.namesilo.com', ns2: 'ns2.namesilo.com' })// Output
{ code: 300, detail: 'success' }PromiseAPI Reply
Get a list of all active domains within your account. See https://www.namesilo.com/api_reference.php#listDomains
let res = ns.listDomains()// Output
{
  'code': 300,
  'detail': 'success',
  'domains': [
    'namesilo.com',
    'namesilo.net',
    'namesilo.org'
  ]
}PromiseAPI Reply
Register a domain. See https://www.namesilo.com/api_reference.php#registerDomain
| Name | Type | Description | |
|---|---|---|---|
| domain | String Object | 
(String) The domain to register | (Object) Object containing all API options | 
| years=1 | Number | 
The amount of years to register domain for | Optional | 
| options | Object | 
See https://www.namesilo.com/api_reference.php#registerDomain | Optional | 
let res = await ns.registerDomain('example.com', 2, { private: true })PromiseAPI Reply
Renew a domain. See https://www.namesilo.com/api_reference.php#renewDomain
| Name | Type | Description | |
|---|---|---|---|
| domain | String Object | 
(String) The domain to renew | (Object) Object containing all API options | 
| years=1 | Number | 
The amount of years to renew domain for | Optional | 
| options | Object | 
Optional | |
| options.payment_id | Number | 
The ID number for the verified credit card to use for the transaction. If you do not specify a payment_id, we will attempt to process the transaction using your account funds. | Optional | 
| options.coupon | String | 
The coupon code to apply to this order | Optional | 
let res = await ns.renewDomain('example.com', 2)let res = await ns.renewDomain('example.com', 2, { payment_id: 1234, coupon: 'abcd' })let res = await ns.renewDomain({ domain: 'example.com', years: 2, payment_id: 1234 })// Response
{ code: 300,
  detail: 'success',
  message: 'Your domain renewal was successfully processed.',
  domain: 'namesilo.com',
  order_amount: 7.77
}PromiseAPI Reply
Documentation generated with doxdox.