Typed PHP SDK for the Spaceship API.
- Composer package: community-sdks/spaceship-php
- Namespace: CommunitySDKs\Spaceship
composer require community-sdks/spaceship-phpuse CommunitySDKs\Spaceship\Client;
use CommunitySDKs\Spaceship\Config\Config;
$client = new Client(Config::sandbox('API_KEY', 'API_SECRET'));use CommunitySDKs\Spaceship\Client;
use CommunitySDKs\Spaceship\Config\Config;
$config = Config::withCustomEndpoint(
'API_KEY',
'API_SECRET',
'https://spaceship.dev/api'
);
$client = new Client($config);Run the sandbox example templates from the examples/ folder.
Each script shows manual DTO construction with placeholder values you should replace before making real API calls.
PowerShell:
$env:SPACESHIP_API_KEY='your_key'; $env:SPACESHIP_API_SECRET='your_secret'; php examples/DomainsService.phpBash (Mac / Linux / Git Bash):
SPACESHIP_API_KEY=your_key SPACESHIP_API_SECRET=your_secret php examples/DomainsService.phpSee examples/README.md for the available scripts, required environment variables, and notes about replacing placeholder data.
| Service | Description |
|---|---|
| DomainsService | Full domain lifecycle: list, availability checks, create, delete, renew, restore, transfer, contacts, nameservers, privacy, auth code, and transfer lock |
| DNSRecordsService | Manage DNS resource records for domains: save, delete, and list records |
| ContactsService | Save and read registrant and contact details |
| ContactsAttributesService | Save and read extended contact attributes per TLD |
| AsyncOperationsService | Retrieve the status and result of long-running async operations |
| SellerHubService | Manage SellerHub checkout links, domains, pricing, and verification records |
composer install
composer test