Download OpenAPI specification:Download
Spaceship API uses a combination of API key and API secret for authentication.
You can generate your API key and secret in API Manager. Use the "New API key" button to set up a new API key and follow the guide to get started.
After the key setup has been successful, it should appear on the API Manager application page.
As shown in the example below, API consumers shall pass a valid API key and a corresponding API secret in the X-API-Secret headers.
You do not need to encode the API key and the API secret.
curl -X GET '/api/resource' \
-H 'X-Api-Secret: F3brvQluT4s8aDB7PeFBH6qKHfH2xTKTneCjZbq3z2w7rj2vV6n_zhSvvJoQ' \
-H 'X-Api-Key: JdIS8QYFMZpVKupJtdc3'
Retrieves a paginated list of domains, allowing the use of query parameters to customize the response. This operation is essential for efficiently managing large collections of domains, enabling smooth navigation and retrieval without overloading the system with unnecessary data.
take required | integer <int32> [ 1 .. 100 ] Number of response items per page |
skip required | integer <int32> [ 0 .. 2147483647 ] Number of response items to skip |
orderBy | Array of strings <= 1 items Items Enum: "name" "-name" "unicodeName" "-unicodeName" "registrationDate" "-registrationDate" "expirationDate" "-expirationDate" Specifies fields and order to sort the response items |
const url = 'https://spaceship.dev/api/v1/domains?take=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&orderBy=SOME_ARRAY_VALUE'; const options = { method: 'GET', headers: {'X-API-Key': 'REPLACE_KEY_VALUE', 'X-API-Secret': 'REPLACE_KEY_VALUE'} }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err));
{- "items": [
- {
- "name": "xn--spceship-9ya.com",
- "unicodeName": "spaceship.com",
- "isPremium": false,
- "autoRenew": false,
- "registrationDate": "2022-01-01T00:00:00.000Z",
- "expirationDate": "2022-01-01T00:00:00.000Z",
- "lifecycleStatus": "registered",
- "verificationStatus": "success",
- "eppStatuses": [
- "clientTransferProhibited"
], - "suspensions": [
- {
- "reasonCode": "raaVerification"
}
], - "privacyProtection": {
- "contactForm": true,
- "level": "high"
}, - "nameservers": {
- "provider": "basic",
- "hosts": [
- "ns1.exampledomain.com",
- "ns2.exampledomain.com"
]
}, - "contacts": {
- "registrant": "1ZdMXpapqp9sle5dl8BlppTJXAzf5",
- "admin": "1ZdMXpapqp9sle5dl8BlppTJXAzf6",
- "tech": "1ZdMXpapqp9sle5dl8BlppTJXAzf5",
- "billing": "1ZdMXpapqp9sle5dl8BlppTJXAzf5",
- "attributes": [
- "1ZdMXpapqp9sle5dl8BlppTJXAzf8"
]
}
}
], - "total": 100
}
Get details of a specific domain.
domain required | string <domain> [ 4 .. 255 ] characters Example: spaceship.com Domain name in ASCII format (A-label) whose details are to be fetched. The domain name must be provided in a fully qualified domain format. |
const url = 'https://spaceship.dev/api/v1/domains/spaceship.com'; const options = { method: 'GET', headers: {'X-API-Key': 'REPLACE_KEY_VALUE', 'X-API-Secret': 'REPLACE_KEY_VALUE'} }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err));
{- "name": "xn--spceship-9ya.com",
- "unicodeName": "spaceship.com",
- "isPremium": false,
- "autoRenew": false,
- "registrationDate": "2022-01-01T00:00:00.000Z",
- "expirationDate": "2022-01-01T00:00:00.000Z",
- "lifecycleStatus": "registered",
- "verificationStatus": "success",
- "eppStatuses": [
- "clientTransferProhibited"
], - "suspensions": [
- {
- "reasonCode": "raaVerification"
}
], - "privacyProtection": {
- "contactForm": true,
- "level": "high"
}, - "nameservers": {
- "provider": "basic",
- "hosts": [
- "ns1.exampledomain.com",
- "ns2.exampledomain.com"
]
}, - "contacts": {
- "registrant": "1ZdMXpapqp9sle5dl8BlppTJXAzf5",
- "admin": "1ZdMXpapqp9sle5dl8BlppTJXAzf6",
- "tech": "1ZdMXpapqp9sle5dl8BlppTJXAzf5",
- "billing": "1ZdMXpapqp9sle5dl8BlppTJXAzf5",
- "attributes": [
- "1ZdMXpapqp9sle5dl8BlppTJXAzf8"
]
}
}
The provided information is for preliminary familiarization only. Once the API is implemented, this notice will be removed.
domain required | string <domain> [ 4 .. 255 ] characters Example: spaceship.com Domain name in ASCII format (A-label) that must be deleted. The domain name must be provided in a fully qualified domain format. |
const url = 'https://spaceship.dev/api/v1/domains/spaceship.com'; const options = { method: 'DELETE', headers: {'X-API-Key': 'REPLACE_KEY_VALUE', 'X-API-Secret': 'REPLACE_KEY_VALUE'} }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err));
{- "detail": "string"
}
The provided information is for preliminary familiarization only. Once the API is implemented, this notice will be removed.
domain required | string <domain> [ 4 .. 255 ] characters Example: spaceship.com The domain name for registration. |
name required | string <domain> [ 4 .. 255 ] characters Domain name in UTF-8 format (U-label) |
autoRenew required | boolean Indicates whether the auto-renew option is enabled |
required | object Information about domain privacy protection |
required | object Information about nameservers |
required | object Domain Contacts presented as ID references |
{- "name": "spaceship.com",
- "autoRenew": false,
- "privacyProtection": {
- "contactForm": true,
- "level": "high"
}, - "nameservers": {
- "provider": "custom",
- "hosts": [
- "ns1.exampledomain.com",
- "ns2.exampledomain.com"
]
}, - "contacts": {
- "registrant": "1ZdMXpapqp9sle5dl8BlppTJXAzf5",
- "admin": "1ZdMXpapqp9sle5dl8BlppTJXAzf6",
- "tech": "1ZdMXpapqp9sle5dl8BlppTJXAzf5",
- "billing": "1ZdMXpapqp9sle5dl8BlppTJXAzf5",
- "attributes": [
- "1ZdMXpapqp9sle5dl8BlppTJXAzf8"
]
}
}
{- "detail": "string"
}
The provided information is for preliminary familiarization only. Once the API is implemented, this notice will be removed.
domain required | string <domain> [ 4 .. 255 ] characters Example: spaceship.com The domain whose autorenewal state is being updated. |
Provides the new autorenewal state for the domain.
isAutoRenewing required | boolean Describes autorenewal state for the domain |
{- "isAutoRenewing": true
}
{- "isAutoRenewing": true
}
Allows the modification of domain name contacts.
domain required | string <domain> [ 4 .. 255 ] characters Example: spaceship.com The domain whose contacts are being updated. |
Provides the new set of contacts or the domain.
registrant required | string [ 27 .. 32 ] characters [a-zA-Z0-9]+ ID of the registrant contact person |
admin | string [ 27 .. 32 ] characters [a-zA-Z0-9]+ ID of the admin contact person |
tech | string [ 27 .. 32 ] characters [a-zA-Z0-9]+ ID of the technical contact person |
billing | string [ 27 .. 32 ] characters [a-zA-Z0-9]+ ID of the billing contact person |
attributes | Array of strings (contactId) <= 5 items [[a-zA-Z0-9]+] List of extended attribute contact point IDs |
{- "registrant": "1ZdMXpapqp9sle5dl8BlppTJXAzf5",
- "admin": "1ZdMXpapqp9sle5dl8BlppTJXAzf5",
- "tech": "1ZdMXpapqp9sle5dl8BlppTJXAzf5",
- "billing": "1ZdMXpapqp9sle5dl8BlppTJXAzf5",
- "attributes": [
- "1ZdMXpapqp9sle5dl8BlppTJXAzf3",
- "1ZdMXpapqp9sle5dl8BlppTJXAzf2"
]
}
{- "verificationStatus": "success"
}
Allows the modification of DNS settings for a specific domain by replacing its current nameservers with new ones. This operation is crucial to ensure that your domain points to the correct DNS servers, which is essential for routing traffic accurately and implementing changes in DNS management.
domain required | string <domain> [ 4 .. 255 ] characters Example: spaceship.com The domain whose nameservers should be updated. The domain name must be provided in a fully qualified domain format. |
Provides the new set of nameservers for the domain. The request must include a list of nameservers that will replace the existing ones.
provider required | string Enum: "basic" "custom" Nameservers provider |
hosts | Array of strings <hostname> (fqdn) [ 2 .. 12 ] items [ items <hostname > [ 4 .. 255 ] characters ] A list of nameservers to be assigned to the domain. Each nameserver must be provided in a fully qualified domain format. This field must be specified only for the "custom" provider; for the "basic" provider it should be omitted. |
{- "provider": "custom",
- "hosts": [
- "ns1.exampledomain.com",
- "ns2.exampledomain.com"
]
}
{- "hosts": [
- "ns1.exampledomain.com",
- "ns2.exampledomain.com"
], - "provider": "custom"
}
Get the personal nameservers for a specific domain.
Personal nameservers are a combination of A records set for a specific host and glue records set for the domain on the registry.
domain required | string <domain> [ 4 .. 255 ] characters Example: spaceship.com A domain name whose details should be fetched. The domain name must be provided in a fully qualified domain format. |
const url = 'https://spaceship.dev/api/v1/domains/spaceship.com/personal-nameservers'; const options = { method: 'GET', headers: {'X-API-Key': 'REPLACE_KEY_VALUE', 'X-API-Secret': 'REPLACE_KEY_VALUE'} }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err));
{- "records": [
- {
- "host": "ns1",
- "ips": [
- "127.0.0.1",
- "127.0.0.2"
]
}, - {
- "host": "ns2",
- "ips": [
- "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
]
}
]
}
The provided information is for preliminary familiarization only. Once the API is implemented, this notice will be removed.
Personal nameservers consist of A records for a specific host and glue records at the domain registry.
domain required | string <domain> [ 4 .. 255 ] characters Example: spaceship.com Domain name whose details should be fetched. The domain name must be provided in a fully qualified domain format. |
currentHost required | string <hostname> [ 1 .. 255 ] characters Example: api.www The host name part of the nameserver. For example, for |
const url = 'https://spaceship.dev/api/v1/domains/spaceship.com/personal-nameservers/api.www'; const options = { method: 'GET', headers: {'X-API-Key': 'REPLACE_KEY_VALUE', 'X-API-Secret': 'REPLACE_KEY_VALUE'} }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err));
{- "ips": [
- "127.2.2.2",
- "12.22.22.21"
]
}
Update the configuration for personal nameservers associated with a specific domain.
If the host in the request body differs from the host in the path, this operation will rename the host and update the IP addresses, making the old host return a 404.
Personal nameservers are a combination of A records set for a specific host and glue records set for the domain on the registry.
domain required | string <domain> [ 4 .. 255 ] characters Example: spaceship.com The domain name in fully qualified format whose nameserver configuration should be updated |
currentHost required | string <hostname> [ 1 .. 255 ] characters Example: api.www The host name part of the nameserver. For example, for |
host required | string <hostname> [ 1 .. 255 ] characters The host name of the personal nameserver |
ips required | Array of strings <ip> (ipAddress) [ 1 .. 16 ] items [ items <ip > <= 39 characters ] List of IP addresses associated with the personal nameserver host |
{- "host": "ns1",
- "ips": [
- "127.2.2.2",
- "12.22.22.21"
]
}
{- "host": "ns1",
- "ips": [
- "127.2.2.2",
- "12.22.22.21"
]
}
Delete the personal nameservers host configuration for a specific domain.
Personal nameservers are a combination of A records set for a specific host and glue records set for the domain on the registry.
domain required | string <domain> [ 4 .. 255 ] characters Example: spaceship.com Domain name in a fully qualified format whose personal nameservers host should be deleted |
currentHost required | string <hostname> [ 1 .. 255 ] characters Example: api.www The host name part of the nameserver. For example, for |
const url = 'https://spaceship.dev/api/v1/domains/spaceship.com/personal-nameservers/api.www'; const options = { method: 'DELETE', headers: {'X-API-Key': 'REPLACE_KEY_VALUE', 'X-API-Secret': 'REPLACE_KEY_VALUE'} }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err));
{- "detail": "string"
}
Allows the modification of a domain's email protection preference.
domain required | string <domain> [ 4 .. 255 ] characters Example: spaceship.com The domain whose email protection preference is being updated. |
Provides the new email protection level for the domain.
contactForm required | boolean Indicates whether WHOIS should display the contact form link |
{- "contactForm": true
}
{- "detail": "string"
}
Allows the modification of a domain's privacy preference.
domain required | string <domain> [ 4 .. 255 ] characters Example: spaceship.com The domain whose privacy preference is being updated. |
Provides the new privacy level for the domain.
privacyLevel required | string Enum: "public" "high" Describes privacy preference for the domain |
userConsent required | boolean Expresses the user's consent for privacy changes. The operation will be performed ONLY if the flag is 'true'. |
{- "privacyLevel": "high",
- "userConsent": true
}
{- "detail": "string"
}
Get the domain's auth code, also known as EPP code, authorization code, transfer code or Auth-Info Code.
domain required | string <domain> [ 4 .. 255 ] characters Example: spaceship.com The domain whose auth code is to be returned. |
const url = 'https://spaceship.dev/api/v1/domains/spaceship.com/transfer/auth-code'; const options = { method: 'GET', headers: {'X-API-Key': 'REPLACE_KEY_VALUE', 'X-API-Secret': 'REPLACE_KEY_VALUE'} }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err));
{- "authCode": "7d5 1debf %^$%#",
- "expires": "1970-01-01T00:00:00.000Z"
}
Allows the modification of a domain transfer lock.
domain required | string <domain> [ 4 .. 255 ] characters Example: spaceship.com The domain whose transfer lock is being updated. |
Provides the new trnasfer lock for the domain.
isLocked required | boolean Describes transfer lock for the domain |
{- "isLocked": true
}
{- "isLocked": true
}
Save details for the contact and return the generated contact ID.
Key-value pairs with contact details
firstName required | string [ 1 .. 125 ] characters ^['A-Za-z-][\s'A-Z`a-z-]+['A-Za-z-]$|^['A-Za-... Contact's first name |
lastName required | string [ 1 .. 125 ] characters ^['A-Za-z-][\s'A-Z`a-z-]+['A-Za-z-]$|^['A-Za-... Contact's last name |
organization | string <= 255 characters ^(?!\s)[\u0000-\u007F]{2,}(?!\s)[\u0000-\u007... Organization/Company name |
email required | string <email> [ 3 .. 255 ] characters |
address1 required | string <= 255 characters ^[\d#&'()./:;A-Za-z\s-,\\]+$ Address (line 1) |
address2 | string <= 255 characters ^[\d#&'()./:;A-Za-z\s-,\\]+$ Address (line 2) |
city required | string <= 255 characters ^['.A-Za-z-][\s'.A-Za-z-]+['.A-Za-z-]$|^['.A-... City |
country required | string (countryCode) = 2 characters ^[A-Z]{2}$ Country code (ISO 3166-1 alpha-2) |
stateProvince | string <= 255 characters ^['A-Za-z-][\s'A-Z`a-z-]+['A-Za-z-]$|^['A-Za-... State province name |
postalCode | string <= 16 characters ^[\dA-Za-z-][\d\sA-Za-z-]+[\dA-Za-z-]$|^[\dA-... Postal code |
phone required | string (phone) [ 7 .. 17 ] characters ^\+\d{1,3}\.\d{4,}$ Phone number |
phoneExt | string <= 7 characters ^\d{0,7}$ Phone number extension |
fax | string [ 7 .. 17 ] characters ^\+\d{1,3}\.\d{4,}$ Fax number |
faxExt | string <= 7 characters ^\d{0,7}$ Fax number extension |
taxNumber | string <taxNumber> <= 255 characters ^[\d./A-Za-z-][\d\s./A-Za-z-]+[\d./A-Za-z-]$|... Tax number |
{- "firstName": "John",
- "lastName": "Doe",
- "organization": "My Company",
- "address1": "286 King St.",
- "address2": "string",
- "city": "San Francisco",
- "country": "US",
- "stateProvince": "CA",
- "postalCode": "94107",
- "phone": "+1.123456789",
- "phoneExt": "256",
- "fax": "+1.123456789",
- "faxExt": "256",
- "taxNumber": "123456789"
}
{- "contactId": "stringstringstringstringstr"
}
Read details of the contact by contact ID.
contact required | string [ 27 .. 32 ] characters [a-zA-Z0-9]+ Example: 1ZdMXpapqp9sle5dl8BlppTJXAzf5 Contact ID |
const url = 'https://spaceship.dev/api/v1/contacts/1ZdMXpapqp9sle5dl8BlppTJXAzf5'; const options = { method: 'GET', headers: {'X-API-Key': 'REPLACE_KEY_VALUE', 'X-API-Secret': 'REPLACE_KEY_VALUE'} }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err));
{- "firstName": "John",
- "lastName": "Doe",
- "organization": "My Company",
- "address1": "286 King St.",
- "address2": "string",
- "city": "San Francisco",
- "country": "US",
- "stateProvince": "CA",
- "postalCode": "94107",
- "phone": "+1.123456789",
- "phoneExt": "256",
- "fax": "+1.123456789",
- "faxExt": "256",
- "taxNumber": "123456789"
}
The provided information is for preliminary familiarization only. Once the API is implemented, this notice will be removed.
Details
type required | string [ 2 .. 32 ] characters \w+ |
euAdrLang required | string (language) = 2 characters [a-z]{2} Language (iso 639) |
isNaturalPerson required | boolean Indicates if person is private individual |
{- "type": "eu",
- "euAdrLang": "en",
- "isNaturalPerson": true
}
"1ZdMXpapqp9sle5dl8BlppTJXAzf5"
The provided information is for preliminary familiarization only. Once the API is implemented, this notice will be removed.
contact required | string [ 27 .. 32 ] characters [a-zA-Z0-9]+ Example: 1ZdMXpapqp9sle5dl8BlppTJXAzf5 Contact ID |
const url = 'https://spaceship.dev/api/v1/contacts/attributes/1ZdMXpapqp9sle5dl8BlppTJXAzf5'; const options = { method: 'GET', headers: {'X-API-Key': 'REPLACE_KEY_VALUE', 'X-API-Secret': 'REPLACE_KEY_VALUE'} }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err));
{- "type": "eu",
- "euAdrLang": "en",
- "isNaturalPerson": true
}
Add custom DNS resource records or update TTL. Records are matched using case-insensitive comparison, except for TXT records.
domain required | string <domain> [ 4 .. 255 ] characters Example: spaceship.com The domain whose resource records are being updated. |
force | boolean Turn-off conflicts resolution checker and force zone update |
required | Array of objects (ResourceRecordsListCreateOrUpdateItem) [ 1 .. 500 ] items |
{- "force": true,
- "items": [
- {
- "type": "A",
- "address": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
- "name": "@",
- "ttl": 3600
}
]
}
{- "detail": "string"
}
Delete custom DNS resource records. Records matched using case-insensitive comparison, except for TXT records, which are case-sensitive.
domain required | string <domain> [ 4 .. 255 ] characters Example: spaceship.com The domain whose resource records are being deleted. |
Records
type required | string [ 1 .. 5 ] characters \w+ |
address required | string <ipv6> (ipV6Address) <= 39 characters IPv6 address |
name required | string [ 1 .. 255 ] characters [a-zA-Z\-\.@\*]{1,255} Name of resource record excluding domain name part. '@' can be used as an apex domain |
[- {
- "type": "A",
- "address": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
- "name": "@"
}
]
{- "detail": "string"
}
Retrieves a paginated list of resource records, allowing the use of query parameters to customize the response. This operation is essential for efficiently managing large collections of resource records, enabling smooth navigation and retrieval without overloading the system with unnecessary data.
domain required | string <domain> [ 4 .. 255 ] characters Example: spaceship.com The domain whose resource records are being fetched. |
take required | integer <int32> [ 1 .. 500 ] Number of response items per page |
skip required | integer <int32> [ 0 .. 2147483647 ] Number of response items to skip |
orderBy | Array of strings <= 1 items Items Enum: "type" "-type" "name" "-name" Specifies fields and order to sort the response items |
const url = 'https://spaceship.dev/api/v1/dns/records/spaceship.com?take=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&orderBy=SOME_ARRAY_VALUE'; const options = { method: 'GET', headers: {'X-API-Key': 'REPLACE_KEY_VALUE', 'X-API-Secret': 'REPLACE_KEY_VALUE'} }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err));
{- "items": [
- {
- "type": "A",
- "name": "@",
- "ttl": 3600,
- "group": {
- "type": "custom"
}
}
], - "total": 100
}