MenuOverview

ZenHost Public API

Read Properties, Restrictions and bookings, and write Restrictions, for the ZenHost accounts that connect your App.

The ZenHost Public API lets software you build (a revenue management tool, a PMS, an in-house script) read the Properties, Restrictions and bookings of a ZenHost account, and write its Restrictions (rates, minimum stays, closed to arrival or departure, availability), and answer its guests (conversations, Property Guide, access codes), once the owner of that account has connected your App.

Common tasks

Bookings and Restrictions are filtered by Property: pass property_id[] once to work on a single Property, or repeat it to name up to 100 Properties in one call.

Base URL and contract

Base URL: https://app.zenhost.com/api/v1. Every call is JSON over HTTPS and carries an OAuth access token. The account comes from the token, never from the URL: an App serving several accounts holds one App Connection, and one set of tokens, per account.

The complete contract is the OpenAPI 3.1 document at https://app.zenhost.com/api/v1/openapi.json: generate your client from it. The API reference is rendered from the same document.

Get an App

There are no self-service API keys. ZenHost registers every App itself, so only software it has approved can ask for access to an account. To get one, contact ZenHost (or write to support@zenhost.com) with:

  • the name, publisher, logo and a contact email for your App;
  • your exact redirect URIs (HTTPS; http://localhost is accepted for development);
  • the Permissions you need, and why;
  • optionally, an HTTPS App Webhook URL and the App Events you want to receive.

ZenHost sends you a client_id and a client_secret (and a webhook signing secret). Secrets are shown once: store them in a secret manager. A new App is private: only the accounts ZenHost lists for it can connect it. ZenHost can later make it public, without touching existing connections.

Permissions

The owner accepts all the Permissions of your App, or none, and chooses which Properties it may act on (all of them, including future ones, or a list). Permissions are independent: a pricing tool needs both restrictions.read and restrictions.write.

PermissionAllows
properties.readRead the Properties
restrictions.readRead the Restrictions (rates, availability, rules)
restrictions.writeWrite the Restrictions (rates, availability, rules)
bookings.readRead the Bookings
guests.readRead the guest contact details of the Bookings
prices.readRead the amounts of the Bookings
messages.readRead the Message Threads and their messages
messages.writeSend messages to guests and close or reopen conversations (SMS billed to the host)
property_guide.readRead the practical information of the Properties (Property Guide), Wi-Fi included
lock_codes.readRead the access codes of the Bookings (Lock Codes and Static Codes)