---
title: API quickstart
description: "Create your first site from code in three calls, then get told when it's ready."
url: "https://shop.anypress.io/docs/api-quickstart/"
updated: "2026-10-24"
category: Developers
---

# API quickstart

Everything AnyPress does is an API call. This page takes you from a key to a live site.

## 1. Get a key

At [app.anypress.io](https://app.anypress.io), open **API keys** and make one. Copy the secret straight away, because it's shown only once. Every call uses **Basic auth**, with the key as the user and the secret as the password. See [API keys and partner keys](/docs/api-keys-and-partner-keys/).

## 2. Create a site

```
curl -u "$KEY:$SECRET" -H 'Content-Type: application/json' \
  -d '{"name":"Kettle and Crumb",
       "externalId":"customer-1042",
       "wordPressUserName":"owner",
       "wordPressUserEmail":"owner@kettleandcrumb.example",
       "wordPressUserRole":"administrator",
       "size":"small"}' \
  https://api.anypress.io/v1/tenants
```

The answer comes straight away, with the site's free address. The site builds in the background, usually in a few minutes. Use your own id as `externalId`, so a retry never makes a second site. All the fields are in [Fields for a new site](/docs/fields-for-a-new-site/).

## 3. Know when it's ready

Either check it:

```
curl -u "$KEY:$SECRET" "https://api.anypress.io/v1/tenants?externalId=customer-1042"
```

`statusCode` is `0` while it builds, `1` when it's done and `2` if it failed.

Or, better, add a webhook for `tenant.ready` under **Webhooks** in the dashboard, and we'll call you. See [Email the client when their site is ready](/docs/email-the-client-when-their-site-is-ready/).

## 4. Manage it

Use the same `externalId` for everything after that:

| Do | Call |
| --- | --- |
| Change its size or settings | `PUT /v1/tenants?externalId=…` |
| Take it offline, or bring it back | `POST /v1/tenants/suspend`, `POST /v1/tenants/resume` |
| Back it up, or list its backups | `POST /v1/tenants/backups`, `GET /v1/tenants/backups` |
| Add its own domain | The domain calls under `/v1/tenants` |
| Delete it | `DELETE /v1/tenants?externalId=…` |

## SDKs and reference

- **TypeScript:** `npm install waas-provisioning-sdk`
- **PHP:** `composer require otakusolutions/waas-provisioning-sdk`
- **Every call, with examples:** the [API reference](https://api.anypress.io/docs)
- **The code:** it's [open source on GitHub](https://github.com/hamchowderr/waas-provisioning-api)

No code at all? See [Create client sites automatically](/docs/create-client-sites-automatically/) for n8n, Make and Zapier recipes.
