# Settings reference

Fields, eligibility, and validation for project settings.

## Request

Both `POST /v1/upload` and `PUT /v1/upload` accept a multipart text field named `settings` containing one JSON object. The retired `siteSettings` field returns `FIELD_RETIRED`.

| Operation | What to send |
| --- | --- |
| Create | Content `files`, optional `domain`, and optional `settings` or image parts. |
| Update settings on an owned project | Existing `domain` and a nonempty settings change or supported image part. Omit content `files` to keep them. |
| Replace content | Existing `domain` and complete `files` set. Add `settings` only for the changes you want. |

Omitted settings preserve existing values. A settings-only update still passes the applicable plan and quota checks. Missing or unowned projects with no content files return `FILES_REQUIRED`.

## Fields and eligibility

| Key | Validation and use |
| --- | --- |
| `accessMode` | One of `public`, `password`, `email_gate`, `email_protect`. See [Access control](../access-control/). |
| `password` | Required only with `password` mode. Nonempty string without a colon. Solo, Pro, and Pro Max. |
| `allowedEmails` | Required only with `email_protect`. Nonempty array of full addresses. Pro and Pro Max. |
| `comments` | Boolean. See [Comments and feedback](../comments/). |
| `leadCapture` | Optional nested `mode`, `title`, `description`, `ctaText`, and `ctaLink`. See [Promotional slide-in](../promotional-slide-in/). |
| `pageTitle`, `metaDescription` | Strings, up to 60 and 145 characters. See [Page title and description](../metadata/). |
| `removeOgImage`, `removeLogo` | Booleans. Use `true` to remove the matching custom image. See [Preview images and favicons](../preview-images/). |
| `disableIndexing` | Boolean. `true` hides the project from search engines. Paid plans. See [Search indexing](../search-indexing/). |

`email_gate` is available on Pro and Pro Max. New SSO access changes are managed in the dashboard.

## Update an owned project {#test-an-owned-site}

Set `TIINY_API_KEY` and replace the hostname with an existing project you own.

```bash
curl --fail-with-body -X PUT https://ext.tiiny.host/v1/upload \
  -H "x-api-key: $TIINY_API_KEY" \
  -F 'domain=example.tiiny.site' \
  --form-string 'settings={"comments":true,"pageTitle":"Quarterly report"}'
```

## Validation response

`400 INVALID_SITE_SETTINGS` includes an `errors` array. Each item identifies the field, code, and message.

```json
{
  "success": false,
  "code": "INVALID_SITE_SETTINGS",
  "message": "Some site settings couldn't be applied.",
  "errors": [
    {"field":"pageTitle","code":"TOO_LONG","message":"Page title can be at most 60 characters."}
  ]
}
```

| Stage | Error codes |
| --- | --- |
| Parse and validate JSON | `FIELD_RETIRED`, `INVALID_JSON`, `UNKNOWN_SETTING`, `INVALID_VALUE` |
| Validate field combinations | `PASSWORD_REQUIRED`, `PASSWORD_WITHOUT_PASSWORD_MODE`, `EMAIL_LIST_REQUIRED`, `EMAILS_WITHOUT_EMAIL_PROTECT_MODE`, `CONFLICTING_IMAGE_SETTINGS` |
| Check eligibility and values | `FEATURE_NOT_IN_PLAN`, `SSO_MANAGED_IN_DASHBOARD`, `INVALID_PASSWORD`, `INVALID_EMAIL_LIST`, `TOO_LONG`, `INVALID_URL` |
| Check images | `INVALID_IMAGE_FORMAT`, `IMAGE_TOO_LARGE`, `INVALID_IMAGE_DIMENSIONS` |
