> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://americancloud.com/docs/api/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://americancloud.com/docs/api/_mcp/server.

# List WordPress websites

GET https://api.americancloud.com/api/v1/wordpress/websites

Returns a list of all WordPress websites/sites for the account

Reference: https://americancloud.com/docs/api/api-reference/wordpress/list-websites-wordpress

## Authentication

- `X-API-Client-ID` header (required) — API Client ID
- `X-API-Client-Secret` header (required) — API Client Secret

## Response

### 200

List of WordPress websites

- `success` (boolean, required) — Whether the operation succeeded.
- `data` (list of WebsiteInfoDto, optional) — Sites hosted on the WordPress instance.
- `message` (string, optional) — Error message describing why the operation failed.

## Errors

### 400 Bad Request Error

The request was malformed or failed validation.

- `statusCode` (double, required) — HTTP status code.
- `message` (ApiErrorDtoMessage, required) — Human-readable error message. A single string for most errors, or an array of strings when the request failed multiple validation checks.
- `error` (string, optional) — Short HTTP error label.
- `code` (string, optional) — Machine-readable reason for the error. Match on this value rather than on `message`, which can be reworded at any time. Present on the errors that have more than one cause for the same status code; omitted otherwise.
- `errors` (list of ValidationErrorItemDto, optional) — Per-field validation details. Present on 400 responses produced by request-body validation; omitted otherwise.
- `snapshots` (list of BlockingSnapshotDto, optional) — The snapshots that block a delete. Present on a 409 whose `code` is `volume_has_snapshots`; omitted otherwise.

### 401 Unauthorized Error

Authentication credentials were missing or invalid.

- `statusCode` (double, required) — HTTP status code.
- `message` (ApiErrorDtoMessage, required) — Human-readable error message. A single string for most errors, or an array of strings when the request failed multiple validation checks.
- `error` (string, optional) — Short HTTP error label.
- `code` (string, optional) — Machine-readable reason for the error. Match on this value rather than on `message`, which can be reworded at any time. Present on the errors that have more than one cause for the same status code; omitted otherwise.
- `errors` (list of ValidationErrorItemDto, optional) — Per-field validation details. Present on 400 responses produced by request-body validation; omitted otherwise.
- `snapshots` (list of BlockingSnapshotDto, optional) — The snapshots that block a delete. Present on a 409 whose `code` is `volume_has_snapshots`; omitted otherwise.

### 403 Forbidden Error

The authenticated principal is not permitted to perform this action.

- `statusCode` (double, required) — HTTP status code.
- `message` (ApiErrorDtoMessage, required) — Human-readable error message. A single string for most errors, or an array of strings when the request failed multiple validation checks.
- `error` (string, optional) — Short HTTP error label.
- `code` (string, optional) — Machine-readable reason for the error. Match on this value rather than on `message`, which can be reworded at any time. Present on the errors that have more than one cause for the same status code; omitted otherwise.
- `errors` (list of ValidationErrorItemDto, optional) — Per-field validation details. Present on 400 responses produced by request-body validation; omitted otherwise.
- `snapshots` (list of BlockingSnapshotDto, optional) — The snapshots that block a delete. Present on a 409 whose `code` is `volume_has_snapshots`; omitted otherwise.

### 404 Not Found Error

No WordPress instance found for this account

- `statusCode` (double, required) — HTTP status code.
- `message` (ApiErrorDtoMessage, required) — Human-readable error message. A single string for most errors, or an array of strings when the request failed multiple validation checks.
- `error` (string, optional) — Short HTTP error label.
- `code` (string, optional) — Machine-readable reason for the error. Match on this value rather than on `message`, which can be reworded at any time. Present on the errors that have more than one cause for the same status code; omitted otherwise.
- `errors` (list of ValidationErrorItemDto, optional) — Per-field validation details. Present on 400 responses produced by request-body validation; omitted otherwise.
- `snapshots` (list of BlockingSnapshotDto, optional) — The snapshots that block a delete. Present on a 409 whose `code` is `volume_has_snapshots`; omitted otherwise.

### 409 Conflict Error

The WordPress instance is not available for this operation. `code` is `provisioning_in_progress` while the site is still being set up — retry once it is ready — or `deletion_in_progress` while the site is being removed.

- `statusCode` (double, required) — HTTP status code.
- `message` (ApiErrorDtoMessage, required) — Human-readable error message. A single string for most errors, or an array of strings when the request failed multiple validation checks.
- `error` (string, optional) — Short HTTP error label.
- `code` (string, optional) — Machine-readable reason for the error. Match on this value rather than on `message`, which can be reworded at any time. Present on the errors that have more than one cause for the same status code; omitted otherwise.
- `errors` (list of ValidationErrorItemDto, optional) — Per-field validation details. Present on 400 responses produced by request-body validation; omitted otherwise.
- `snapshots` (list of BlockingSnapshotDto, optional) — The snapshots that block a delete. Present on a 409 whose `code` is `volume_has_snapshots`; omitted otherwise.

### 500 Internal Server Error

An unexpected error occurred on the server.

- `statusCode` (double, required) — HTTP status code.
- `message` (ApiErrorDtoMessage, required) — Human-readable error message. A single string for most errors, or an array of strings when the request failed multiple validation checks.
- `error` (string, optional) — Short HTTP error label.
- `code` (string, optional) — Machine-readable reason for the error. Match on this value rather than on `message`, which can be reworded at any time. Present on the errors that have more than one cause for the same status code; omitted otherwise.
- `errors` (list of ValidationErrorItemDto, optional) — Per-field validation details. Present on 400 responses produced by request-body validation; omitted otherwise.
- `snapshots` (list of BlockingSnapshotDto, optional) — The snapshots that block a delete. Present on a 409 whose `code` is `volume_has_snapshots`; omitted otherwise.

## Types

### WebsiteInfoDto

- `domain` (string, required) — Domain the WordPress site is reached at.
- `siteUrl` (string, required) — Full URL of the WordPress site.
- `siteName` (string, required) — Site title configured in WordPress.
- `description` (string, required) — Tagline or short description configured in WordPress.
- `theme` (string, required) — Slug of the currently active WordPress theme.
- `status` (string, required) — Current operational state of the site.
- `isTemporaryDomain` (boolean, required) — Whether the site is served on a temporary platform-provided domain.
- `isMainDomain` (boolean, required) — Whether this site is the primary domain for the instance.
- `isStaging` (boolean, required) — Whether this site is a staging site.
- `databaseSizeBytes` (double, required) — Current database size for the site, in bytes.
- `filesSizeBytes` (double, required) — Current files-on-disk size for the site, in bytes.
- `pluginUpdatesAvailable` (double, optional) — Number of installed plugins with updates available.
- `themeUpdatesAvailable` (double, optional) — Number of installed themes with updates available.
- `wordpressVersion` (string, optional) — Version of WordPress currently installed.

### ApiErrorDtoMessage

Human-readable error message. A single string for most errors, or an array of strings when the request failed multiple validation checks.

### ValidationErrorItemDto

- `field` (string, required) — Dotted path to the field that failed validation.
- `message` (string, required) — Human-readable validation message for this field.

### BlockingSnapshotDto

- `id` (string, required) — Snapshot ID.
- `name` (string, required) — Snapshot name.

## Examples

**Response**

```json
{
  "success": true,
  "data": [
    {
      "domain": "example.com",
      "siteUrl": "https://example.com",
      "siteName": "My WordPress Site",
      "description": "Just another WordPress site.",
      "theme": "twentytwentyfour",
      "status": "active",
      "isTemporaryDomain": false,
      "isMainDomain": true,
      "isStaging": false,
      "databaseSizeBytes": 104857600,
      "filesSizeBytes": 524288000,
      "pluginUpdatesAvailable": 2,
      "themeUpdatesAvailable": 0,
      "wordpressVersion": "6.5.2"
    }
  ],
  "message": "Service temporarily unavailable."
}
```

**SDK Code**

```python
import requests

url = "https://api.americancloud.com/api/v1/wordpress/websites"

headers = {"X-API-Client-ID": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.americancloud.com/api/v1/wordpress/websites';
const options = {method: 'GET', headers: {'X-API-Client-ID': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.americancloud.com/api/v1/wordpress/websites"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-Client-ID", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.americancloud.com/api/v1/wordpress/websites")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Client-ID"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.americancloud.com/api/v1/wordpress/websites")
  .header("X-API-Client-ID", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.americancloud.com/api/v1/wordpress/websites', [
  'headers' => [
    'X-API-Client-ID' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.americancloud.com/api/v1/wordpress/websites");
var request = new RestRequest(Method.GET);
request.AddHeader("X-API-Client-ID", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-API-Client-ID": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.americancloud.com/api/v1/wordpress/websites")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```