NameBright Domain API Help Page
Introduction
This is a RESTful API for advanced NameBright users who wish to automate tasks related to domain management. For examples regarding the use of this API, see: https://github.com/NameBright/DomainApiClientExamples.
API Usage
All RESTful operations in this API are rooted under the following URL: http://api.namebright.com/rest/.
To use this API:- You must have a valid NameBright account. Create one here.
- You must have API access. Request access here.
- Each time you start a session with the API you must obtain a valid OAuth2 bearer token from the NameBright OAuth2 API.
- You must include the bearer token with each HTTP request as described in this article. See the code examples for working prototypes which perform this authorization step.
HTTP Response Codes
This API attempts to adhere to RESTful principles regarding HTTP response codes. They are meaningful and reason phrases may be replaced with messages specific to the API. See RFC2616 Section 6.1.1 for a list of status codes and the default reason phrases. This API will primarily respond with codes in these categories:
Status Code | Result |
---|---|
2xx | The request was successful. |
4xx | There was an error in the client's request. |
5xx | There was an error on the server while processing the request. |
Purchase
Method | API | Description |
---|---|---|
GET | GET purchase/availability/{domain} |
Gets information about the availability of the specified domain. |
POST | POST purchase/renew |
Requests the purchase of a domain renewal for a domain within the current account. |
POST | POST purchase/register |
Requests the purchase of a domain registration. |
Account
Returns information about the parent account.
Method | API | Description |
---|---|---|
GET | GET account |
Returns financial information (currently: the account balance) about the account. |
AccountDomains
Controller which controls the retrieval of domains, and updates to settings on domains
Method | API | Description |
---|---|---|
GET | GET account/domains/{domain} |
Gets the specified domain. |
GET | GET account/domains?page={page}&domainsPerPage={domainsPerPage} |
Gets a list of domains from the account. |
PUT | PUT account/domains/{domain}?optOutOfLock={optOutOfLock} |
Updates locking, auto-renew, or whois privacy status on the domain. |
Contacts
Method | API | Description |
---|---|---|
GET | GET account/domains/{domain}/contacts/all |
Gets all contacts for the specified domain. The "all" portion of the path is optional. |
PUT | PUT account/domains/{domain}/contacts/all |
Updates all fields on all contacts to match this contact |
GET | GET account/domains/{domain}/contacts/technical |
Gets the technical contact for the specified domain. |
PUT | PUT account/domains/{domain}/contacts/technical |
Updates any fields contained within the contact parameter on the contact. |
GET | GET account/domains/{domain}/contacts/administrative |
Gets the administrative contact for the specified domain. |
PUT | PUT account/domains/{domain}/contacts/administrative |
Updates any fields contained within the contact parameter on the contact. |
GET | GET account/domains/{domain}/contacts/registrant |
Gets the registrant contact for the specified domain. |
PUT | PUT account/domains/{domain}/contacts/registrant?optOutOfLock={optOutOfLock} |
Updates any fields contained within the contact parameter on the contact. |
NameServers
Method | API | Description |
---|---|---|
GET | GET account/domains/{domain}/nameservers |
Gets a list of nameservers set on the domain. |
GET | GET account/domains/{domain}/nameservers/{nameServer} |
Verifies that an existing nameserver is set on the domain. |
PUT | PUT account/domains/{domain}/nameservers/{nameServer} |
Puts the specified domain. |
DELETE | DELETE account/domains/{domain}/nameservers/{nameServer} |
Deletes the specified name server. |
DELETE | DELETE account/domains/{domain}/nameservers |
Deletes all nameservers on the specified domain. |
HostRecords
Controls gets / puts / deletes for host records.
Method | API | Description |
---|---|---|
GET | GET account/domains/{domain}/hostrecords/all |
Returns all host records for a given domain. The url path "all" is optional. |
GET | GET account/domains/{domain}/hostrecords/a |
Returns a list of DNS "A" records set on the domain. |
DELETE | DELETE account/domains/{domain}/hostrecords/a/{id} |
Deletes a specific "A" record set on the domain by id. |
POST | POST account/domains/{domain}/hostrecords/a |
Creates an "A" record on the domain. |
GET | GET account/domains/{domain}/hostrecords/aaaa |
Returns a list of DNS "AAAA" records set on the domain. |
DELETE | DELETE account/domains/{domain}/hostrecords/aaaa/{id} |
Deletes a specific "AAAA" record set on the domain by id. |
POST | POST account/domains/{domain}/hostrecords/aaaa |
Creates an "AAAA" record on the domain. |
GET | GET account/domains/{domain}/hostrecords/cname |
Returns a list of DNS "CNAME" records set on the domain. |
DELETE | DELETE account/domains/{domain}/hostrecords/cname/{id} |
Deletes a specific "CNAME" record set on the domain by id. |
POST | POST account/domains/{domain}/hostrecords/cname |
Creates a "CNAME" record on the domain. |
GET | GET account/domains/{domain}/hostrecords/mx |
Returns a list of DNS "MX" records set on the domain. |
DELETE | DELETE account/domains/{domain}/hostrecords/mx/{id} |
Deletes a specific "MX" record set on the domain by id. |
POST | POST account/domains/{domain}/hostrecords/mx |
Creates an "MX" record on the domain. |
GET | GET account/domains/{domain}/hostrecords/srv |
Returns a list of DNS "SRV" records set on the domain. |
DELETE | DELETE account/domains/{domain}/hostrecords/srv/{id} |
Deletes a specific "SRV" record set on the domain by id. |
POST | POST account/domains/{domain}/hostrecords/srv |
Creates an "SRV" record on the domain. |
GET | GET account/domains/{domain}/hostrecords/txt |
Returns a list of DNS "TXT" records set on the domain. |
DELETE | DELETE account/domains/{domain}/hostrecords/txt/{id} |
Deletes a specific "TXT" record set on the domain by id. |
POST | POST account/domains/{domain}/hostrecords/txt |
Creates a "TXT" record on the domain. |
InboundPush
Controller which controls the retrieval of domains, and updates to settings on domains
Method | API | Description |
---|---|---|
PUT | PUT account/inboundpush/Accept?domain={domain} |
Accepts a pending inbound domain push (account change). Once accepted, the domain name will have transferred ownership to your account. |
DELETE | DELETE account/inboundpush/Decline?domain={domain} |
Rejects a pending inbound domain push (account change). If rejected, the domain name will remain in the former account. |
GET | GET account/inboundpush/Pending?page={page}&domainsPerPage={domainsPerPage} |
Get a list of domains in the account accessible to the API application that are pending an inbound push (account change). |
GET | GET account/inboundpush/Completed?page={page}&domainsPerPage={domainsPerPage} |
Get a list of domains in the account accessible to the API application that have completed an inbound push (account change). |
PUT | PUT account/inboundpush/{domain}/Accept |
Accepts a pending inbound domain push (account change). Once accepted, the domain name will have transferred ownership to your account. |
DELETE | DELETE account/inboundpush/{domain}/Decline |
Rejects a pending inbound domain push (account change). If rejected, the domain name will remain in the former account. |
OutboundPush
Controller which controls the retrieval of domains, and updates to settings on domains
Method | API | Description |
---|---|---|
POST | POST account/outboundpush/ForcePush?domain={domain} |
Pushes a domain to a different NameBright account. If an account does not exist for the given email address in the contact property, one will be created and a temporary password will be sent to that email address. |
POST | POST account/outboundpush/Initiate?domain={domain}&emailAddress={emailAddress}&optOutOfLock={optOutOfLock} |
Initiates an account change (push) for a domain name. An account with the specified email address must already exist in the NameBright system. The owner of that account will be notified and will have the ability to accept or reject the domain. Once accepted, the ownership of the domain will have transferred to the account specified by the email address provided. |
DELETE | DELETE account/outboundpush/Cancel?domain={domain} |
Cancels a pending account change (push) for a domain name. There must be a pending push for that domain name and the domain must still be in your account. If cancelled, the remote account will no longer be able to accept the domain. |
GET | GET account/outboundpush/Pending?page={page}&domainsPerPage={domainsPerPage} |
Get a list of domains in the account accessible to the API application that are pending an inbound push (account change). |
GET | GET account/outboundpush/Completed?page={page}&domainsPerPage={domainsPerPage} |
Get a list of domains in the account accessible to the API application that have completed an outbound push (account change). |
POST | POST account/outboundpush/{domain}/ForcePush |
Pushes a domain to a different NameBright account. If an account does not exist for the given email address in the contact property, one will be created and a temporary password will be sent to that email address. |
POST | POST account/outboundpush/{domain}/Initiate?emailAddress={emailAddress}&optOutOfLock={optOutOfLock} |
Initiates an account change (push) for a domain name. An account with the specified email address must already exist in the NameBright system. The owner of that account will be notified and will have the ability to accept or reject the domain. Once accepted, the ownership of the domain will have transferred to the account specified by the email address provided. |
DELETE | DELETE account/outboundpush/{domain}/Cancel |
Cancels a pending account change (push) for a domain name. There must be a pending push for that domain name and the domain must still be in your account. If cancelled, the remote account will no longer be able to accept the domain. |
DomainWhoIsAccuracy
Controller that displays the whois accuracy information for a domain or list of domains.
Method | API | Description |
---|---|---|
GET | GET account/domains/{domain}/whoisaccuracy |
Gets the whois accuracy information for a specific domain. |
ContactVerification
Manages details about the verification of WhoIs contacts as a part of WhoIs Accuracy
Method | API | Description |
---|---|---|
GET | GET account/domains/{domain}/contactverifications |
Get the contact verifications for a domain |
POST | POST account/contactverification/SendEmail |
Send an email verification request |
POST | POST account/contactverification/SendPhoneNumber |
Send a phone verification request via SMS or voice call |
POST | POST account/contactverification/VerifyEmail |
Verify an email using its auth code |
POST | POST account/contactverification/VerifyPhoneNumber |
Verify a phone number using its auth code |
POST | POST account/contactverification/VerifyContact |
Submit the link verification code for an unknown contact. This can happen if a user clicks from an email or text. |