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/v1Every 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"hostemi
hostemi units list --jsonThe 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"hostemi
hostemi calendar cmwhux6y60026somfhixjmcm8 2026-12-01:2026-12-31 --jsonPer 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"hostemi
hostemi bookings list --from 2026-12-01 --to 2026-12-31 --status CONFIRMED --json{ "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."}'hostemi
hostemi messages send cmwkahsef000b2ikz2r939nf4 --text "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:
{
"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.