# yaya API reference

Every live endpoint on https://api.yaya.page, grouped by resource. Send an account or workspace key as a bearer token. Request and response bodies are in the OpenAPI document at https://yaya.page/openapi.json.

Source: https://yaya.page/support/api-reference

- [Access](#access)
- [Account](#account)
- [Agent actions](#agent-actions)
- [Agents](#agents)
- [Anonymous publishes](#anonymous-publishes)
- [Auth](#auth)
- [Blog](#blog)
- [Contacts](#contacts)
- [Delegated mail zones](#delegated-mail-zones)
- [Dns zones](#dns-zones)
- [Domains](#domains)
- [Draft](#draft)
- [Drives](#drives)
- [Folders](#folders)
- [Live](#live)
- [Me](#me)
- [Mounts](#mounts)
- [Profile](#profile)
- [Publish](#publish)
- [Publishes](#publishes)
- [Site data](#site-data)
- [Site document](#site-document)
- [Site versions](#site-versions)
- [Support](#support)
- [Tenants](#tenants)
- [Theme](#theme)
- [Vanity urls](#vanity-urls)
- [Visitor tracking](#visitor-tracking)

## Access

### GET /api/v1/tenants/{tenantId}/access

GET /api/v1/tenants/{tenantId}/access

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>/access" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PATCH /api/v1/tenants/{tenantId}/access

PATCH /api/v1/tenants/{tenantId}/access

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PATCH "https://api.yaya.page/api/v1/tenants/<tenantId>/access" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### POST /api/v1/tenants/{tenantId}/access/invites

POST /api/v1/tenants/{tenantId}/access/invites

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/access/invites" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

## Account

### GET /api/v1/account

GET /api/v1/account

Scopes: `suite:read`

```
curl "https://api.yaya.page/api/v1/account" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/account/deletion

POST /api/v1/account/deletion

Scopes: `suite:read`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/account/deletion" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/account/deletion/confirm

POST /api/v1/account/deletion/confirm

Scopes: `suite:read`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/account/deletion/confirm" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### GET /api/v1/account/email-change

GET /api/v1/account/email-change

Scopes: `email:write`

```
curl "https://api.yaya.page/api/v1/account/email-change" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/account/email-change

POST /api/v1/account/email-change

Scopes: `email:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/account/email-change" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### DELETE /api/v1/account/email-change

DELETE /api/v1/account/email-change

Scopes: `email:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/account/email-change" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/account/email-change/confirm

POST /api/v1/account/email-change/confirm

Scopes: `email:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/account/email-change/confirm" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### GET /api/v1/account/keys

GET /api/v1/account/keys

Scopes: `suite:read`

```
curl "https://api.yaya.page/api/v1/account/keys" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/account/keys

POST /api/v1/account/keys

Scopes: `suite:read`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/account/keys" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### DELETE /api/v1/account/keys/{keyId}

DELETE /api/v1/account/keys/{keyId}

Scopes: `suite:read`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `keyId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/account/keys/<keyId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

## Agent actions

### GET /api/v1/tenants/{tenantId}/agent-actions

GET /api/v1/tenants/{tenantId}/agent-actions

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>/agent-actions" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/tenants/{tenantId}/agent-actions

POST /api/v1/tenants/{tenantId}/agent-actions

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/agent-actions" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### POST /api/v1/tenants/{tenantId}/agent-actions/{actionId}/approve

POST /api/v1/tenants/{tenantId}/agent-actions/{actionId}/approve

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |
| `actionId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/agent-actions/<actionId>/approve" \
  -H "Authorization: Bearer yaya_ak_..."
```

## Agents

### GET /api/v1/agents/signup

GET /api/v1/agents/signup

Scopes: session only

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `token` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/agents/signup?token=<token>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/agents/signup

POST /api/v1/agents/signup

Scopes: session only

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `token` | string | no |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/agents/signup" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

## Anonymous publishes

### POST /api/v1/anonymous-publishes

POST /api/v1/anonymous-publishes

Scopes: `suite:read`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/anonymous-publishes" \
  -H "Authorization: Bearer yaya_ak_..."
```

## Auth

### POST /api/auth/agent/request-code

Request an email sign-in code

Scopes: `auth:agent`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://yaya.page/api/auth/agent/request-code" \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### POST /api/auth/agent/verify-code

Verify an email code and receive an API key

Scopes: `auth:agent`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://yaya.page/api/auth/agent/verify-code" \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

## Blog

### GET /api/v1/tenants/{tenantId}/blog

GET /api/v1/tenants/{tenantId}/blog

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>/blog" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/tenants/{tenantId}/blog

POST /api/v1/tenants/{tenantId}/blog

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/blog" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PUT /api/v1/tenants/{tenantId}/blog

PUT /api/v1/tenants/{tenantId}/blog

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PUT "https://api.yaya.page/api/v1/tenants/<tenantId>/blog" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/tenants/{tenantId}/blog/{postId}

GET /api/v1/tenants/{tenantId}/blog/{postId}

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |
| `postId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>/blog/<postId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PATCH /api/v1/tenants/{tenantId}/blog/{postId}

PATCH /api/v1/tenants/{tenantId}/blog/{postId}

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |
| `postId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PATCH "https://api.yaya.page/api/v1/tenants/<tenantId>/blog/<postId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### DELETE /api/v1/tenants/{tenantId}/blog/{postId}

DELETE /api/v1/tenants/{tenantId}/blog/{postId}

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |
| `postId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/tenants/<tenantId>/blog/<postId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

## Contacts

### GET /api/v1/tenants/{tenantId}/contacts

GET /api/v1/tenants/{tenantId}/contacts

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>/contacts" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/tenants/{tenantId}/contacts

POST /api/v1/tenants/{tenantId}/contacts

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/contacts" \
  -H "Authorization: Bearer yaya_ak_..."
```

### DELETE /api/v1/tenants/{tenantId}/contacts

DELETE /api/v1/tenants/{tenantId}/contacts

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/tenants/<tenantId>/contacts" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/tenants/{tenantId}/contacts/{contactId}

GET /api/v1/tenants/{tenantId}/contacts/{contactId}

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |
| `contactId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>/contacts/<contactId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PATCH /api/v1/tenants/{tenantId}/contacts/{contactId}

PATCH /api/v1/tenants/{tenantId}/contacts/{contactId}

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |
| `contactId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PATCH "https://api.yaya.page/api/v1/tenants/<tenantId>/contacts/<contactId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/tenants/{tenantId}/contacts/{contactId}/messages/read

POST /api/v1/tenants/{tenantId}/contacts/{contactId}/messages/read

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |
| `contactId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/contacts/<contactId>/messages/read" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/tenants/{tenantId}/contacts/{contactId}/notes

POST /api/v1/tenants/{tenantId}/contacts/{contactId}/notes

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |
| `contactId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/contacts/<contactId>/notes" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/tenants/{tenantId}/contacts/custom-fields

GET /api/v1/tenants/{tenantId}/contacts/custom-fields

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>/contacts/custom-fields" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/tenants/{tenantId}/contacts/custom-fields

POST /api/v1/tenants/{tenantId}/contacts/custom-fields

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/contacts/custom-fields" \
  -H "Authorization: Bearer yaya_ak_..."
```

### DELETE /api/v1/tenants/{tenantId}/contacts/custom-fields/{fieldId}

DELETE /api/v1/tenants/{tenantId}/contacts/custom-fields/{fieldId}

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |
| `fieldId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/tenants/<tenantId>/contacts/custom-fields/<fieldId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/tenants/{tenantId}/contacts/import

POST /api/v1/tenants/{tenantId}/contacts/import

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/contacts/import" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/tenants/{tenantId}/contacts/messages

GET /api/v1/tenants/{tenantId}/contacts/messages

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>/contacts/messages" \
  -H "Authorization: Bearer yaya_ak_..."
```

## Delegated mail zones

### GET /api/v1/delegated-mail-zones

GET /api/v1/delegated-mail-zones

Scopes: `suite:read`

```
curl "https://api.yaya.page/api/v1/delegated-mail-zones" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/delegated-mail-zones

POST /api/v1/delegated-mail-zones

Scopes: `suite:read`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/delegated-mail-zones" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/delegated-mail-zones/{zoneId}

GET /api/v1/delegated-mail-zones/{zoneId}

Scopes: `suite:read`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `zoneId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/delegated-mail-zones/<zoneId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### DELETE /api/v1/delegated-mail-zones/{zoneId}

DELETE /api/v1/delegated-mail-zones/{zoneId}

Scopes: `suite:read`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `zoneId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/delegated-mail-zones/<zoneId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/delegated-mail-zones/{zoneId}/mail

GET /api/v1/delegated-mail-zones/{zoneId}/mail

Scopes: `suite:read`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `zoneId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/delegated-mail-zones/<zoneId>/mail" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/delegated-mail-zones/{zoneId}/mail

POST /api/v1/delegated-mail-zones/{zoneId}/mail

Scopes: `suite:read`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `zoneId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/delegated-mail-zones/<zoneId>/mail" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/delegated-mail-zones/{zoneId}/mailboxes

GET /api/v1/delegated-mail-zones/{zoneId}/mailboxes

Scopes: `suite:read`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `zoneId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/delegated-mail-zones/<zoneId>/mailboxes" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/delegated-mail-zones/{zoneId}/mailboxes

POST /api/v1/delegated-mail-zones/{zoneId}/mailboxes

Scopes: `suite:read`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `zoneId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/delegated-mail-zones/<zoneId>/mailboxes" \
  -H "Authorization: Bearer yaya_ak_..."
```

### DELETE /api/v1/delegated-mail-zones/{zoneId}/mailboxes/{mailboxId}

DELETE /api/v1/delegated-mail-zones/{zoneId}/mailboxes/{mailboxId}

Scopes: `suite:read`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `zoneId` | string | yes |  |
| `mailboxId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/delegated-mail-zones/<zoneId>/mailboxes/<mailboxId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

## Dns zones

### GET /api/v1/dns-zones

GET /api/v1/dns-zones

Scopes: `suite:read`

```
curl "https://api.yaya.page/api/v1/dns-zones" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/dns-zones

POST /api/v1/dns-zones

Scopes: `suite:read`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/dns-zones" \
  -H "Authorization: Bearer yaya_ak_..."
```

## Domains

### GET /api/v1/domains

List custom domains

Scopes: `domains:read`, `domains:write`

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes | Tenant the request acts on |

```
curl "https://api.yaya.page/api/v1/domains?tenantId=<tenantId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/domains

Add a custom domain

Scopes: `domains:read`, `domains:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/domains" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### GET /api/v1/domains/{domain}

Get custom domain status

Scopes: `domains:read`, `domains:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `domain` | string | yes | yaya domain id |

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes | Tenant the request acts on |

```
curl "https://api.yaya.page/api/v1/domains/<domain>?tenantId=<tenantId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### DELETE /api/v1/domains/{domain}

Remove a custom domain

Scopes: `domains:read`, `domains:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `domain` | string | yes | yaya domain id |

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes | Tenant the request acts on |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/domains/<domain>?tenantId=<tenantId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/domains/{domainId}/dns-records

GET /api/v1/domains/{domainId}/dns-records

Scopes: `domains:read`, `domains:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `domainId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/domains/<domainId>/dns-records" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/domains/{domainId}/dns-records

POST /api/v1/domains/{domainId}/dns-records

Scopes: `domains:read`, `domains:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `domainId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/domains/<domainId>/dns-records" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PATCH /api/v1/domains/{domainId}/dns-records/{recordId}

PATCH /api/v1/domains/{domainId}/dns-records/{recordId}

Scopes: `domains:read`, `domains:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `domainId` | string | yes |  |
| `recordId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PATCH "https://api.yaya.page/api/v1/domains/<domainId>/dns-records/<recordId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### DELETE /api/v1/domains/{domainId}/dns-records/{recordId}

DELETE /api/v1/domains/{domainId}/dns-records/{recordId}

Scopes: `domains:read`, `domains:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `domainId` | string | yes |  |
| `recordId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/domains/<domainId>/dns-records/<recordId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/domains/{domainId}/exit-choice

POST /api/v1/domains/{domainId}/exit-choice

Scopes: `domains:read`, `domains:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `domainId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/domains/<domainId>/exit-choice" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/domains/{domainId}/mail

GET /api/v1/domains/{domainId}/mail

Scopes: `domains:read`, `domains:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `domainId` | string | yes |  |

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes | Tenant the request acts on |

```
curl "https://api.yaya.page/api/v1/domains/<domainId>/mail?tenantId=<tenantId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/domains/{domainId}/mail

POST /api/v1/domains/{domainId}/mail

Scopes: `domains:read`, `domains:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `domainId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/domains/<domainId>/mail" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### GET /api/v1/domains/{domainId}/mailboxes

GET /api/v1/domains/{domainId}/mailboxes

Scopes: `domains:read`, `domains:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `domainId` | string | yes |  |

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes | Tenant the request acts on |

```
curl "https://api.yaya.page/api/v1/domains/<domainId>/mailboxes?tenantId=<tenantId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/domains/{domainId}/mailboxes

POST /api/v1/domains/{domainId}/mailboxes

Scopes: `domains:read`, `domains:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `domainId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/domains/<domainId>/mailboxes" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### DELETE /api/v1/domains/{domainId}/mailboxes/{mailboxId}

DELETE /api/v1/domains/{domainId}/mailboxes/{mailboxId}

Scopes: `domains:read`, `domains:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `domainId` | string | yes |  |
| `mailboxId` | string | yes |  |

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes | Tenant the request acts on |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/domains/<domainId>/mailboxes/<mailboxId>?tenantId=<tenantId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/domains/{domainId}/renew

POST /api/v1/domains/{domainId}/renew

Scopes: `domains:read`, `domains:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `domainId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/domains/<domainId>/renew" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/domains/{domainId}/transfer-out

POST /api/v1/domains/{domainId}/transfer-out

Scopes: `domains:read`, `domains:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `domainId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/domains/<domainId>/transfer-out" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/domains/check

GET /api/v1/domains/check

Scopes: `domains:read`, `domains:write`

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `host` | string | yes | Hostname to check |

```
curl "https://api.yaya.page/api/v1/domains/check?host=<host>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/domains/checkout

POST /api/v1/domains/checkout

Scopes: `domains:read`, `domains:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/domains/checkout" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### GET /api/v1/domains/checkout/status

GET /api/v1/domains/checkout/status

Scopes: `domains:read`, `domains:write`

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `session_id` | string | yes | Checkout session id returned by the purchase |

```
curl "https://api.yaya.page/api/v1/domains/checkout/status?session_id=<session_id>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/domains/exit-choices

GET /api/v1/domains/exit-choices

Scopes: `domains:read`, `domains:write`

```
curl "https://api.yaya.page/api/v1/domains/exit-choices" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PUT /api/v1/domains/primary

PUT /api/v1/domains/primary

Scopes: `domains:read`, `domains:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PUT "https://api.yaya.page/api/v1/domains/primary" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### GET /api/v1/domains/search

GET /api/v1/domains/search

Scopes: `domains:read`, `domains:write`

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `q` | string | yes | Domain search string |
| `tlds` | string | no | Comma-separated TLD filter |

```
curl "https://api.yaya.page/api/v1/domains/search?q=<q>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/domains/transfers

POST /api/v1/domains/transfers

Scopes: `domains:read`, `domains:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/domains/transfers" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/domains/transfers/start

POST /api/v1/domains/transfers/start

Scopes: `domains:read`, `domains:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/domains/transfers/start" \
  -H "Authorization: Bearer yaya_ak_..."
```

## Draft

### PUT /api/v1/tenants/{tenantId}/draft

PUT /api/v1/tenants/{tenantId}/draft

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PUT "https://api.yaya.page/api/v1/tenants/<tenantId>/draft" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### GET /api/v1/tenants/{tenantId}/draft/pages

GET /api/v1/tenants/{tenantId}/draft/pages

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>/draft/pages" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/tenants/{tenantId}/draft/pages

POST /api/v1/tenants/{tenantId}/draft/pages

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/draft/pages" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PATCH /api/v1/tenants/{tenantId}/draft/pages

PATCH /api/v1/tenants/{tenantId}/draft/pages

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PATCH "https://api.yaya.page/api/v1/tenants/<tenantId>/draft/pages" \
  -H "Authorization: Bearer yaya_ak_..."
```

### DELETE /api/v1/tenants/{tenantId}/draft/pages

DELETE /api/v1/tenants/{tenantId}/draft/pages

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/tenants/<tenantId>/draft/pages" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/tenants/{tenantId}/draft/pages/{slug}

POST /api/v1/tenants/{tenantId}/draft/pages/{slug}

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |
| `slug` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/draft/pages/<slug>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PATCH /api/v1/tenants/{tenantId}/draft/pages/{slug}

PATCH /api/v1/tenants/{tenantId}/draft/pages/{slug}

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |
| `slug` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PATCH "https://api.yaya.page/api/v1/tenants/<tenantId>/draft/pages/<slug>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### DELETE /api/v1/tenants/{tenantId}/draft/pages/{slug}

DELETE /api/v1/tenants/{tenantId}/draft/pages/{slug}

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |
| `slug` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/tenants/<tenantId>/draft/pages/<slug>" \
  -H "Authorization: Bearer yaya_ak_..."
```

## Drives

### GET /api/v1/drives/{driveId}/files

List Drive files

Scopes: `drive:read`, `drive:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `driveId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |

```
curl "https://api.yaya.page/api/v1/drives/<driveId>/files" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/drives/{driveId}/files/{path}

Read a Drive file

Scopes: `drive:read`, `drive:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `driveId` | string | yes |  |
| `path` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |

```
curl "https://api.yaya.page/api/v1/drives/<driveId>/files/<path>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/drives/{driveId}/files/finalize

Finalize a staged Drive upload

Scopes: `drive:read`, `drive:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `driveId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/drives/<driveId>/files/finalize" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### POST /api/v1/drives/{driveId}/files/uploads

Stage a Drive file write

Scopes: `drive:read`, `drive:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `driveId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/drives/<driveId>/files/uploads" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### POST /api/v1/drives/{driveId}/tokens

Create a scoped Drive token

Scopes: `drive:read`, `drive:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `driveId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/drives/<driveId>/tokens" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### DELETE /api/v1/drives/{driveId}/tokens/{tokenId}

Revoke a Drive token

Scopes: `drive:read`, `drive:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `driveId` | string | yes |  |
| `tokenId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/drives/<driveId>/tokens/<tokenId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/drives/default

Get or create the default Drive

Scopes: `drive:read`, `drive:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |

```
curl "https://api.yaya.page/api/v1/drives/default" \
  -H "Authorization: Bearer yaya_ak_..."
```

## Folders

### GET /api/v1/folders

List the account's folders

Scopes: `inventory:read`, `inventory:write`

```
curl "https://api.yaya.page/api/v1/folders" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/folders

Create a folder

Scopes: `inventory:read`, `inventory:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/folders" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

## Live

### POST /api/v1/tenants/{tenantId}/live

POST /api/v1/tenants/{tenantId}/live

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/live" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### DELETE /api/v1/tenants/{tenantId}/live

DELETE /api/v1/tenants/{tenantId}/live

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/tenants/<tenantId>/live" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

## Me

### GET /api/v1/me/analytics

GET /api/v1/me/analytics

Scopes: `account:read`, `account:write`

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `range` | string | no | Rollup window like 7d (default 30d) |

```
curl "https://api.yaya.page/api/v1/me/analytics" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/me/email-change

Pending account email change

Scopes: `email:write`

```
curl "https://api.yaya.page/api/v1/me/email-change" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/me/email-change

Start moving the account to a new email address

Scopes: `email:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/me/email-change" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### DELETE /api/v1/me/email-change

Cancel the pending email change

Scopes: `email:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/me/email-change" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/me/email-change/confirm

Confirm the email change with the emailed code

Scopes: `email:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/me/email-change/confirm" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### GET /api/v1/me/payment-methods

Saved payment methods and the account default

Scopes: `billing:read`, `billing:write`

```
curl "https://api.yaya.page/api/v1/me/payment-methods" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/me/payment-methods

Get a hosted page where the user saves a card

Scopes: `billing:read`, `billing:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/me/payment-methods" \
  -H "Authorization: Bearer yaya_ak_..."
```

### DELETE /api/v1/me/payment-methods/{id}

Remove a saved payment method

Scopes: `billing:read`, `billing:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/me/payment-methods/<id>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PUT /api/v1/me/payment-methods/default

Make a saved method the account default

Scopes: `billing:read`, `billing:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PUT "https://api.yaya.page/api/v1/me/payment-methods/default" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### PATCH /api/v1/me/profile

PATCH /api/v1/me/profile

Scopes: `account:read`, `account:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PATCH "https://api.yaya.page/api/v1/me/profile" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/me/variables

List service variables

Scopes: `account:read`, `account:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |

```
curl "https://api.yaya.page/api/v1/me/variables" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/me/variables/{name}

GET /api/v1/me/variables/{name}

Scopes: `account:read`, `account:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/me/variables/<name>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PUT /api/v1/me/variables/{name}

Create or update a service variable

Scopes: `account:read`, `account:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PUT "https://api.yaya.page/api/v1/me/variables/<name>" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### DELETE /api/v1/me/variables/{name}

Delete a service variable

Scopes: `account:read`, `account:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/me/variables/<name>" \
  -H "Authorization: Bearer yaya_ak_..."
```

## Mounts

### GET /api/v1/mounts

List vanity subdomain or domain mounts

Scopes: `publish:write`, `site:publish`

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `domain` | string | no |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |

```
curl "https://api.yaya.page/api/v1/mounts" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/mounts

Mount a Site at a vanity subdomain/domain path

Scopes: `publish:write`, `site:publish`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/mounts" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### GET /api/v1/mounts/{mount_path}

Get a mount

Scopes: `publish:write`, `site:publish`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `mount_path` | string | yes |  |

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `domain` | string | no |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |

```
curl "https://api.yaya.page/api/v1/mounts/<mount_path>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PATCH /api/v1/mounts/{mount_path}

Update a mount

Scopes: `publish:write`, `site:publish`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `mount_path` | string | yes |  |

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `domain` | string | no |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PATCH "https://api.yaya.page/api/v1/mounts/<mount_path>" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### DELETE /api/v1/mounts/{mount_path}

Delete a mount

Scopes: `publish:write`, `site:publish`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `mount_path` | string | yes |  |

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `domain` | string | no |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/mounts/<mount_path>" \
  -H "Authorization: Bearer yaya_ak_..."
```

## Profile

### GET /api/v1/profile

Get profile settings

Scopes: `profile:read`, `profile:write`

```
curl "https://api.yaya.page/api/v1/profile" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PATCH /api/v1/profile

Update profile settings

Scopes: `profile:read`, `profile:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PATCH "https://api.yaya.page/api/v1/profile" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### GET /api/v1/profile/sites

List Sites on profile

Scopes: `profile:read`, `profile:write`

```
curl "https://api.yaya.page/api/v1/profile/sites" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/profile/sites

Add Site to profile

Scopes: `profile:read`, `profile:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/profile/sites" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### DELETE /api/v1/profile/sites/{slug}

Remove Site from profile

Scopes: `profile:read`, `profile:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `slug` | string | yes | here.now Site slug. |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/profile/sites/<slug>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PATCH /api/v1/profile/username

Change profile username

Scopes: `profile:read`, `profile:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PATCH "https://api.yaya.page/api/v1/profile/username" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

## Publish

### GET /api/v1/publish/{slug}/files

List the live version's files

Scopes: `publish:read`, `publish:write`, `site:publish`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `slug` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/publish/<slug>/files" \
  -H "Authorization: Bearer yaya_ak_..."
```

### HEAD /api/v1/publish/{slug}/files

HEAD /api/v1/publish/{slug}/files

Scopes: `publish:read`, `publish:write`, `site:publish`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `slug` | string | yes |  |

```
curl -I "https://api.yaya.page/api/v1/publish/<slug>/files" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/publish/{slug}/files/{path}

Read one file from the live version

Scopes: `publish:read`, `publish:write`, `site:publish`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `slug` | string | yes |  |
| `path` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/publish/<slug>/files/<path>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### HEAD /api/v1/publish/{slug}/files/{path}

Read one file's headers from the live version

Scopes: `publish:read`, `publish:write`, `site:publish`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `slug` | string | yes | here.now Site slug. |
| `path` | string | yes | Site-relative file path, percent-encoded per segment (slashes kept). |

```
curl -I "https://api.yaya.page/api/v1/publish/<slug>/files/<path>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/tenants/{tenantId}/publish

POST /api/v1/tenants/{tenantId}/publish

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/publish" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### DELETE /api/v1/tenants/{tenantId}/publish

DELETE /api/v1/tenants/{tenantId}/publish

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/tenants/<tenantId>/publish" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

## Publishes

### GET /api/v1/publishes

List account Sites

Scopes: `publish:read`, `publish:write`, `site:publish`

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `folder` | string | no |  |
| `limit` | string | no |  |
| `cursor` | string | no |  |

```
curl "https://api.yaya.page/api/v1/publishes" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/publishes/search

Search account Sites

Scopes: `publish:read`, `publish:write`, `site:publish`

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `q` | string | yes | Publish search string |
| `limit` | string | no |  |
| `cursor` | string | no |  |

```
curl "https://api.yaya.page/api/v1/publishes/search?q=<q>" \
  -H "Authorization: Bearer yaya_ak_..."
```

## Site data

### GET /api/v1/tenants/{tenantId}/site-data/{collection}

GET /api/v1/tenants/{tenantId}/site-data/{collection}

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |
| `collection` | string | yes |  |

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | string | no | Max records to return |
| `cursor` | string | no | Keyset cursor from the previous page |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>/site-data/<collection>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/tenants/{tenantId}/site-data/{collection}

POST /api/v1/tenants/{tenantId}/site-data/{collection}

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |
| `collection` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/site-data/<collection>" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### GET /api/v1/tenants/{tenantId}/site-data/{collection}/{recordId}

GET /api/v1/tenants/{tenantId}/site-data/{collection}/{recordId}

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |
| `collection` | string | yes |  |
| `recordId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>/site-data/<collection>/<recordId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

## Site document

### GET /api/v1/tenants/{tenantId}/site-document

GET /api/v1/tenants/{tenantId}/site-document

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>/site-document" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PUT /api/v1/tenants/{tenantId}/site-document

PUT /api/v1/tenants/{tenantId}/site-document

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PUT "https://api.yaya.page/api/v1/tenants/<tenantId>/site-document" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/tenants/{tenantId}/site-document/sections

POST /api/v1/tenants/{tenantId}/site-document/sections

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/site-document/sections" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/tenants/{tenantId}/site-document/staged-commit

GET /api/v1/tenants/{tenantId}/site-document/staged-commit

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>/site-document/staged-commit" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/tenants/{tenantId}/site-document/staged-commit

POST /api/v1/tenants/{tenantId}/site-document/staged-commit

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/site-document/staged-commit" \
  -H "Authorization: Bearer yaya_ak_..."
```

## Site versions

### GET /api/v1/tenants/{tenantId}/site-versions

GET /api/v1/tenants/{tenantId}/site-versions

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>/site-versions" \
  -H "Authorization: Bearer yaya_ak_..."
```

### DELETE /api/v1/tenants/{tenantId}/site-versions/{versionId}

DELETE /api/v1/tenants/{tenantId}/site-versions/{versionId}

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |
| `versionId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/tenants/<tenantId>/site-versions/<versionId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/tenants/{tenantId}/site-versions/{versionId}/restore

POST /api/v1/tenants/{tenantId}/site-versions/{versionId}/restore

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |
| `versionId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/site-versions/<versionId>/restore" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

## Support

### POST /api/v1/support

Send an authenticated support request

Scopes: `support:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/support" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

## Tenants

### GET /api/v1/tenants

GET /api/v1/tenants

Scopes: `suite:read`

```
curl "https://api.yaya.page/api/v1/tenants" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/tenants

POST /api/v1/tenants

Scopes: `suite:read`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### GET /api/v1/tenants/{tenantId}

GET /api/v1/tenants/{tenantId}

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PATCH /api/v1/tenants/{tenantId}

PATCH /api/v1/tenants/{tenantId}

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PATCH "https://api.yaya.page/api/v1/tenants/<tenantId>" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### GET /api/v1/tenants/{tenantId}/analytics

GET /api/v1/tenants/{tenantId}/analytics

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>/analytics" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/tenants/{tenantId}/delete

POST /api/v1/tenants/{tenantId}/delete

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/delete" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### POST /api/v1/tenants/{tenantId}/domain-path

POST /api/v1/tenants/{tenantId}/domain-path

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/domain-path" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/tenants/{tenantId}/export

POST /api/v1/tenants/{tenantId}/export

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/export" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PATCH /api/v1/tenants/{tenantId}/folder

PATCH /api/v1/tenants/{tenantId}/folder

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PATCH "https://api.yaya.page/api/v1/tenants/<tenantId>/folder" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### PATCH /api/v1/tenants/{tenantId}/metadata

PATCH /api/v1/tenants/{tenantId}/metadata

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PATCH "https://api.yaya.page/api/v1/tenants/<tenantId>/metadata" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### GET /api/v1/tenants/{tenantId}/places

GET /api/v1/tenants/{tenantId}/places

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>/places" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/tenants/{tenantId}/site-status

GET /api/v1/tenants/{tenantId}/site-status

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>/site-status" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/tenants/{tenantId}/template

POST /api/v1/tenants/{tenantId}/template

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/tenants/<tenantId>/template" \
  -H "Authorization: Bearer yaya_ak_..."
```

## Theme

### GET /api/v1/tenants/{tenantId}/theme

GET /api/v1/tenants/{tenantId}/theme

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>/theme" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PUT /api/v1/tenants/{tenantId}/theme

PUT /api/v1/tenants/{tenantId}/theme

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PUT "https://api.yaya.page/api/v1/tenants/<tenantId>/theme" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

## Vanity urls

### GET /api/v1/vanity-urls

Both vanity roots at a glance

Scopes: `domains:read`, `domains:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |

```
curl "https://api.yaya.page/api/v1/vanity-urls" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/vanity-urls/domain

Vanity domain state

Scopes: `domains:read`, `domains:write`

```
curl "https://api.yaya.page/api/v1/vanity-urls/domain" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PUT /api/v1/vanity-urls/domain

Turn on the vanity domain

Scopes: `domains:read`, `domains:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PUT "https://api.yaya.page/api/v1/vanity-urls/domain" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### DELETE /api/v1/vanity-urls/domain

Turn off the vanity domain

Scopes: `domains:read`, `domains:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/vanity-urls/domain" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/vanity-urls/domain/provisioning

Retry vanity domain provisioning

Scopes: `domains:read`, `domains:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/vanity-urls/domain/provisioning" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/vanity-urls/name-existing-sites

Name the Sites that predate the vanity subdomain

Scopes: `domains:read`, `domains:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/vanity-urls/name-existing-sites" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### GET /api/v1/vanity-urls/subdomain

Vanity subdomain state

Scopes: `domains:read`, `domains:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |

```
curl "https://api.yaya.page/api/v1/vanity-urls/subdomain" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PUT /api/v1/vanity-urls/subdomain

Turn on the vanity subdomain

Scopes: `domains:read`, `domains:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PUT "https://api.yaya.page/api/v1/vanity-urls/subdomain" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### DELETE /api/v1/vanity-urls/subdomain

Release the vanity subdomain

Scopes: `domains:read`, `domains:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/vanity-urls/subdomain" \
  -H "Authorization: Bearer yaya_ak_..."
```

### GET /api/v1/vanity-urls/subdomain/availability

Is a vanity subdomain name available

Scopes: `domains:read`, `domains:write`

Query parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |

```
curl "https://api.yaya.page/api/v1/vanity-urls/subdomain/availability?name=<name>" \
  -H "Authorization: Bearer yaya_ak_..."
```

### POST /api/v1/vanity-urls/subdomain/provisioning

Retry vanity subdomain provisioning

Scopes: `domains:read`, `domains:write`

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Yaya-Tenant` | string | no | Tenant id or slug selecting the workspace for cookie-session callers; API keys are tenant-bound already |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X POST "https://api.yaya.page/api/v1/vanity-urls/subdomain/provisioning" \
  -H "Authorization: Bearer yaya_ak_..."
```

## Visitor tracking

### GET /api/v1/tenants/{tenantId}/visitor-tracking

GET /api/v1/tenants/{tenantId}/visitor-tracking

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

```
curl "https://api.yaya.page/api/v1/tenants/<tenantId>/visitor-tracking" \
  -H "Authorization: Bearer yaya_ak_..."
```

### PUT /api/v1/tenants/{tenantId}/visitor-tracking

PUT /api/v1/tenants/{tenantId}/visitor-tracking

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X PUT "https://api.yaya.page/api/v1/tenants/<tenantId>/visitor-tracking" \
  -H "Authorization: Bearer yaya_ak_..." \
  -H "Content-Type: application/json" \
  -d '<json body>'
```

### DELETE /api/v1/tenants/{tenantId}/visitor-tracking

DELETE /api/v1/tenants/{tenantId}/visitor-tracking

Scopes: `site:publish`, `suite:read`, `publish:read`, `keys:read`, `keys:write`

Path parameters:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string | yes |  |

Headers:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional idempotency key for safe retries |

```
curl -X DELETE "https://api.yaya.page/api/v1/tenants/<tenantId>/visitor-tracking" \
  -H "Authorization: Bearer yaya_ak_..."
```
