### JSON Response Example Source: https://docs.spaceship.dev/ Example of a successful JSON response when retrieving a domain transfer authorization code. ```json { "authCode": "abc@#$123%^&def", "expires": "2100-01-01T00:00:00.000Z" } ``` -------------------------------- ### Get Domain Transfer Details (JavaScript) Source: https://docs.spaceship.dev/ Example of how to fetch the details of an ongoing domain transfer using JavaScript's fetch API. Ensure you replace placeholder API keys. ```javascript const url = 'https://spaceship.dev/api/v1/domains/spaceship.com/transfer'; 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)); ``` -------------------------------- ### Domain list response structure Source: https://docs.spaceship.dev/ Example JSON response body for the GET /v1/domains endpoint. ```json { "items": [ { "name": "xn--spceship-9ya.com", "unicodeName": "spaceship.com", "isPremium": false, "autoRenew": false, "registrationDate": "2100-01-01T00:00:00.000Z", "expirationDate": "2100-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 } ``` -------------------------------- ### Response schema for fetching nameservers Source: https://docs.spaceship.dev/ Example JSON response structure for a successful nameserver fetch request. ```json { "ips": [ "127.2.2.2", "12.22.22.21" ] } ``` -------------------------------- ### Fetch personal nameservers host details Source: https://docs.spaceship.dev/ Retrieves the configuration for a specific personal nameserver host using a GET request. ```javascript 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)); ``` -------------------------------- ### Update personal nameservers host configuration Source: https://docs.spaceship.dev/ Example JSON payload for updating the host and IP addresses of a personal nameserver. ```json { "host": "ns1", "ips": [ "127.2.2.2", "12.22.22.21" ] } ``` -------------------------------- ### GET /v1/domains/{domain}/personal-nameservers/{currentHost} Source: https://docs.spaceship.dev/ Retrieves the details of a specific personal nameserver host for a given domain. ```APIDOC ## GET /v1/domains/{domain}/personal-nameservers/{currentHost} ### Description Fetches the configuration details for a personal nameserver host associated with a specific domain. ### Method GET ### Endpoint https://spaceship.dev/api/v1/domains/{domain}/personal-nameservers/{currentHost} ### Parameters #### Path Parameters - **domain** (string) - Required - The domain name in fully qualified format. - **currentHost** (string) - Required - The host name part of the nameserver. ### Response #### Success Response (200) - **ips** (Array of strings) - List of IP addresses associated with the personal nameserver host. #### Response Example { "ips": [ "127.2.2.2", "12.22.22.21" ] } ``` -------------------------------- ### GET /v1/domains/{domain}/personal-nameservers Source: https://docs.spaceship.dev/ Retrieves the personal nameservers configured for a specific domain. ```APIDOC ## GET /v1/domains/{domain}/personal-nameservers ### Description 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. ### Method GET ### Endpoint /v1/domains/{domain}/personal-nameservers ### Parameters #### Path Parameters - **domain** (string) - Required - A domain name whose details should be fetched. The domain name must be provided in a fully qualified domain format. ### Request Example ```javascript 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)); ``` ### Response #### Success Response (200) Personal nameservers for the domain retrieved successfully. The response confirms that the domain's DNS settings have been modified. - **records** (Array of objects) - Description - **host** (string) - Description - **ips** (Array of strings) - Description #### Response Example ```json { "records": [ { "host": "ns1", "ips": [ "127.0.0.1", "127.0.0.2" ] }, { "host": "ns2", "ips": [ "2001:0db8:85a3:0000:0000:8a2e:0370:7334" ] } ] } ``` ### Error Handling - **400**: The request is invalid. - **401**: The user's request was not authorized properly. - **403**: The user's request not allowed to perform this action with the current scopes. - **404**: The requested object was not found. - **422**: The entity is unprocessable. - **429**: The response indicates that the rate limit for the API has been exceeded. It includes details about the rate limit, like the number of requests left and the time the rate limit window resets. - **500**: The infrastructure encountered an error. ### Rate Limits - The limit for fetching personal nameservers for a domain is 5 requests per domain within 300 seconds. ``` -------------------------------- ### Domain response schema Source: https://docs.spaceship.dev/ Example JSON response structure for domain operations. ```json { "name": "xn--spceship-9ya.com", "unicodeName": "spaceship.com", "displayName": "SpaceShip.com", "description": "Premium domain for sale", "status": "failed", "minPrice": { "amount": "10.99", "currency": "USD" }, "binPrice": { "amount": "10.99", "currency": "USD" }, "binPriceEnabled": true, "minPriceEnabled": true } ``` -------------------------------- ### Check domain availability response structure Source: https://docs.spaceship.dev/ Example JSON response body for the POST /v1/domains/available endpoint. ```json { "domains": [ { "domain": "spaceship.dev", "result": "available", "premiumPricing": [ { "operation": "register", "price": 10.99, "currency": "USD" } ] } ] } ``` -------------------------------- ### GET /v1/domains/{domain}/personal-nameservers/configuration Source: https://docs.spaceship.dev/ Retrieves the configuration for personal nameservers associated with a specific domain. This API is currently under development. ```APIDOC ## GET /v1/domains/{domain}/personal-nameservers/configuration ### Description Get the configuration for personal nameservers associated with a specific domain. Personal nameservers consist of A records for a specific host and glue records at the domain registry. This API is under development and currently returns an HTTP 501 status. ### Method GET ### Endpoint /v1/domains/{domain}/personal-nameservers/configuration ### Parameters #### Path Parameters - **domain** (string) - Required - A domain name whose details should be fetched. The domain name must be provided in a fully qualified domain format. ### Required Permissions - domains:read ### Authorizations (_apiKey_ _apiSecret_) ### Note This API is under development and currently returns an HTTP 501 status. The provided information is for preliminary familiarization only. Once the API is implemented, this notice will be removed. ``` -------------------------------- ### GET /v1/domains/{domain} Source: https://docs.spaceship.dev/ Retrieves detailed information about a specific domain. ```APIDOC ## GET /v1/domains/{domain} ### Description Retrieves detailed information about a specific domain. ### Method GET ### Endpoint https://spaceship.dev/api/v1/domains/{domain} ### Parameters #### Path Parameters - **domain** (string) - Required - Domain name in ASCII format (A-label). ### Response #### Success Response (200) - **name** (string) - Domain name - **unicodeName** (string) - Unicode representation of the domain - **isPremium** (boolean) - Premium status - **autoRenew** (boolean) - Auto-renew status - **registrationDate** (string) - Registration date - **expirationDate** (string) - Expiration date - **lifecycleStatus** (string) - Current lifecycle status - **verificationStatus** (string) - Verification status - **eppStatuses** (array) - List of EPP statuses - **suspensions** (array) - List of suspension details - **privacyProtection** (object) - Privacy protection settings - **nameservers** (object) - Nameserver configuration - **contacts** (object) - Domain contact information ``` -------------------------------- ### GET /v1/domains/{domain} Source: https://docs.spaceship.dev/ Retrieves detailed information for a specific domain. ```APIDOC ## GET /v1/domains/{domain} ### Description Get details of a specific domain. ### Method GET ### Endpoint https://spaceship.dev/api/v1/domains/{domain} ### Parameters #### Path Parameters - **domain** (string) - Required - Domain name in ASCII format ``` -------------------------------- ### GET /v1/dns/records/{domain} Source: https://docs.spaceship.dev/ Retrieves a paginated list of resource records for a domain. ```APIDOC ## GET /v1/dns/records/{domain} ### Description Retrieves a paginated list of resource records, allowing the use of query parameters to customize the response. ### Method GET ### Endpoint /v1/dns/records/{domain} ### Parameters #### Path Parameters - **domain** (string) - Required - The domain whose resource records are being fetched. #### Query Parameters - **take** (integer) - Required - Number of response items per page. - **skip** (integer) - Required - Number of response items to skip. - **orderBy** (array) - Optional - Specifies fields and order to sort the response items. ``` -------------------------------- ### GET /v1/domains Source: https://docs.spaceship.dev/ Retrieves a list of domains associated with the account. ```APIDOC ## GET /v1/domains ### Description Retrieves a list of domains. ### Method GET ### Endpoint https://spaceship.dev/api/v1/domains ### Parameters #### Query Parameters - **take** (integer) - Optional - Number of items to take - **skip** (integer) - Optional - Number of items to skip - **orderBy** (array) - Optional - Sorting criteria ### Response #### Success Response (200) - **items** (array) - List of domain objects - **total** (integer) - Total count of domains #### Response Example { "items": [ { "name": "xn--spceship-9ya.com", "unicodeName": "spaceship.com", "isPremium": false } ], "total": 100 } ``` -------------------------------- ### GET /v1/dns/records/{domain} Source: https://docs.spaceship.dev/ Retrieves a list of DNS records for a specified domain. ```APIDOC ## GET /v1/dns/records/{domain} ### Description Retrieves the DNS resource records for the specified domain. ### Method GET ### Endpoint https://spaceship.dev/api/v1/dns/records/{domain} ### Parameters #### Path Parameters - **domain** (string) - Required - The domain name to fetch records for. #### Query Parameters - **take** (integer) - Optional - Number of response items per page. - **skip** (integer) - Optional - Number of response items to skip. - **orderBy** (array) - Optional - Sorting criteria. ### Response #### Success Response (200) - **items** (array) - List of DNS records. - **total** (integer) - Total count of records. #### Response Example { "items": [ { "type": "A", "name": "@", "ttl": 3600, "group": { "type": "custom" } } ], "total": 100 } ``` -------------------------------- ### GET /v1/domains/{domain}/availability Source: https://docs.spaceship.dev/ Check the availability of a single domain. ```APIDOC ## GET /v1/domains/{domain}/availability ### Description Check single domain availability. ### Method GET ### Endpoint https://spaceship.dev/api/v1/domains/{domain}/availability ### Parameters #### Path Parameters - **domain** (string) - Required - 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. ``` -------------------------------- ### Check Domain Availability Request Source: https://docs.spaceship.dev/ Example request to check if a domain is available using the fetch API. ```javascript const url = 'https://spaceship.dev/api/v1/domains/spaceship.com/available'; 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)); ``` -------------------------------- ### Restore Domain Request - JavaScript Source: https://docs.spaceship.dev/ Example of how to request domain restoration using JavaScript's fetch API. Ensure to replace placeholder API keys. ```javascript const url = 'https://spaceship.dev/api/v1/domains/spaceship.com/restore'; const options = { method: 'POST', 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)); ``` -------------------------------- ### GET /v1/domains/{domain}/available Source: https://docs.spaceship.dev/ Checks the availability of a specific domain name. ```APIDOC ## GET /v1/domains/{domain}/available ### Description Checks if a domain is available for registration and provides premium pricing information if applicable. ### Method GET ### Endpoint https://spaceship.dev/api/v1/domains/{domain}/available ### Parameters #### Path Parameters - **domain** (string) - Required - The domain to check for availability. ### Response #### Success Response (200) - **domain** (string) - The domain name checked. - **result** (string) - Availability status (e.g., "available"). - **premiumPricing** (array) - List of pricing objects for registration. #### Response Example { "domain": "spaceship.dev", "result": "available", "premiumPricing": [ { "operation": "register", "price": 10.99, "currency": "USD" } ] } ``` -------------------------------- ### GET /v1/sellerhub/domains/{domain} Source: https://docs.spaceship.dev/ Retrieves the details and configuration of a specific domain in SellerHub. ```APIDOC ## GET /v1/sellerhub/domains/{domain} ### Description Retrieves the configuration and status of a specific domain from the SellerHub. ### Method GET ### Endpoint https://spaceship.dev/api/v1/sellerhub/domains/{domain} ### Parameters #### Path Parameters - **domain** (string) - Required - The domain name (4-255 characters). ### Response #### Success Response (200) - **name** (string) - Punycode domain name - **unicodeName** (string) - Unicode domain name - **displayName** (string) - Display name for the domain - **description** (string) - Domain description - **status** (string) - Current status of the domain - **minPrice** (object) - Minimum offer price - **binPrice** (object) - Buy It Now price - **binPriceEnabled** (boolean) - BIN status - **minPriceEnabled** (boolean) - Negotiation status #### Response Example { "name": "xn--spceship-9ya.com", "unicodeName": "spaceship.com", "displayName": "SpaceShip.com", "description": "Premium domain for sale", "status": "failed", "minPrice": { "amount": "10.99", "currency": "USD" }, "binPrice": { "amount": "10.99", "currency": "USD" }, "binPriceEnabled": true, "minPriceEnabled": true } ``` -------------------------------- ### GET /v1/sellerhub/verification-records Source: https://docs.spaceship.dev/ Retrieves verification options for domain ownership verification in SellerHub. ```APIDOC ## GET /v1/sellerhub/verification-records ### Description Returns verification options for domain ownership verification in SellerHub. Users can choose one option and create all associated DNS records to verify domain ownership. ### Method GET ### Endpoint https://spaceship.dev/api/v1/sellerhub/verification-records ### Response #### Success Response (200) - **options** (array) - List of verification options, each containing a list of DNS records. #### Response Example { "options": [ { "records": [ { "type": "TXT", "name": "@", "value": "spaceship-verification-token-abc123" } ] } ] } ``` -------------------------------- ### Read Contact Details via JavaScript Source: https://docs.spaceship.dev/ Example using the fetch API to retrieve contact information by ID. Requires valid API key and secret headers. ```javascript 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)); ``` -------------------------------- ### Verification Records Response Example Source: https://docs.spaceship.dev/ This JSON structure details the verification options and records required for domain ownership verification in SellerHub. It includes different record types like TXT and AAAA. ```json { "options": [ { "records": [ { "type": "TXT", "name": "@", "value": "spaceship-verification-token-abc123" } ] }, { "records": [ { "type": "A", "name": "_spaceship_verify", "value": "192.0.2.1" }, { "type": "AAAA", "name": "_spaceship_verify", "value": "2001:db8::1" } ] } ] } ``` -------------------------------- ### Read attribute details request Source: https://docs.spaceship.dev/ Example using fetch to retrieve contact attribute details by ID. ```javascript 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)); ``` -------------------------------- ### Check domain availability request payload Source: https://docs.spaceship.dev/ Example JSON request body for checking domain availability. ```json { "domains": [ "spaceship.dev" ] } ``` -------------------------------- ### GET /v1/sellerhub/domains/{domain} Source: https://docs.spaceship.dev/ Retrieves detailed information about a specific domain in SellerHub. Requires `sellerhub:read` permissions. ```APIDOC ## GET /v1/sellerhub/domains/{domain} ### Description Retrieves detailed information about a specific domain in SellerHub. Requires `sellerhub:read` permissions. ### Method GET ### Endpoint https://spaceship.dev/api/v1/sellerhub/domains/{domain} ### Path Parameters - **domain** (string) - Required - Domain name (4-255 characters). Example: spaceship.com ### Response #### Success Response (200) - **name** (string) - The domain's name. - **unicodeName** (string) - The Unicode representation of the domain name. - **displayName** (string) - The display name of the domain. - **description** (string) - The description of the domain. - **status** (string) - The status of the domain listing. - **minPrice** (object) - The minimum offer price. - **amount** (string) - The price amount. - **currency** (string) - The currency of the price. - **binPrice** (object) - The Buy It Now (BIN) price. - **amount** (string) - The price amount. - **currency** (string) - The currency of the price. - **binPriceEnabled** (boolean) - Indicates if BIN is enabled. - **minPriceEnabled** (boolean) - Indicates if minimum price negotiation is enabled. #### Response Example ```json { "name": "xn--spceship-9ya.com", "unicodeName": "spaceship.com", "displayName": "SpaceShip.com", "description": "Premium domain for sale", "status": "failed", "minPrice": { "amount": "10.99", "currency": "USD" }, "binPrice": { "amount": "10.99", "currency": "USD" }, "binPriceEnabled": true, "minPriceEnabled": true } ``` ``` -------------------------------- ### GET /v1/domains/{domain}/transfer Source: https://docs.spaceship.dev/ Retrieves the current status and details of an ongoing domain transfer. ```APIDOC ## GET /v1/domains/{domain}/transfer ### Description Get the details of the ongoing domain transfer for a specific domain. ### Method GET ### Endpoint /v1/domains/{domain}/transfer ### Parameters #### Path Parameters - **domain** (string) - Required - The domain whose transfer details are to be returned. ### Response #### Success Response (200) - **startedAt** (string) - Timestamp when the transfer started. - **finishedAt** (string) - Timestamp when the transfer finished. - **direction** (string) - Direction of the transfer (e.g., 'in'). - **status** (string) - Current status of the transfer (e.g., 'pending'). #### Response Example { "startedAt": "2100-01-01T00:00:00.000Z", "finishedAt": "2100-01-01T00:00:00.000Z", "direction": "in", "status": "pending" } ``` -------------------------------- ### Retrieve a SellerHub domain Source: https://docs.spaceship.dev/ Fetches domain details using the GET method. Requires X-API-Key and X-API-Secret headers. ```javascript const url = 'https://spaceship.dev/api/v1/sellerhub/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)); ``` -------------------------------- ### GET /v1/sellerhub/domains Source: https://docs.spaceship.dev/ Retrieves a list of Seller Hub domains. Supports pagination with `take` and `skip` query parameters. ```APIDOC ## GET /v1/sellerhub/domains ### Description Retrieves a list of Seller Hub domains. Supports pagination with `take` and `skip` query parameters. ### Method GET ### Endpoint https://spaceship.dev/api/v1/sellerhub/domains ### Query Parameters - **take** (integer) - Optional - The number of items to return per page. - **skip** (integer) - Optional - The number of items to skip before starting to collect the result set. ### Request Example ```javascript const url = 'https://spaceship.dev/api/v1/sellerhub/domains?take=SOME_INTEGER_VALUE&skip=SOME_INTEGER_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)); ``` ### Response #### Success Response (200) - **items** (array) - A list of domain objects. - **total** (integer) - The total number of domains available. #### Response Example ```json { "items": [ { "name": "xn--spceship-9ya.com", "unicodeName": "spaceship.com", "displayName": "SpaceShip.com", "description": "Premium domain for sale", "status": "failed", "minPrice": { "amount": "10.99", "currency": "USD" }, "binPrice": { "amount": "10.99", "currency": "USD" }, "binPriceEnabled": true, "minPriceEnabled": true } ], "total": 100 } ``` ``` -------------------------------- ### GET /v1/domains/{domain}/transfer/auth-code Source: https://docs.spaceship.dev/ Retrieves the authorization code for transferring a domain. This code is required to initiate a domain transfer away from Spaceship. ```APIDOC ## GET /v1/domains/{domain}/transfer/auth-code ### Description Retrieves the authorization code for transferring a domain. This code is required to initiate a domain transfer away from Spaceship. ### Method GET ### Endpoint /v1/domains/{domain}/transfer/auth-code ### Parameters #### Path Parameters - **domain** (string) - Required - The domain whose transfer authorization code is being requested. Example: spaceship.com ### Request Example ```javascript 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)); ``` ### Response #### Success Response (200) - **authCode** (string) - The authorization code for domain transfer. - **expires** (string) - The expiration date and time of the authorization code in ISO 8601 format. #### Response Example ```json { "authCode": "abc@#$123%^&def", "expires": "2100-01-01T00:00:00.000Z" } ``` ``` -------------------------------- ### GET /api/v1/domains Source: https://docs.spaceship.dev/ Retrieves a paginated list of domains, allowing the use of query parameters to customize the response. Essential for managing large collections of domains. ```APIDOC ## GET /api/v1/domains ### Description 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. ### Required Permissions * domains:read ### Rate Limits * The limit for fetching a domain list is 300 requests per user, within 300 seconds. ### Method GET ### Endpoint /api/v1/domains ### Query Parameters - **take** (integer) - Required - Number of response items per page. Max: 100. - **skip** (integer) - Required - Number of response items to skip. Min: 0. - **orderBy** (Array of strings) - Optional - Specifies fields and order to sort the response items. Allowed values: "name", "-name", "unicodeName", "-unicodeName", "registrationDate", "-registrationDate", "expirationDate", "-expirationDate". Max items: 1. ### Authorizations (_apiKey_ _apiSecret_) ### Request Example ```bash curl -X GET '/api/v1/domains?take=20&skip=0&orderBy=name' \ -H 'X-Api-Secret: YOUR_SECRET' \ -H 'X-Api-Key: YOUR_KEY' ``` ### Success Response (200) - **domains** (Array) - List of domain objects. - **totalCount** (integer) - Total number of domains available. ### Response Example ```json { "domains": [ { "name": "example.com", "unicodeName": "example.com", "registrationDate": "2023-01-01T00:00:00Z", "expirationDate": "2024-01-01T00:00:00Z", "status": "active" } ], "totalCount": 100 } ``` ``` -------------------------------- ### Get Verification Records - JavaScript Source: https://docs.spaceship.dev/ Retrieve verification records for domain ownership verification in SellerHub. This is required for adding external domains. Replace placeholder API keys with your actual credentials. ```javascript const url = 'https://spaceship.dev/api/v1/sellerhub/verification-records'; 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)); ``` -------------------------------- ### POST /v1/sellerhub/domains Source: https://docs.spaceship.dev/ Creates a new domain listing in SellerHub. Requires `sellerhub:write` permissions. ```APIDOC ## POST /v1/sellerhub/domains ### Description Creates a new domain listing in SellerHub. Requires `sellerhub:write` permissions. ### Method POST ### Endpoint https://spaceship.dev/api/v1/sellerhub/domains ### Request Body - **description** (string) - Required - Domain description (max 5000 characters). - **displayName** (string) - Required - Display name for the domain (4-255 characters). - **binPriceEnabled** (boolean) - Optional - Enable or disable the Buy It Now (BIN) option. - **binPrice** (object) - Optional - Buy It Now (BIN) price for the domain. - **amount** (string) - Required - The price amount. - **currency** (string) - Required - The currency of the price (e.g., USD). - **minPriceEnabled** (boolean) - Optional - Enable or disable offer negotiation with minimum price. - **minPrice** (object) - Optional - Minimum offer price for the domain. - **amount** (string) - Required - The price amount. - **currency** (string) - Required - The currency of the price (e.g., USD). - **name** (string) - Required - Domain name in Unicode format (4-255 characters). ### Request Example ```json { "description": "Premium domain for sale", "displayName": "SpaceShip.com", "binPriceEnabled": true, "binPrice": { "amount": "10.99", "currency": "USD" }, "minPriceEnabled": true, "minPrice": { "amount": "10.99", "currency": "USD" }, "name": "spaceship.com" } ``` ### Response #### Success Response (201) - **name** (string) - The created domain's name. - **unicodeName** (string) - The Unicode representation of the domain name. - **displayName** (string) - The display name of the domain. - **description** (string) - The description of the domain. - **status** (string) - The status of the domain listing. - **minPrice** (object) - The minimum offer price. - **amount** (string) - The price amount. - **currency** (string) - The currency of the price. - **binPrice** (object) - The Buy It Now (BIN) price. - **amount** (string) - The price amount. - **currency** (string) - The currency of the price. - **binPriceEnabled** (boolean) - Indicates if BIN is enabled. - **minPriceEnabled** (boolean) - Indicates if minimum price negotiation is enabled. #### Response Example ```json { "name": "xn--spceship-9ya.com", "unicodeName": "spaceship.com", "displayName": "SpaceShip.com", "description": "Premium domain for sale", "status": "failed", "minPrice": { "amount": "10.99", "currency": "USD" }, "binPrice": { "amount": "10.99", "currency": "USD" }, "binPriceEnabled": true, "minPriceEnabled": true } ``` ``` -------------------------------- ### GET /v1/contacts/attributes/{contact} Source: https://docs.spaceship.dev/ Read attribute details by contact ID. ```APIDOC ## GET /v1/contacts/attributes/{contact} ### Description Read attribute details by contact ID. ### Method GET ### Endpoint /v1/contacts/attributes/{contact} ### Parameters #### Path Parameters - **contact** (string) - Required - [ 27 .. 32 ] characters, Contact ID ### Response #### Success Response (200) - **type** (string) - The type of contact attribute. - **agreementValue** (boolean) - The agreement status. - **language** (string) - The language code. - **registrantCiraCategory** (string) - The Cira category. #### Response Example { "type": "ca", "agreementValue": true, "language": "EN", "registrantCiraCategory": "CCT" } ``` -------------------------------- ### POST /v1/domains/{domain} Source: https://docs.spaceship.dev/ Register a new domain with specified options including renewal, privacy protection, and contact information. ```APIDOC ## POST /v1/domains/{domain} ### Description Register a new domain with specified options including renewal, privacy protection, and contact information. ### Method POST ### Endpoint https://spaceship.dev/api/v1/domains/{domain} ### Parameters #### Path Parameters - **domain** (string) - Required - The domain name to register. #### Request Body - **autoRenew** (boolean) - Required - Specifies whether automatic renewal will be enabled for the domain. - **years** (integer) - Required - Number of years to register the domain (1-10). - **privacyProtection** (object) - Required - Privacy protection options. - **level** (string) - Optional - The level of privacy protection. - **userConsent** (boolean) - Optional - User consent for privacy protection. - **contacts** (object) - Required - Domain contacts specified using contact IDs. - **registrant** (string) - Required - Contact ID for the registrant. - **admin** (string) - Required - Contact ID for the admin. - **tech** (string) - Required - Contact ID for the technical contact. - **billing** (string) - Required - Contact ID for the billing contact. - **attributes** (array) - Optional - List of contact attribute IDs. ### Request Example ```json { "autoRenew": false, "years": 1, "privacyProtection": { "level": "high", "userConsent": true }, "contacts": { "registrant": "1ZdMXpapqp9sle5dl8BlppTJXAzf5", "admin": "1ZdMXpapqp9sle5dl8BlppTJXAzf6", "tech": "1ZdMXpapqp9sle5sle5dl8BlppTJXAzf5", "billing": "1ZdMXpapqp9sle5dl8BlppTJXAzf5", "attributes": [ "1ZdMXpapqp9sle5dl8BlppTJXAzf8" ] } } ``` ### Response #### Success Response (202) Async operation was created as a result of request processing. #### Error Responses - **400**: The request is invalid. - **401**: The user's request was not authorized properly. - **403**: The user's request not allowed to perform this action with the current scopes. - **404**: The requested object was not found. - **422**: The entity is unprocessable. - **429**: The response indicates that the rate limit for the API has been exceeded. - **500**: The infrastructure encountered an error. ``` -------------------------------- ### Create SellerHub Checkout Link Source: https://docs.spaceship.dev/ This code sample demonstrates how to create a checkout link for a domain listed in SellerHub. You must provide the domain name and optionally specify a base price. The domain must already be listed in SellerHub. ```json { "type": "buyNow", "basePrice": { "amount": "10.99", "currency": "USD" }, "domainName": "example.com" } ``` ```javascript const url = 'https://spaceship.dev/api/v1/sellerhub/checkout-links'; const options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': 'REPLACE_KEY_VALUE', 'X-API-Secret': 'REPLACE_KEY_VALUE' }, body: JSON.stringify({ type: 'buyNow', basePrice: { amount: '10.99', currency: 'USD' }, domainName: 'example.com' }) }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err)); ``` -------------------------------- ### Fetch Personal Nameservers using JavaScript Source: https://docs.spaceship.dev/ This JavaScript code snippet demonstrates how to fetch personal nameserver records for a domain using the Spaceship API. Ensure you replace placeholder API key and secret values. ```javascript 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)); ``` -------------------------------- ### PUT /v1/domains/{domain}/personal-nameservers/{currentHost} Source: https://docs.spaceship.dev/ Updates the configuration for personal nameservers associated with a specific domain, including renaming the host or updating IP addresses. ```APIDOC ## PUT /v1/domains/{domain}/personal-nameservers/{currentHost} ### Description Updates 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. ### Method PUT ### Endpoint https://spaceship.dev/api/v1/domains/{domain}/personal-nameservers/{currentHost} ### Parameters #### Path Parameters - **domain** (string) - Required - The domain name in fully qualified format. - **currentHost** (string) - Required - The host name part of the nameserver. #### Request Body - **host** (string) - Required - The new host name of the personal nameserver. - **ips** (Array of strings) - Required - List of IP addresses associated with the personal nameserver host. ### Request Example { "host": "ns1", "ips": [ "127.2.2.2", "12.22.22.21" ] } ### Response #### Success Response (200) - **host** (string) - The updated host name. - **ips** (Array of strings) - The updated list of IP addresses. #### Response Example { "host": "ns1", "ips": [ "127.2.2.2", "12.22.22.21" ] } ``` -------------------------------- ### POST /v1/domains/{domain}/restore Source: https://docs.spaceship.dev/ Requests the restoration of a previously deleted domain. ```APIDOC ## POST /v1/domains/{domain}/restore ### Description Requests the restoration of a previously deleted domain. ### Method POST ### Endpoint /v1/domains/{domain}/restore ### Parameters #### Path Parameters - **domain** (string) - Required - The domain name to be restored. Example: spaceship.com ### Request Example ```javascript const url = 'https://spaceship.dev/api/v1/domains/spaceship.com/restore'; const options = { method: 'POST', 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)); ``` ### Response #### Success Response (202) Async operation was created as a result of request processing. #### Error Responses - **400** - The request is invalid. - **401** - The user's request was not authorized properly. - **403** - The user's request not allowed to perform this action with the current scopes. - **404** - The requested object was not found. - **422** - The entity is unprocessable. - **429** - The response indicates that the rate limit for the API has been exceeded. ``` -------------------------------- ### POST /v1/domains/available Source: https://docs.spaceship.dev/ Checks the availability of a list of domain names. ```APIDOC ## POST /v1/domains/available ### Description Checks if a list of domains is available for registration. ### Method POST ### Endpoint https://spaceship.dev/api/v1/domains/available ### Parameters #### Request Body - **domains** (array) - Required - List of domain names in ASCII format ### Request Example { "domains": ["spaceship.dev"] } ### Response #### Success Response (200) - **domains** (array) - List of availability results #### Response Example { "domains": [ { "domain": "spaceship.dev", "result": "available", "premiumPricing": [{"operation": "register", "price": 10.99, "currency": "USD"}] } ] } ```