> ## Documentation Index
> Fetch the complete documentation index at: https://developer.maatstays.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> One error shape, twenty-four stable codes, and what to do about each.

Every error in this API is an
[RFC 7807](https://www.rfc-editor.org/rfc/rfc7807) problem document, served as
`application/problem+json`:

```json theme={null}
{
    "type": "https://developer.maatstays.com/errors/conflict",
    "title": "Conflict",
    "status": 409,
    "detail": "These nights are already booked or held on Maat, so the block was not applied: 2026-09-02, 2026-09-03.",
    "instance": "urn:maat:request:3b1f7a90-0d4c-4d4e-9b2a-6c1f0a2e5d33",
    "code": "conflict",
    "conflicts": ["2026-09-02", "2026-09-03"]
}
```

**Branch on `code`, never on `type` or the wording of `detail`.** `code` is the
contract; `title` and `detail` are for people and we reserve the right to rewrite them.
`instance` identifies this one occurrence — it is an identifier, not a URL — and quoting
it is the fastest way to find this request in our logs.

`code` is snake\_case. `type` is derived from it by replacing underscores with hyphens —
`workspace_scope_mismatch` becomes `…/errors/workspace-scope-mismatch` — so the two can never
be different vocabularies, and neither can be parsed out of the other by accident. Switch on
`code`.

The same list is published in the contract itself as
[`ProblemCode`](https://developer.maatstays.com/api-reference/enums/problem-code), which is what a generated client types
`code` as.

## The codes

Every problem document's `type` URI redirects here — both spellings of it, the hyphenated
one the URI carries and the snake\_case one `code` carries.

| `code` | Status | What happened | What to do |
| :- | :- | :- | :- |
| `validation_failed` | 400 | The payload does not match the published schema. | Read `errors[]` — it names each rejected field and the rule it broke. Fix the payload; do not retry unchanged. |
| `unauthorized` | 401 | No usable token: missing, malformed, expired, or its key was revoked. | Mint a fresh token and retry once. If it persists, your key has been revoked — see [Managing your keys](https://developer.maatstays.com/guides/managing-keys.md). |
| `workspace_scope_mismatch` | 403 | The token's environment does not match the workspace it addresses. | You are using a sandbox token where a production one is needed, or the reverse. Check which key you exchanged. Never retry unchanged. |
| `insufficient_scope` | 403 | The key behind your token was not issued with this operation's scope. | `detail` names the scope. Scopes are fixed at issue, so the fix is a new key that carries it. Nothing was written. Never retry unchanged. See [Scopes](https://developer.maatstays.com/guides/scopes.md). |
| `property_not_found` | 404 | No such property in the workspace your key addresses. | Check the `listing_id` or `provider_id` you sent. Nothing was written. |
| `listing_not_found` | 404 | No such listing in the workspace your key addresses. | Check the `listing_id` you sent. One answer covers "no such listing" and "not yours". Nothing was written. |
| `unit_not_found` | 404 | No such unit in the workspace your key addresses. | Check the `unit_id` you sent. One answer covers "no such unit" and "not yours". |
| `booking_not_found` | 404 | No such booking in the workspace your key addresses. | Check the `booking_reference` you sent. One answer covers "no such booking" and "another workspace's". Nothing was written. |
| `review_not_found` | 404 | No such review in the workspace your key addresses. | Check the `review_id` you sent. One answer covers "no such review" and "one on a listing outside your workspace". Nothing was written. |
| `delivery_not_found` | 404 | No such webhook delivery for your credential. | Check the `delivery_id` you sent. One answer covers "no such delivery" and "another recipient's delivery" — deliveries also age out of the retention window. Nothing was written. |
| `conflict` | 409 | The request is well formed; the state of the resource cannot answer it right now — a calendar-block collision, a `provider_id` or `external_uid` already in use in your other environment (sandbox or live), a booking that is not `pending`, a review that already has a reply from your workspace, a redrive refused because the delivery is in flight, its body is gone, or its endpoint is not active, or a secret rotation with no endpoint registered. | Read `detail` for which. **Only the calendar-block collision carries `conflicts[]`** — every other producer carries none, so check for the field before reading it. Nothing was written or changed in any case. |
| `property_not_simple` | 409 | The property is not one unit with one listing. | A targeted edit addressed at "the property" has no single thing to change. Nothing was written. Temporary — see below. Never retry unchanged. |
| `listing_pooled_unsupported` | 409 | The listing sells a room type over several rooms, so a calendar block has no single unit to close. | A block closes one unit; such a listing's room is chosen per booking. Nothing was written. Never retry unchanged. |
| `inventory_not_supported` | 409 | The listing is an experience or a service, not a stay. | This contract manages stays. Read the listing's `inventory_kind` and leave it alone. Nothing was written. Never retry unchanged. |
| `pricing_mode_conflict` | 409 | The listing's price is set by another source, so this write would never apply. | Only the host can release the other source, from the Maat app. `detail` does **not** name it — which vendor or which other integration a host has engaged is a fact about their business, not something a refusal hands out. Nothing was written. Never retry unchanged. |
| `rotation_in_progress` | 409 | A signing-secret rotation overlap is still open on your webhook endpoint, so a second rotation was refused. Only `POST /v1/webhooks/endpoint/rotate-secret` produces it. | **Nothing was rotated**, and the secret your last rotation returned is still the live one — read this as proof that the call you are retrying already landed. `detail` names the instant the window closes; rotate again after it. We sign with two secrets at a time, so a second rotation inside the window would evict the one you are verifying with. If your secret leaked, delete the endpoint and register it again instead. |
| `sandbox_only` | 409 | The operation acts on sandbox inventory only, and you called it with a Live key or named a listing in your own live workspace. Only `POST /v1/sandbox/bookings` produces it. | **Nothing was created.** Call it with a sandbox key, naming the matching listing from your sandbox workspace. No amount of retrying or moving the dates changes the answer. Distinct from `conflict` on the same operation, which means the nights are taken and a different window will work. A listing outside your own live/sandbox pair answers `404 listing_not_found`, not this. |
| `photo_not_found` | 404 | No such photo on that property. | Check the `photo_id` you sent. One answer covers "no such photo" and "another property's photo". Read `GET /v1/properties/{property_id}/photos` back and send the order again. |
| `rate_limited` | 429 | Too many requests for this key — the shared hourly gateway ceiling, which every contract call draws on together. | Wait `Retry-After` seconds, then resume. See [Rate limits](https://developer.maatstays.com/guides/rate-limits.md). |
| `redrive_budget_exhausted` | 429 | Your replay allowance for the trailing 24 hours is spent. Only `POST /v1/webhooks/deliveries/{delivery_id}/redrive` produces it. | Wait `Retry-After` seconds — it is the wait until the oldest replay falls out of the rolling window. A separate ceiling from `rate_limited`, which is the hourly one. Nothing was replayed. |
| `test_event_budget_exhausted` | 429 | Your test-event allowance for the trailing 24 hours is spent. Only `POST /v1/webhooks/endpoint/test` produces it. | Wait `Retry-After` seconds — the wait until the oldest test falls out of the rolling window. Its own counter, separate from both `rate_limited` and the redrive allowance. Nothing was queued. |
| `photo_quota_exceeded` | 429 | This key has presigned its whole allowance of photos for today. Only `POST /v1/properties/{property_id}/photos/presign` produces it — and that operation also answers `rate_limited`, so branch on `code`. | Stop the import and resume after midnight UTC. **Not** `rate_limited` — there is no `Retry-After` and it does not clear within the hour. Nothing was reserved. |
| `internal_error` | 500 | Our fault. | Retry an idempotent request with backoff. Keep `instance` — it identifies this one occurrence in our logs. Use `GET /v1/blocks` to check whether a push landed. |
| `not_enabled` | 501 | Retired on 2026-10-23. No operation answers it; kept so an existing client's union stays valid. | Nothing to handle. A branch on it is dead code and can be deleted. |
| `service_unavailable` | 503 | Something on our side could not serve this request — either a capability the operation needs is not configured, or a part of Maat it depends on did not answer. `detail` says which, and what did not happen. | Not a rejection of your request; **nothing was written and nothing was disclosed**. Retry with backoff. It is never a degraded answer: we would rather say we could not do something than hand you a plausible result that is not true. |

Two codes carry a typed extension member: `validation_failed` adds `errors[]`
(`{ field, code }` per rejected field — never the value you sent), and `conflict` adds
`conflicts[]` (every colliding date, untruncated) **on the calendar-block collision only** — its
other producers carry no `conflicts[]` at all. Parse those, not the prose.

`errors[].code` names the rule a field broke, from
[`ValidationErrorCode`](https://developer.maatstays.com/api-reference/enums/validation-error-code). Show it beside `field`;
do not switch on it. Most of that vocabulary is the validator's own rule names; a few name a
check that needs something your request does not carry, such as the currency a listing is
priced in. Either way it can gain members — and an unrecognised value means what a recognised
one means, that the field was not accepted. `field` is the part to act on.

## One refusal, several causes — on purpose

Some errors do not say which of several checks failed. An unknown key, a
revoked key and a wrong secret all answer the same `401`; a sandbox/production mismatch
and a workspace that does not resolve answer the same `403 workspace_scope_mismatch`; a
listing that does not exist and one that belongs to another workspace answer the same `404`.
Distinguishing them would let anyone enumerate credentials, tenants or another customer's
inventory. If you are stuck on one of these, more requests will not tell you more; see
[Get access](https://developer.maatstays.com/guides/developer-access.md) for who to ask.

`insufficient_scope` is the exception: it names the scope you lack, because a scope is a
fact about your own credential and not about anybody else's data.

`photo_not_found` follows the same rule as the other three: one answer covers a photo that
does not exist and a photo that belongs to a different property, and the lookup behind it
is a single statement narrowed by both ids, so the two are indistinguishable in timing as
well as in wording.

## The five 409s that are not conflicts

`conflict` covers several different situations across this API, but they share one shape:
the request was fine, and the resource's own state is what cannot answer it right now — a
collision over the nights, a booking not currently `pending`, and so on. Some of those clear
on their own (wait, then retry) and some do not (a review already replied to never will). The
five codes beside it are a different kind of refusal, and re-sending will never help any of
them: they say the resource is the wrong **kind of thing** to address that way, or that
it is not yours to set.

`property_not_simple` means the property has more than one unit, or more than one
listing (or the unit is pooled inventory under a parent unit). The targeted edits —
`PUT /v1/properties/{property_id}/address`, `…/amenities`, `PATCH /v1/units/{unit_id}`,
`PUT /v1/units/{unit_id}/house-rules`, `PATCH /v1/listings/{listing_id}` and
`PUT /v1/listings/{listing_id}/pricing` — manage a property that is one unit with one
listing, which is every property this API can create today. It is a **temporary
refusal**: multi-unit routes will be additions later, not renames of these, so nothing
you build now moves.

`listing_pooled_unsupported` means the listing sells a room type over several physical
rooms — ten identical doubles, say — and Maat picks the room per booking. A calendar block
closes ONE unit, so `PUT /v1/blocks/{external_uid}` and
`POST /v1/listings/{listing_id}/calendar/blocks` have nothing single to close and write
nothing. Like `property_not_simple`, it is about the listing's shape, not its state.

`inventory_not_supported` means the listing is an experience or a service — something
sold by the seat rather than by the night, for which "bedrooms", "check-in time" and "a
nightly rate" have no answer. The reads return such a listing **with its
`inventory_kind`** rather than pretending it does not exist, because telling you your own
listing is missing would send you hunting through your own catalogue. The writes are
where the refusal belongs.

`pricing_mode_conflict` means this listing's price is set by another source, so a rule
you attached would never be evaluated. Retrying cannot succeed while that is true — and
it is not something this API can change: the source is released by the workspace, in the
Maat app. Until then a quick action on that listing is refused rather than stored
somewhere it would silently do nothing.

`sandbox_only` means the operation you called acts on sandbox inventory only and you pointed
it at live inventory: you called it with a Live key, or you named a listing in your own
**live** workspace — almost always an id copied from your production dashboard. One operation
produces it: `POST /v1/sandbox/bookings`, the booking fixture. For a named listing it is a
`409` rather than a `404` for the same reason `property_not_simple` is: the listing is
yours and you can see it on every read, so telling you it does not exist would send you
hunting through your own catalogue. It has its own code rather than sharing `conflict` because
that operation answers both, and only one of them is worth retrying: `conflict` there means
the nights are taken and a different window will work.

It is scoped to **your own live/sandbox pair**. A listing that belongs to neither half of it
answers `404 listing_not_found`, the same as an id that names nothing at all — so this code
never tells you anything about inventory that is not yours.

Nothing is written in any of the five cases.

## Four 429s, and they are not the same wait

`rate_limited` is the per-key ceiling on requests. It clears within the hour, it carries
`Retry-After`, and backing off is the whole answer.

`redrive_budget_exhausted` is the replay allowance on
`POST /v1/webhooks/deliveries/{delivery_id}/redrive`, over a **rolling** 24 hours rather
than a calendar day: it frees up as the window moves past an earlier replay, and
`Retry-After` is the wait until it does. Only that one operation produces it, which is what
tells it apart from the hourly ceiling that can fire on any call.

`test_event_budget_exhausted` is the same shape of allowance on
`POST /v1/webhooks/endpoint/test` — rolling 24 hours, `Retry-After` until the oldest test
falls out of the window — and its own counter: recovering a backlog with redrives and
exercising a handler with test events never compete for one figure.

`photo_quota_exceeded` is the per-key ceiling on **photos presigned per UTC day**. It does
not clear within the hour and it carries no `Retry-After`, because there is no short wait
that would help. The answer is to stop the import and resume tomorrow. The presign draws on
the hourly ceiling too, so a `429` from it is one of two codes and only one of them names an
interval — read `code` before you read `Retry-After`.

They are separate codes precisely so you do not poll a day-long refusal on an hourly
timer. Nothing is reserved, no upload is authorized and nothing is replayed when any of
them fires. See [Rate limits](https://developer.maatstays.com/guides/rate-limits.md).

## There is no exception

Every response in this API is a problem document, the token exchange included. `POST
/v1/token` used to answer `{ "message": … }`; it now answers `401 unauthorized` and `503
service_unavailable` in the same RFC 7807 shape as everything else, so one error handler
covers the first call of a session and every call after it. See the
[changelog](https://developer.maatstays.com/guides/changelog.md) for the date.

> [!NOTE]
>
> The `type` URIs are stable identifiers, and `code` is what you should branch on. Do not fetch a
> `type` URI at runtime — it redirects to [the code table above](#the-codes) for a person to read,
> and it is not an API. All twenty-four land at the top of that one table rather than on a block
> of their own, so following `…/errors/conflict` and following `…/errors/sandbox_only` puts you in
> the same place: find your row in the `code` column.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.