Quick start with curl

Five common jobs from a terminal: list listings, read the calendar, change a price with preview and approval, list bookings, message a guest.

Before you start

Create a key in Hostemi under Settings, AI & apps (writes need the key to have pms:write), and keep it in a variable:

export HOSTEMI_KEY=hst_your_key
export API=https://api.hostemi.com/public/v1

Every example below is one call. Ids look like cmwhux6y60026somfhixjmcm8; take yours from the first call.

1. List your listings

curl

curl -s "$API/units" -H "Authorization: $HOSTEMI_KEY"

The answer is { "units": [ … ] }: each listing with its id, its property, and its price plans with the base price in minor units.

2. Read the calendar

curl

curl -s "$API/calendar?unitId=cmwhux6y60026somfhixjmcm8&from=2026-12-01&to=2026-12-31" -H "Authorization: $HOSTEMI_KEY"

Per listing and night: whether it can be sold, booked, or blocked by the owner or for maintenance, plus the bookings and blocks of the range. from and to are both included. Prices per night: GET /rates with the same query.

3. Change a price, with preview and approval

Price changes are previews first. Ask for one (whole range, every platform; amounts in minor units):

curl -s -X POST "$API/pricing/bulk" -H "Authorization: $HOSTEMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"unitIds":["cmwhux6y60026somfhixjmcm8"],"ranges":[{"from":"2026-12-01","to":"2026-12-07"}],"price":{"set":13500}}'

The answer is the preview: a diff of every night (before and after) and a changeId that starts with chg_pc_. Nothing is written. Apply it:

curl -s -X POST "$API/changes/chg_pc_…/apply" -H "Authorization: $HOSTEMI_KEY"

In "Make routine changes" or "Make all changes without asking" that applies it (a move above 25 percent still waits). In "Ask before changes" the answer says needs_approval with the approvalUrl: send it to the host, and once they approved in the app, the change is applied exactly as previewed. GET /changes/chg_pc_… tells you where it stands; applying twice changes once.

To only look, add ?dryRun=true to the preview: the answer carries dryRun: true and wouldNeedApproval, and no approval is made, so there is no link and nothing in the host's list.

The same from a terminal: hostemi pricing set cmwhux6y60026somfhixjmcm8 2026-12-01:2026-12-07 --price 135 --dry-run, then hostemi apply chg_pc_… --wait.

4. List bookings

curl

curl -s "$API/reservations?from=2026-12-01&to=2026-12-31&status=CONFIRMED" -H "Authorization: $HOSTEMI_KEY"

{ "reservations": [ … ] }, each with id, status, source, arrivalDate, departureDate (the morning the guest leaves), bookedOn, totalAmountMinor, currency, the guest, the listing and the property. from/to match stays that overlap the range. One booking: GET /reservations/{id}.

5. Message a guest

curl

curl -s -X POST "$API/reservations/cmwkahsef000b2ikz2r939nf4/messages" -H "Authorization: $HOSTEMI_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: parking-reply-cmwkahsef000b2ikz2r939nf4" \
  -d '{"body":"Hello! Parking is free on the street in front of the house."}'

Sending to a guest is a risky change: it waits for the host in "Ask before changes" and in "Make routine changes". The answer is a 202, and nothing has been sent:

202 Accepted (the shape the server sends; ids illustrative)
{
  "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."
}

Give the host the approvalUrl; GET /changes/{changeId} says when it was applied. A reply draft that sends nothing is POST /threads/{id}/draft (hostemi messages draft), saved at once in every setting.

Next

See also: dates, money and pagination, errors, every endpoint.

Something missing from this page? Write to [email protected], or use the form on the Help page.