Introduction
Scroll down for code samples, example requests and responses.
Welcome to the SpinupWP REST API documentation.
This API is currently in BETA, which means it can change at any time. We highly recommend that you subscribe to the What's New email list to be notified in advance of any updates to the API.
We’ve released a very limited set of endpoints to start so that we can gather input from REST API users. We welcome feedback and suggestions, which can be shared with us in the SpinupWP developer community, or via email.
To get started with our API, you will need a SpinupWP account. If you don't have an account yet, you can sign up for a free trial.
Our API accepts form-encoded request bodies and returns JSON responses. All API requests must be made over HTTPS.
Alternatively, we also have a PHP SDK, which provides an expressive interface for interacting with SpinupWP's API. It includes a pre-defined set of classes for API resources that initialize themselves dynamically from API responses.
Authentication
Request
curl -X GET https://api.spinupwp.app/v1/servers \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
Once you have a SpinupWP account, you will need an API access token to use our API. The API access token must be sent with each request in the Authorization header as a Bearer token. API access tokens can be created for your personal account or as part of a team.
To generate a personal API access token, navigate to the API Tokens tab in your “My Account” settings page in SpinupWP. API access tokens you create via the “My Account” page are only relevant to resources created under your personal account.
If you are a team admin or a team owner, you can also generate access tokens from the API Tokens tab on the “Team Settings” page for any of the teams you own/manage. API access tokens you create via the “Team Settings” page are only relevant for resources associated with that team.
Pagination
Request
curl -X GET https://api.spinupwp.app/v1/servers?page=2 \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$servers = $spinupwp->servers->list();
// Auto-pagination handles fetching lists of resources without having
// to paginate results and perform subsequent requests manually
foreach ($servers as $server) {
// Do something with $server
}
Response
{
"data": [...],
"pagination": {
"previous": "https://api.spinupwp.app/v1/sites?page=1",
"next": "https://api.spinupwp.app/v1/sites?page=3",
"count": 25
}
}
All “list” endpoints include pagination, and have a limit of 10 objects per page. These endpoints will include a top-level pagination object with previous and next links along with a total count of objects.
These endpoints accept a page query parameter, which is the index of the page you want to retrieve. You can also optionally pass a limit parameter between 1 and 100, which is the limit of the number of objects to be returned. The default limit is 10.
Rate Limiting
The SpinupWP API has limit of 60 requests per minute. If you exceed the allowed limit you will receive a 429 Too Many Attempts response. To help you determine if you are approaching the limit we include the X-RateLimit-Limit and X-RateLimit-Remaining headers on each request.
SSH Key
The SSH Key endpoint allows you to retrieve SpinupWP’s public key used for provisioning.
This is particularly useful when provisioning custom servers. By adding this key to your server ahead of time, you ensure that SpinupWP can securely access the server. This SSH key is only used during server provisioning. Once provisioning is complete, the key is removed from the server for security reasons.
Show SSH Key
Request
curl -X GET https://api.spinupwp.app/v1/ssh-key \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$sshKey = $spinupwp->sshKey->get();
echo $sshKey->key;
Response
{
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD..."
}
GET /ssh-key
Retrieves SpinupWP’s SSH Key.
Server Providers
Retrieve metadata
Request
curl -X GET https://api.spinupwp.app/v1/providers/{provider}/metadata \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$metadata = $spinupwp->providers->metadata($provider);
Response
{
"regions": {
"Europe": [
{
"slug": "ams",
"name": "Amsterdam, NL",
"available": true,
"continent": "Europe",
"sizes": [
"vc2-1c-0.5gb-v6"
]
}
]
},
"sizes": [
{
"slug": "vc2-1c-0.5gb-v6",
"type": "basic",
"memory": 512,
"vcpus": 1,
"disk": 10,
"transfer": 0.5,
"priceMonthly": 2.5,
"backupPriceMonthly": 0.5,
"available": true,
"processor": "regular"
}
]
}
GET /providers/{provider}/metadata
List available regions and instance sizes for each supported server provider.
Parameters
(* indicates a required field)
| Name | Type | Description |
|---|---|---|
provider* |
string | Supported values: digitalocean, linode, vultr and hetzner. |
Servers
The Servers endpoint allows you to view servers.
List all servers
Request
curl -X GET https://api.spinupwp.app/v1/servers \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$servers = $spinupwp->servers->list();
Response
{
"data": [
{
"id": 1,
"name": "turnipjuice-media",
"provider_name": "DigitalOcean",
"ubuntu_version": "24.04",
"ip_address": "10.0.0.1",
"ssh_port": 22,
"timezone": "UTC",
"region": "TOR1",
"size": "1 GB / 1 vCPU",
"disk_space": {
"total": 25210576000,
"available": 20966548000,
"used": 4244028000,
"updated_at": "2024-07-01T12:00:00.000000Z"
},
"database": {
"server": "mysql-8.0",
"host": "localhost",
"port": 3306
},
"ssh_publickey": "ssh-rsa AAAA....",
"git_publickey": "ssh-rsa AAAA....",
"connection_status": "connected",
"reboot_required": true,
"upgrade_required": false,
"install_notes": null,
"created_at": "2024-07-01T12:00:00.000000Z",
"status": "provisioned"
}
],
"pagination": {
"previous": null,
"next": "https://api.spinupwp.app/v1/servers?page=2",
"per_page": 10,
"count": 15
}
}
GET /servers
Retrieves a list of servers. Returns a paginated list of Server objects.
Provision a server
Request
curl -X POST https://api.spinupwp.app/v1/servers \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d 'server_provider[id]'=1 \
-d 'server_provider[region]'="tor1" \
-d 'server_provider[size]'="s-1vcpu-1gb" \
-d 'server_provider[enable_backups]'=true \
-d 'hostname'="turnipjuice-media" \
-d 'timezone'="America/Toronto" \
-d 'database[root_password]'="V9ByakWHYgFN"
-d 'post_provision_script'="apt-get install -q -y nodejs; apt-get install -q -y npm;"
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$server = $spinupwp->servers->create([
'server_provider' => [
'id' => 1,
'region' => 'tor1',
'size' => 's-1vcpu-1gb',
'enable_backups' => true,
],
'hostname' => 'turnipjuice-media',
'timezone' => 'America/Toronto',
'database' => [
'root_password' => 'V9ByakWHYgFN',
],
'post_provision_script' => "apt-get install -q -y nodejs; apt-get install -q -y npm;",
]);
Response
{
"event_id": 1,
"data": {
"id": 1,
"name": "turnipjuice-media",
"provider_name": "DigitalOcean",
"ubuntu_version": "24.04",
"ip_address": "10.0.0.1",
"ssh_port": 22,
"timezone": "UTC",
"region": "TOR1",
"size": "1 GB / 1 vCPU",
"disk_space": {
"total": 25210576000,
"available": 20966548000,
"used": 4244028000,
"updated_at": "2024-07-01T12:00:00.000000Z"
},
"database": {
"server": "mysql-8.0",
"host": "localhost",
"port": 3306
},
"ssh_publickey": "ssh-rsa AAAA....",
"git_publickey": "ssh-rsa AAAA....",
"connection_status": "connected",
"reboot_required": true,
"upgrade_required": false,
"install_notes": null,
"created_at": "2024-07-01T12:00:00.000000Z",
"status": "provisioned"
}
}
POST /servers
Provisions a new server. Returns the event_id of the create server event along with the created Server object. On average, it takes 10 minutes for a new server to be provisioned, and we’ll email you once your server is ready. You can check the events endpoint for the event_id to find out when the server has finished provisioning.
Currently supported server providers: DigitalOcean, Vultr, Akamai/Linode, and Hetzner. You must provide either the ID of an existing Server Provider or a valid provider API token.
Parameters
(* indicates a required field)
| Name | Type | Description |
|---|---|---|
server_provider.id |
integer | The ID of the Server Provider where the server should be provisioned. This can be found in the Account Settings in SpinupWP. Required unless using a provider API token. |
server_provider.name |
string | Choose one of the following available options: digitalocean, vultr, linode or hetzner. Required unless using a Server Provider ID. |
server_provider.api_token |
string | A provider API token. Required unless using a Server Provider ID. |
server_provider.region* |
string | The slug of the region where the server will be provisioned. See Server Providers for a list of available regions. |
server_provider.size* |
string | The slug of the size for the server to be provisioned. See Server Providers for a list of available sizes. |
server_provider.enable_backups |
boolean | If backups should be enabled at the server provider level. Each provider manages backups differently. Refer to their documentation for exact behavior and limitations. Defaults to false. |
hostname* |
string | Hostname for the server. Can only contain alphanumeric characters, dashes, and periods. |
timezone |
string | Configures the server’s timezone, which affects when Unix cron jobs run and the date format of some log files. Here you can find a list of supported timezones. Defaults to UTC. |
database_provider.id |
integer | The ID of an External Database. This can be found in the Account Settings in SpinupWP. The latest version of MySQL will be installed on your server if not provided. |
database.root_password |
string | Database root password. Leave blank to auto generate. |
post_provision_script |
string | This script will run as the root user once your server has successfully provisioned. |
Provision a custom server
Request
curl -X POST https://api.spinupwp.app/v1/servers/custom \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d 'provider_name=OVH' \
-d 'ubuntu_version=24.04' \
-d 'ip_address=10.0.0.1' \
-d 'ssh_port=22' \
-d 'auth_method=password' \
-d 'username=root' \
--data-urlencode 'password=9X1PU0cnJp8FyjMW' \
-d 'hostname=turnipjuice-media' \
-d 'timezone=America/Toronto' \
--data-urlencode 'database_root_password=V9ByakWHYgFN' \
--data-urlencode 'post_provision_script=apt-get install -q -y nodejs; apt-get install -q -y npm;'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$server = $spinupwp->servers->createCustom([
'provider_name' => 'OVH',
'ip_address' => '10.0.0.1',
'ssh_port' => 22,
'ubuntu_version' => 24.04,
'username' => 'root',
'password' => '9X1PU0cnJp8FyjMW',
'auth_method' => 'password',
'hostname' => 'turnipjuice-media',
'timezone' => 'America/Toronto',
'database_root_password' => 'V9ByakWHYgFN',
'post_provision_script' => 'apt-get install -q -y nodejs; apt-get install -q -y npm;',
]);
Response
{
"event_id": 1,
"data": {
"id": 1,
"name": "turnipjuice-media",
"provider_name": "OVH",
"ubuntu_version": "24.04",
"ip_address": "10.0.0.1",
"ssh_port": 22,
"timezone": "UTC",
"region": "",
"size": "",
"disk_space": {
"total": 25210576000,
"available": 20966548000,
"used": 4244028000,
"updated_at": "2024-07-01T12:00:00.000000Z"
},
"database": {
"server": "mysql-8.0",
"host": "localhost",
"port": 3306
},
"ssh_publickey": "ssh-rsa AAAA....",
"git_publickey": "ssh-rsa AAAA....",
"connection_status": "connected",
"reboot_required": true,
"upgrade_required": false,
"install_notes": null,
"created_at": "2024-07-01T12:00:00.000000Z",
"status": "provisioned"
}
}
POST /servers/custom
Provisions a new custom server. Returns the event_id of the event along with the Server object. On average, it takes 10 minutes for a custom server to be provisioned, and we’ll email you once your server is ready. You can check the events endpoint for the event_id to find out when the server has finished provisioning.
If you choose publickey as the authentication method, you must add SpinupWP’s SSH public key to your server’s authorized_keys file before provisioning. This allows SpinupWP to connect and configure the server. You can retrieve the key from the SSH Key endpoint.
Parameters
(* indicates a required field)
| Name | Type | Description |
|---|---|---|
provider_name* |
string | The name of the company providing the server (e.g. OVH). |
ubuntu_version* |
string | The version of Ubuntu installed on the server. Must be one of the latest two LTS versions of Ubuntu (e.g. 24.04). |
ip_address* |
string | The public IP address of the server. |
ssh_port |
integer | The port to use for SSH. Defaults to 22. |
username* |
string | The username SpinupWP should use to connect via SSH. |
auth_method |
string | The authentication method to connect to the server. Either password or publickey. Defaults to publickey. |
password |
string | The SSH password. Required if auth_method is password. |
hostname* |
string | Hostname for the server. Can only contain alphanumeric characters, dashes, and periods. |
timezone |
string | Configures the server’s timezone. List of supported timezones. Defaults to UTC. |
post_provision_script |
string | This script will run as the root user once your server has been successfully provisioned. |
database_root_password |
string | Database root password. Leave blank to auto generate one. |
database_provider_id |
integer | The ID of an external database to use instead of installing one. Found in your SpinupWP Account Settings. |
Retrieve a server
Request
curl -X GET https://api.spinupwp.app/v1/servers/{id} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$server = $spinupwp->servers->get($serverId);
Response
{
"data": {
"id": 1,
"name": "turnipjuice-media",
"provider_name": "DigitalOcean",
"ubuntu_version": "24.04",
"ip_address": "10.0.0.1",
"ssh_port": 22,
"timezone": "UTC",
"region": "TOR1",
"size": "1 GB / 1 vCPU",
"disk_space": {
"total": 25210576000,
"available": 20966548000,
"used": 4244028000,
"updated_at": "2024-07-01T12:00:00.000000Z"
},
"database": {
"server": "mysql-8.0",
"host": "localhost",
"port": 3306
},
"ssh_publickey": "ssh-rsa AAAA....",
"git_publickey": "ssh-rsa AAAA....",
"connection_status": "connected",
"reboot_required": true,
"upgrade_required": false,
"install_notes": null,
"created_at": "2024-07-01T12:00:00.000000Z",
"status": "provisioned"
}
}
GET /servers/{id}
Retrieves the details of a single server. Returns a Server object.
Delete a server
Request
curl -X DELETE https://api.spinupwp.app/v1/servers/{id} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d delete_server_on_provider=true \
-G
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$eventId = $spinupwp->servers->delete($serverId, $deleteOnProvider);
Response
{
"event_id": 1
}
DELETE /servers/{id}
Permanently deletes a server. This cannot be undone. Returns the event_id of the delete server event.
Parameters
(* indicates a required field)
| Name | Type | Description |
|---|---|---|
delete_server_on_provider |
boolean | Also, delete the server from the server provider (DigitalOcean, etc.). |
Reboot a server
Request
curl -X POST https://api.spinupwp.app/v1/servers/{id}/reboot \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$eventId = $spinupwp->servers->reboot($serverId);
Response
{
"event_id": 1
}
POST /servers/{id}/reboot
Reboot a server. Returns the event_id of the reboot server event.
Restart Nginx service
Request
curl -X POST https://api.spinupwp.app/v1/servers/{id}/services/nginx/restart \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$eventId = $spinupwp->servers->restartNginx($serverId);
Response
{
"event_id": 1
}
POST /servers/{id}/services/nginx/restart
Restart the Nginx service on a server. Returns the event_id of the restart Nginx event.
Restart Redis service
Request
curl -X POST https://api.spinupwp.app/v1/servers/{id}/services/redis/restart \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$eventId = $spinupwp->servers->restartRedis($serverId);
Response
{
"event_id": 1
}
POST /servers/{id}/services/redis/restart
Restart the Redis service on a server. Returns the event_id of the restart Redis event.
Restart PHP-FPM service
Request
curl -X POST https://api.spinupwp.app/v1/servers/{id}/services/php/restart \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$eventId = $spinupwp->servers->restartPhp($serverId);
Response
{
"event_id": 1
}
POST /servers/{id}/services/php/restart
Restart all versions of the PHP-FPM service installed on a server. Returns the event_id of the restart PHP-FPM event.
Restart MySQL service
Request
curl -X POST https://api.spinupwp.app/v1/servers/{id}/services/mysql/restart \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$eventId = $spinupwp->servers->restartMysql($serverId);
Response
{
"event_id": 1
}
POST /servers/{id}/services/mysql/restart
Restart the MySQL or MariaDB service on a server. Returns the event_id of the restart MySQL event.
Sites
The Sites endpoint allows you to create, view, and delete sites.
List all sites
Request
curl -X GET https://api.spinupwp.app/v1/sites \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d server_id=1 \
-G
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
// List all sites
$sites = $spinupwp->sites->list();
// List sites by server
$sites = $spinupwp->sites->listForServer($serverId);
Response
{
"data": [
{
"id": 0,
"server_id": 1,
"domain": "turnipjuice.media",
"additional_domains": [
{
"id": 1,
"domain": "www.turnipjuice.media",
"redirect": {
"enabled": true,
"type": 301,
"destination": "turnipjuice.media"
},
"created_at": "2024-07-01T12:00:00.000000Z"
}
],
"site_user": "turnipjuicemedia",
"php_version": "8.3",
"public_folder": "/",
"is_wordpress": true,
"page_cache": {
"enabled": true
},
"https": {
"enabled": true
},
"nginx": {
"uploads_directory_protected": true,
"xmlrpc_protected": true,
"subdirectory_rewrite_in_place": false
},
"database": {
"id": 1,
"user_id": 1,
"table_prefix": "wp_"
},
"backups": {
"files": true,
"database": true,
"paths_to_exclude": "node_modules\\n/files/vendor",
"retention_period": 30,
"next_run_time": "2024-07-01T12:00:00.000000Z",
"storage_provider": {
"id": 1,
"region": "nyc3",
"bucket": "turnipjuice-media"
}
},
"wp_core_update": true,
"wp_theme_updates": 0,
"wp_plugin_updates": 3,
"git": {
"repo": "git@github.com:spinupwp/spinupwp-composer-site.git",
"branch": "main",
"deploy_script": "composer install --optimize-autoload --no-dev",
"push_enabled": true,
"deployment_url": "https://api.spinupwp.app/git/jeJLdKrl63/deploy"
},
"basic_auth": {
"enabled": true,
"username": "turnipjuice"
},
"subdomain": {
"enabled": true,
"url": "https://5q2g62kzyn.xyz.spinupwp.site"
},
"created_at": "2024-07-01T12:00:00.000000Z",
"status": "deployed"
}
],
"pagination": {
"previous": null,
"next": "https://api.spinupwp.app/v1/sites?page=2",
"per_page": 10,
"count": 15
}
}
GET /sites
Retrieves a list of sites. Optionally filtered by server. Returns a paginated list of Site objects.
Parameters
(* indicates a required field)
| Name | Type | Description |
|---|---|---|
server_id |
integer | Filter by Server ID |
Create a site
Request
curl -X POST https://api.spinupwp.app/v1/sites \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d 'server_id'=1 \
-d 'domain'=turnipjuice.media \
-d 'site_user'=turnipjuicemedia \
-d 'installation_method'=wp \
-d 'page_cache[enabled]'=true \
-d 'database[name]'=turnipjuicemedia \
-d 'database[username]'=turnipjuicemedia \
-d 'wordpress[title]'="Turnip Juice Media" \
-d 'wordpress[admin_user]'=admin \
-d 'wordpress[admin_email]'=abraham@turnipjuice.media \
-d 'wordpress[admin_password]'=DK6Jrfj8gyWzL
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$site = $spinupwp->sites->create($serverId, [
'domain' => 'turnipjuice.media',
'site_user' => 'turnipjuicemedia',
'installation_method' => 'wp',
'page_cache' => [
'enabled' => true,
],
'database' => [
'name' => 'turnipjuicemedia',
'username' => 'turnipjuicemedia',
],
'wordpress' => [
'title' => 'Turnip Juice Media',
'admin_user' => 'admin',
'admin_email' => 'abraham@turnipjuice.media',
'admin_password' => 'DK6Jrfj8gyWzL',
]
]);
Response
{
"event_id": 1,
"data": {
"id": 0,
"server_id": 1,
"domain": "turnipjuice.media",
"additional_domains": [
{
"id": 1,
"domain": "www.turnipjuice.media",
"redirect": {
"enabled": true,
"type": 301,
"destination": "turnipjuice.media"
},
"created_at": "2024-07-01T12:00:00.000000Z"
}
],
"site_user": "turnipjuicemedia",
"php_version": "8.3",
"public_folder": "/",
"is_wordpress": true,
"page_cache": {
"enabled": true
},
"https": {
"enabled": true
},
"nginx": {
"uploads_directory_protected": true,
"xmlrpc_protected": true,
"subdirectory_rewrite_in_place": false
},
"database": {
"id": 1,
"user_id": 1,
"table_prefix": "wp_"
},
"backups": {
"files": true,
"database": true,
"paths_to_exclude": "node_modules\\n/files/vendor",
"retention_period": 30,
"next_run_time": "2024-07-01T12:00:00.000000Z",
"storage_provider": {
"id": 1,
"region": "nyc3",
"bucket": "turnipjuice-media"
}
},
"wp_core_update": true,
"wp_theme_updates": 0,
"wp_plugin_updates": 3,
"git": {
"repo": "git@github.com:spinupwp/spinupwp-composer-site.git",
"branch": "main",
"deploy_script": "composer install --optimize-autoload --no-dev",
"push_enabled": true,
"deployment_url": "https://api.spinupwp.app/git/jeJLdKrl63/deploy"
},
"basic_auth": {
"enabled": true,
"username": "turnipjuice"
},
"subdomain": {
"enabled": true,
"url": "https://5q2g62kzyn.xyz.spinupwp.site"
},
"created_at": "2024-07-01T12:00:00.000000Z",
"status": "deployed"
}
}
POST /sites
Creates a new site. Returns the event_id of the create site event along with the created Site object. You can check the events endpoint for the event_id every few minutes to find out when the site is ready.
Parameters
(* indicates a required field)
| Name | Type | Description |
|---|---|---|
server_id* |
integer | The ID of the server where the site should be created. |
domain* |
string | The site’s primary domain. |
site_user* |
string | The username for the site user. |
php_version |
string | The site’s PHP version. Defaults to 8.3. |
public_folder |
string | The site’s public folder. Defaults to /. |
installation_method* |
string | The type of site. One of wp, wp_subdirectory, wp_subdomain, git or blank. |
deploy_script |
string | This script will run after the site has been deployed. The script is executed as the site user from the ~/files directory. |
page_cache.enabled |
boolean | Whether to enable page caching. |
database.name |
string | Database name. Only required if adding a database. |
database.username |
string | Database username. Only required if adding a database. |
database.password |
string | Database password. Leave blank to auto generate. |
database.table_prefix |
string | Table prefix for WordPress. Leave blank to auto generate. |
wordpress.title |
string | WordPress site title. Required when using a WordPress installation method. |
wordpress.admin_user |
string | WordPress admin username. Required when using a WordPress installation method. |
wordpress.admin_password |
string | WordPress admin password. Required when using a WordPress installation method. Must be at least 8 characters. |
wordpress.admin_email |
string | WordPress admin email. Required when using a WordPress installation method. |
git.repo |
string | Link to the git repository. Required when using the git installation method. |
git.branch |
string | Git repository branch to deploy from. Required when using the git installation method. |
git.always_run_deploy_script |
boolean | Run the site’s deploy script after each git deployment. If this is not true, the script will run once after the site has been created and will not be saved. |
git.push_to_deploy |
boolean | Enable push to deploy for git. Need to setup a webhook with your git provider to point to the returned git_deployment_url. Defaults to false. |
git.deploy_key_enabled |
boolean | Whether to use a unique deploy key for git authentication. Otherwise the server’s key will be used. |
git.deploy_key.privatekey |
string | The private key for git authentication. Required if git.deploy_key_enabled is true. |
git.deploy_key.publickey |
string | The public key for git authentication. Required if git.deploy_key_enabled is true. |
Retrieve a site
Request
curl -X GET https://api.spinupwp.app/v1/sites/{id} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$site = $spinupwp->sites->get($siteId);
Response
{
"data": {
"id": 0,
"server_id": 1,
"domain": "turnipjuice.media",
"additional_domains": [
{
"id": 1,
"domain": "www.turnipjuice.media",
"redirect": {
"enabled": true,
"type": 301,
"destination": "turnipjuice.media"
},
"created_at": "2024-07-01T12:00:00.000000Z"
}
],
"site_user": "turnipjuicemedia",
"php_version": "8.3",
"public_folder": "/",
"is_wordpress": true,
"page_cache": {
"enabled": true
},
"https": {
"enabled": true
},
"nginx": {
"uploads_directory_protected": true,
"xmlrpc_protected": true,
"subdirectory_rewrite_in_place": false
},
"database": {
"id": 1,
"user_id": 1,
"table_prefix": "wp_"
},
"backups": {
"files": true,
"database": true,
"paths_to_exclude": "node_modules\\n/files/vendor",
"retention_period": 30,
"next_run_time": "2024-07-01T12:00:00.000000Z",
"storage_provider": {
"id": 1,
"region": "nyc3",
"bucket": "turnipjuice-media"
}
},
"wp_core_update": true,
"wp_theme_updates": 0,
"wp_plugin_updates": 3,
"git": {
"repo": "git@github.com:spinupwp/spinupwp-composer-site.git",
"branch": "main",
"deploy_script": "composer install --optimize-autoload --no-dev",
"push_enabled": true,
"deployment_url": "https://api.spinupwp.app/git/jeJLdKrl63/deploy"
},
"basic_auth": {
"enabled": true,
"username": "turnipjuice"
},
"subdomain": {
"enabled": true,
"url": "https://5q2g62kzyn.xyz.spinupwp.site"
},
"created_at": "2024-07-01T12:00:00.000000Z",
"status": "deployed"
}
}
GET /sites/{id}
Retrieves the details of a single site. Returns a Site object.
Delete a site
Request
curl -X DELETE https://api.spinupwp.app/v1/sites/{id} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d delete_database=true \
-d delete_backups=true \
-G
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$eventId = $spinupwp->sites->delete($siteId);
Response
{
"event_id": 1
}
DELETE /sites/{id}
Permanently deletes a site. This cannot be undone. Returns the event_id of the delete site event.
Parameters
(* indicates a required field)
| Name | Type | Description |
|---|---|---|
delete_database |
boolean | Delete associated database |
delete_backups |
boolean | Delete associated backups |
Purge page cache
Request
curl -X POST https://api.spinupwp.app/v1/sites/{id}/page-cache/purge \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$eventId = $spinupwp->sites->purgePageCache($siteId);
Response
{
"event_id": 1
}
POST /sites/{id}/page-cache/purge
Purge the site’s page cache. Returns the event_id of the purge page cache event.
Purge object cache
Request
curl -X POST https://api.spinupwp.app/v1/sites/{id}/object-cache/purge \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$eventId = $spinupwp->sites->purgeObjectCache($siteId);
Response
{
"event_id": 1
}
POST /sites/{id}/object-cache/purge
Purge the site’s WordPress object cache. Returns the event_id of the purge object cache event.
Correct file permissions
Request
curl -X POST https://api.spinupwp.app/v1/sites/{id}/file-permissions/correct \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$eventId = $spinupwp->sites->correctFilePermissions($siteId);
Response
{
"event_id": 1
}
POST /sites/{id}/file-permissions/correct
Reset all file permissions so that the site’s system user owns the site’s file and folders. Returns the event_id of the correct file permissions event.
Run a Git deployment
Request
curl -X POST https://api.spinupwp.app/v1/sites/{id}/git/deploy \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$eventId = $spinupwp->sites->gitDeploy($siteId);
Response
{
"event_id": 1
}
POST /sites/{id}/git/deploy
Run a Git deployment which will pull the latest changes from your Git repository to the site on your server, and run your deployment script afterward (if you have one configured). Returns the event_id of the git deployment event.
Enable HTTPS
Request
curl -X POST https://api.spinupwp.app/v1/sites/{id}/https \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d 'type'=webroot
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$eventId = $spinupwp->sites->enableHttps($siteId, [
'type' => 'webroot',
]);
Response
{
"event_id": 1
}
POST /sites/{id}/https
Enable HTTPS for a site using either Let’s Encrypt (webroot) or a custom certificate. Returns the event_id of the enable HTTPS event.
Parameters
(* indicates a required field)
| Name | Type | Description |
|---|---|---|
type* |
string | The type of HTTPS certificate. One of webroot (Let’s Encrypt) or custom. |
certificate |
string | The SSL certificate content. Required if type is custom. |
private_key |
string | The private key content. Required if type is custom. |
Update HTTPS
Request
curl -X PUT https://api.spinupwp.app/v1/sites/{id}/https \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d 'type'=custom \
--data-urlencode 'certificate'="-----BEGIN CERTIFICATE-----..." \
--data-urlencode 'private_key'="-----BEGIN PRIVATE KEY-----..."
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$eventId = $spinupwp->sites->updateHttps($siteId, [
'type' => 'custom',
'certificate' => '-----BEGIN CERTIFICATE-----...',
'private_key' => '-----BEGIN PRIVATE KEY-----...',
]);
Response
{
"event_id": 1
}
PUT /sites/{id}/https
Switch the certificate type between webroot or custom. Also used to update the custom certificate values. Returns the event_id of the update HTTPS event.
Parameters
(* indicates a required field)
| Name | Type | Description |
|---|---|---|
type* |
string | The type of HTTPS certificate. One of webroot (Let’s Encrypt) or custom. |
certificate |
string | The SSL certificate content. Required if type is custom. |
private_key |
string | The private key content. Required if type is custom. |
Disable HTTPS
Request
curl -X DELETE https://api.spinupwp.app/v1/sites/{id}/https \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$eventId = $spinupwp->sites->disableHttps($siteId);
Response
{
"event_id": 1
}
DELETE /sites/{id}/https
Disable HTTPS for a site. Returns the event_id of the disable HTTPS event.
Update PHP version
Request
curl -X PUT https://api.spinupwp.app/v1/sites/{id}/php \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d 'php_version'=8.3
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$eventId = $spinupwp->sites->updatePhpSettings($siteId, [
'php_version' => '8.3',
]);
Response
{
"event_id": 1
}
PUT /sites/{id}/php
Update the PHP version for a site. Returns the event_id of the update PHP version event.
Parameters
(* indicates a required field)
| Name | Type | Description |
|---|---|---|
php_version* |
string | The PHP version to use. |
Enable SpinupWP subdomain
Request
curl -X POST https://api.spinupwp.app/v1/sites/{id}/spinupwp-subdomain \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$eventId = $spinupwp->sites->enableSpinupwpSubdomain($siteId);
Response
{
"event_id": 1
}
POST /sites/{id}/spinupwp-subdomain
Enable the SpinupWP subdomain for a site. This provides a temporary URL for accessing your site before DNS is configured. Returns the event_id of the enable subdomain event.
Disable SpinupWP subdomain
Request
curl -X DELETE https://api.spinupwp.app/v1/sites/{id}/spinupwp-subdomain \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$eventId = $spinupwp->sites->removeSpinupwpSubdomain($siteId);
Response
{
"event_id": 1
}
DELETE /sites/{id}/spinupwp-subdomain
Remove the SpinupWP subdomain from a site. Returns the event_id of the remove subdomain event.
List additional domains
Request
curl -X GET https://api.spinupwp.app/v1/sites/{id}/domains \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$domains = $spinupwp->sites->listDomains($siteId);
Response
{
"data": [
{
"id": 1,
"domain": "www.turnipjuice.media",
"redirect": {
"enabled": true,
"type": 301,
"destination": "turnipjuice.media"
},
"created_at": "2024-07-01T12:00:00.000000Z"
}
]
}
GET /sites/{id}/domains
Retrieves a list of additional domains for a site.
Add additional domain
Request
curl -X POST https://api.spinupwp.app/v1/sites/{id}/domains \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d 'domain'=www.turnipjuice.media \
-d 'redirect[enabled]'=true \
-d 'redirect[type]'=301 \
-d 'redirect[destination]'=turnipjuice.media
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$domain = $spinupwp->sites->addDomain($siteId, [
'domain' => 'www.turnipjuice.media',
'redirect' => [
'enabled' => true,
'type' => 301,
'destination' => 'turnipjuice.media',
],
]);
Response
{
"event_id": 1,
"data": {
"id": 1,
"domain": "www.turnipjuice.media",
"redirect": {
"enabled": true,
"type": 301,
"destination": "turnipjuice.media"
},
"created_at": "2024-07-01T12:00:00.000000Z"
}
}
POST /sites/{id}/domains
Add an additional domain to a site. Returns the event_id of the add domain event along with the created domain object.
Parameters
(* indicates a required field)
| Name | Type | Description |
|---|---|---|
domain* |
string | The domain name to add. Cannot be the same as the primary domain. |
redirect.enabled |
boolean | Whether to enable redirect for this domain. |
redirect.type |
integer | The redirect type. One of 301, 302, 307, or 308. Defaults to 301. |
redirect.destination |
string | The redirect destination URL or domain. Defaults to the primary domain. |
Update additional domain
Request
curl -X PUT https://api.spinupwp.app/v1/sites/{id}/domains/{domain} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d 'redirect[enabled]'=true \
-d 'redirect[type]'=301 \
-d 'redirect[destination]'=https://newsite.com
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$domain = $spinupwp->sites->updateDomain($siteId, $domainId, [
'redirect' => [
'enabled' => true,
'type' => 301,
'destination' => 'https://newsite.com',
],
]);
Response
{
"event_id": 1,
"data": {
"id": 1,
"domain": "www.turnipjuice.media",
"redirect": {
"enabled": true,
"type": 301,
"destination": "turnipjuice.media"
},
"created_at": "2024-07-01T12:00:00.000000Z"
}
}
PUT /sites/{id}/domains/{domain}
Update the redirect settings for an additional domain. Returns the event_id of the update domain event along with the updated domain object.
Parameters
(* indicates a required field)
| Name | Type | Description |
|---|---|---|
domain* |
integer | The domain ID to update. |
redirect.enabled* |
boolean | Whether to enable redirect for this domain. |
redirect.type |
integer | The redirect type. One of 301, 302, 307, or 308. |
redirect.destination |
string | The redirect destination URL or domain. |
Delete additional domain
Request
curl -X DELETE https://api.spinupwp.app/v1/sites/{id}/domains/{domain} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$eventId = $spinupwp->sites->deleteDomain($siteId, $domainId);
Response
{
"event_id": 1
}
DELETE /sites/{id}/domains/{domain}
Delete an additional domain from a site. Returns the event_id of the delete domain event.
Parameters
(* indicates a required field)
| Name | Type | Description |
|---|---|---|
domain* |
integer | The domain ID to delete. |
Events
The Events endpoint allows you to view events.
List all events
Request
curl -X GET https://api.spinupwp.app/v1/events \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$events = $spinupwp->events->list();
Response
{
"data": [
{
"id": 0,
"initiated_by": "Abraham",
"server_id": 1,
"name": "Creating site turnipjuice.media",
"status": "deployed",
"output": null,
"created_at": "2024-07-01T12:00:00.000000Z",
"started_at": "2024-07-01T12:00:00.000000Z",
"finished_at": "2024-07-01T12:00:00.000000Z"
}
],
"pagination": {
"previous": null,
"next": "https://api.spinupwp.app/v1/events?page=2",
"per_page": 10,
"count": 15
}
}
GET /events
Retrieves a list of events. Returns a paginated list of Event objects.
Retrieve an event
Request
curl -X GET https://api.spinupwp.app/v1/events/{id} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
$event = $spinupwp->events->get($eventId);
Response
{
"data": {
"id": 0,
"initiated_by": "Abraham",
"server_id": 1,
"name": "Creating site turnipjuice.media",
"status": "deployed",
"output": null,
"created_at": "2024-07-01T12:00:00.000000Z",
"started_at": "2024-07-01T12:00:00.000000Z",
"finished_at": "2024-07-01T12:00:00.000000Z"
}
}
GET /events/{id}
Retrieves the details of a single event. Returns an Event object. For operations that return an event_id you can use this endpoint to check the status of the event. A status of “deployed” means that the event was successfully completed. If the event fails, the output field will contain any error messages.
Schemas
SSH Key
{
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD..."
}
Properties
| Name | Type | Description |
|---|---|---|
key |
string | SpinupWP’s SSH key |
Server
{
"id": 1,
"name": "turnipjuice-media",
"provider_name": "DigitalOcean",
"ubuntu_version": "24.04",
"ip_address": "10.0.0.1",
"ssh_port": 22,
"timezone": "UTC",
"region": "TOR1",
"size": "1 GB / 1 vCPU",
"disk_space": {
"total": 25210576000,
"available": 20966548000,
"used": 4244028000,
"updated_at": "2024-07-01T12:00:00.000000Z"
},
"database": {
"server": "mysql-8.0",
"host": "localhost",
"port": 3306
},
"ssh_publickey": "ssh-rsa AAAA....",
"git_publickey": "ssh-rsa AAAA....",
"connection_status": "connected",
"reboot_required": true,
"upgrade_required": false,
"install_notes": null,
"created_at": "2024-07-01T12:00:00.000000Z",
"status": "provisioned"
}
Properties
| Name | Type | Description |
|---|---|---|
id |
integer | Unique identifier for the server. |
name |
string | The server’s name. For display purposes only. |
provider_name |
string | The server’s provider name. |
ubuntu_version |
string | The version of Ubuntu on the server. One of 18.04, 20.04, 22.04, or 24.04. |
ip_address |
string | The server’s IP address. |
ssh_port |
integer | Port where the server accepts SSH connections. |
timezone |
string | The server’s timezone. |
region |
string | The server’s region. For display purposes only. |
size |
string | The server’s size. For display purposes only. |
disk_space |
object | Disk space details. |
» total |
integer | Total disk space detected on the server. (In bytes). |
» available |
integer | Available disk space detected on the server. (In bytes). |
» used |
integer | Used disk space detected on the server. (In bytes). |
» updated_at |
string(date-time) | The time that disk space was updated. |
database |
object | Database details. |
» server |
string | The database type on the server. |
» host |
string | The hostname for the database. |
» port |
integer | The port for the database. |
ssh_publickey |
string | The server’s public key. |
git_publickey |
string | The server’s public key for git connections. |
connection_status |
string | The server’s connection status. One of connected or disconnected. |
reboot_required |
boolean | If the server requires a reboot |
upgrade_required |
boolean | If the server has a pending SpinupWP upgrade. |
install_notes |
string | Notes about the server. |
created_at |
string(date-time) | The date the server was created. |
status |
string | The server’s status. One of provisioning, provisioned, or failed. |
Site
{
"id": 0,
"server_id": 1,
"domain": "turnipjuice.media",
"additional_domains": [
{
"id": 1,
"domain": "www.turnipjuice.media",
"redirect": {
"enabled": true,
"type": 301,
"destination": "turnipjuice.media"
},
"created_at": "2024-07-01T12:00:00.000000Z"
}
],
"site_user": "turnipjuicemedia",
"php_version": "8.3",
"public_folder": "/",
"is_wordpress": true,
"page_cache": {
"enabled": true
},
"https": {
"enabled": true
},
"nginx": {
"uploads_directory_protected": true,
"xmlrpc_protected": true,
"subdirectory_rewrite_in_place": false
},
"database": {
"id": 1,
"user_id": 1,
"table_prefix": "wp_"
},
"backups": {
"files": true,
"database": true,
"paths_to_exclude": "node_modules\\n/files/vendor",
"retention_period": 30,
"next_run_time": "2024-07-01T12:00:00.000000Z",
"storage_provider": {
"id": 1,
"region": "nyc3",
"bucket": "turnipjuice-media"
}
},
"wp_core_update": true,
"wp_theme_updates": 0,
"wp_plugin_updates": 3,
"git": {
"repo": "git@github.com:spinupwp/spinupwp-composer-site.git",
"branch": "main",
"deploy_script": "composer install --optimize-autoload --no-dev",
"push_enabled": true,
"deployment_url": "https://api.spinupwp.app/git/jeJLdKrl63/deploy"
},
"basic_auth": {
"enabled": true,
"username": "turnipjuice"
},
"subdomain": {
"enabled": true,
"url": "https://5q2g62kzyn.xyz.spinupwp.site"
},
"created_at": "2024-07-01T12:00:00.000000Z",
"status": "deployed"
}
Properties
| Name | Type | Description |
|---|---|---|
id |
integer | Unique identifier for the site. |
server_id |
integer | The site’s server ID. |
domain |
string | The site’s primary domain. |
additional_domains |
[AdditionalDomain] | The site’s additional domains. |
site_user |
string | The username for the site user. |
php_version |
string | The site’s PHP version. |
public_folder |
string | The site’s public folder. |
is_wordpress |
boolean | If a WordPress install was detected. |
page_cache |
object | Page cache details. |
» enabled |
boolean | If page caching is enabled. |
https |
object | HTTPS details. |
» enabled |
boolean | If https is enabled. |
nginx |
object | Nginx options. |
» uploads_directory_protected |
boolean | Disallow PHP execution in the uploads folder. |
» xmlrpc_protected |
boolean | Disable xmlrpc.php |
» subdirectory_rewrite_in_place |
boolean | If rewrite rules are enabled for a WordPress Multisite subdirectory install. |
database |
object | Database details. |
» id |
integer | The site’s database ID. |
» user_id |
integer | The site’s database user ID. |
» table_prefix |
string | The site’s WordPress table prefix. |
backups |
object | Backup details. |
» files |
boolean | If file backups are enabled. |
» database |
boolean | If database backups are enabled. |
» paths_to_exclude |
string | Paths to be excluded from the file backups. |
» retention_period |
integer | Number of days to retain the site backups. |
» next_run_time |
string(date-time) | The timestamp in UTC that the next automatically scheduled backup will run. |
» storage_provider |
object | Storage provider details. |
»» id |
integer | The site’s storage provider ID. |
»» region |
string | The site’s storage provider region. |
»» bucket |
string | The site’s storage provider bucket. |
wp_core_update |
boolean | If WordPress core has updates available. |
wp_theme_updates |
integer | Number of WordPress themes that have updates available. |
wp_plugin_updates |
integer | Number of WordPress plugins that have updates available. |
git |
object | Git details. |
» repo |
string | The site’s git repository URL. |
» branch |
string | The site’s git branch. |
» deploy_script |
string | The script that will run after each git deployment. The script is executed as the site user from the ~/files directory. |
» push_enabled |
boolean | If git push to deploy is enabled. |
» deployment_url |
string | URL that git provider needs to make a POST request to for push to deploy. |
basic_auth |
object | Basic auth details. |
» enabled |
boolean | If basic authentication is enabled. |
» username |
string | The basic auth username. |
subdomain |
object | SpinupWP subdomain details. |
» enabled |
boolean | If the SpinupWP subdomain is enabled. |
» url |
string | The SpinupWP subdomain URL. |
created_at |
string(date-time) | The date the site was created. |
status |
string | The site’s status. One of deploying, deployed, or failed. |
Event
{
"id": 0,
"initiated_by": "Abraham",
"server_id": 1,
"name": "Creating site turnipjuice.media",
"status": "deployed",
"output": null,
"created_at": "2024-07-01T12:00:00.000000Z",
"started_at": "2024-07-01T12:00:00.000000Z",
"finished_at": "2024-07-01T12:00:00.000000Z"
}
Properties
| Name | Type | Description |
|---|---|---|
id |
integer | Unique identifier for the event. |
initiated_by |
string | The name of the person that initiated the event. |
server_id |
integer | The event’s server ID. |
name |
string | The name of the event. |
status |
string | The event’s status. One of queued,creating,updating,deleting,deployed, or failed. |
output |
string | The event’s output. |
created_at |
string(date-time) | The time that the event was created. |
started_at |
string(date-time) | The time that the event was started. |
finished_at |
string(date-time) | The time that the event finished. |
Additional Domain
{
"id": 1,
"domain": "www.turnipjuice.media",
"redirect": {
"enabled": true,
"type": 301,
"destination": "turnipjuice.media"
},
"created_at": "2024-07-01T12:00:00.000000Z"
}
Properties
| Name | Type | Description |
|---|---|---|
id |
integer | Unique identifier for the domain. |
domain |
string | Additional domain name. |
redirect |
object | The domain redirect details. |
» enabled |
boolean | If true the domain will redirect to the specified destination. |
» type |
integer | The redirect HTTP status code. One of 301, 302, 307, or 308. Defaults to 301. |
» destination |
string | The redirect destination URL or domain. Defaults to the primary domain. |
created_at |
string(date-time) | Date the domain was added. |
Pagination
{
"previous": null,
"next": "https://api.spinupwp.app/v1/sites?page=2",
"per_page": 10,
"count": 15
}
Properties
| Name | Type | Description |
|---|---|---|
previous |
string | Link to the previous page. Null if the current page is the first page. |
next |
string | Link to the previous page. Null if the current page is the last page. |
per_page |
integer | Number of objects per page. |
count |
integer | Total number of objects. |
Errors
The SpinupWP API uses the following error codes:
| Error Code | Meaning |
|---|---|
| 400 | Bad Request – Your request is invalid. |
| 401 | Unauthorized – Your API token is wrong or no longer valid. |
| 402 | Payment Required – The team does not have a valid subscription. |
| 403 | Forbidden – You do not have permission to access the endpoint. |
| 404 | Not Found – The specified resource could not be found. |
| 405 | Method Not Allowed – You tried to access an endpoint with an invalid method. |
| 422 | Validation Error – Invalid or missing parameters. |
| 429 | Too Many Attempts – You’ve hit the rate limit on API requests. |
| 500 | Internal Server Error – We had a problem with our server. Try again later. |
| 503 | Service Unavailable – We’re temporarily offline for maintenance. Please try again later. |