---
title: "Changes, previews and approvals | Hostemi"
description: "How a write becomes a change: risk classes, the 202 that waits for the host, applying a preview, and what only the host can do."
canonical: https://hostemi.com/docs/api/operations
source: https://hostemi.com/docs/api/operations.md
---

# Changes, previews and approvals

How a write becomes a change: risk classes, the 202 that waits for the host, applying a preview, and what only the host can do.

#### On this page

1. [Every write is classified](#every-write-is-classified)
2. [The 202 that waits for the host](#the-202-that-waits-for-the-host)
3. [Following and applying a change](#following-and-applying-a-change)
4. [Price previews](#price-previews)
5. [Only the host](#only-the-host)
6. [Domain operations, not rows](#domain-operations-not-rows)

## Every write is classified

Each write route has a class, and the workspace's approval setting decides what the class means:

| Setting | Draft | Normal | Risky | Host only |
| --- | --- | --- | --- | --- |
| Ask before changes (default) | applies | 202, host approves | 202, host approves | 403 HUMAN\_ONLY |
| Make routine changes | applies | applies | 202, host approves | 403 HUMAN\_ONLY |
| Make all changes without asking | applies | applies | applies | 403 HUMAN\_ONLY |

A normal write becomes risky by its size: a price move above 25 percent, a block or stop-sell of 14 nights or more. Risky are also sending a message to a guest, cancelling a booking, a refund, publishing the website, taking a platform live, pausing or remapping it.

## The 202 that waits for the host

Nothing ran. The exact call (route, parameters, body) is stored, bound to the state of what it changes, valid for 24 hours:

202 Accepted

```json
{
  "status": "APPROVAL_REQUIRED",
  "applied": false,
  "changeId": "chg_cmwmoi1wo0089soerm2bpw16z",
  "approvalId": "cmwmoi1wo0089soerm2bpw16z",
  "action": "api:POST /reservations/:id/messages",
  "riskClass": "RISKY",
  "summary": "Send a message to the guest of a booking at Lake house.",
  "preview": {},
  "approvalPath": "/app/approve/cmwmoi1wo0089soerm2bpw16z",
  "approvalUrl": "https://hostemi.com/app/approve/cmwmoi1wo0089soerm2bpw16z",
  "expiresAt": "2026-11-20T09:12:31.548Z",
  "instruction": "NOTHING HAS CHANGED YET. The host has to approve this change. Read the summary to them and give them the approvalUrl (it opens the approval in the app; they must be signed in). Do not retry and do not look for another way to do it. Once they approve, the server applies the change exactly as shown; call apply_change with this changeId to learn the outcome."
}
```

A body the route would refuse is refused with the same `400` before anything is stored.

## Following and applying a change

| Route | What it does |
| --- | --- |
| GET /changes/{id} | The state of a change: `preview`, `needs_approval`, `applied`, `declined`, `expired`, with `result` once applied. Takes a `changeId` (`chg_…`) or an `approvalId`. |
| POST /changes/{id}/apply | Applies a previewed change when the setting allows, or after the host approved. Applying twice changes once. |
| GET /approvals | The changes waiting for the host. |
| GET /approvals/{id} | One of them: PENDING, APPROVED, APPLIED, DECLINED, DISMISSED or EXPIRED. |

## Price previews

Pricing commands (`POST /pricing/commands`, `POST /pricing/bulk`) are previews by nature: the answer carries a `diff` and a `changeId` starting with `chg_pc_`, nothing written. Apply with `POST /changes/{changeId}/apply`; if the host has to approve, the answer says so and carries the link.

## Only the host

No API call approves a change: approving happens in the app, signed in as a person. Keys, team members and roles, payment details, billing, the approval setting, deleting the workspace, archiving a property and disconnecting a platform answer `403` with `code: HUMAN_ONLY`, the `action` and the `appUrl` where the host does it.

## Domain operations, not rows

Routes are business operations ("change the price of these nights", "cancel this booking"), never "update a database row": that is what lets every write carry a class, a preview, guardrails and an entry in the change history with the API key that made it.

Documentation pages

Something missing from this page? Write to [hello@hostemi.com](mailto:hello@hostemi.com), or use the form on the [Help](https://hostemi.com/help) page.
