Skip to content

Guide

Keys and scopes(who may do what)

An is a long secret code. It proves who is calling. Each key has . A scope is one thing the key is allowed to do.

The idea

A key answers two questions for ZimmerStack. Who is calling? What may this caller do?

Here is one example. The owner of The Lantern House makes a key for your software. The owner gives it one scope, ari:write. Now your software can update , and for that hotel. It cannot read bookings. The key has no scope for that.

A key
A long secret code. Keep it safe like a password.
A scope
One permission of a key. A key can hold many scopes.
A hotel key
Works for one hotel only.
A company key
Works for all the hotels of one software company.

Every carries the key in one . Its name is Authorization.

the header of every request
Authorization: Bearer zsk_live_… (zsk_test_… on a sandbox)
Where the key goes
In the Authorization header, and nowhere else.
Never put the key in
query string, x-api-key, user-api-key. A key in one of these places is not read.
How a key looks
A starts with zsk_live_. A starts with zsk_test_. A test key works only on a .
Shown one time
You see the full key only when it is made. Save it then. Nobody can show it to you again.
What a hotel key can touch
A request with a hotel key acts as the hotel's owner, for that one hotel and nothing else.

Two kinds of key

There are two kinds of key, and one API. A belongs to one . A belongs to a software company. The addresses, the data you send and the answers are the same for both.

  • Who holds it
    Hotel keyThe developer of one hotel, or that hotel's PMS.
    Company keyA software company whose product serves many hotels on ZimmerStack.
  • Who makes it
    Hotel keyThe hotel's owner. In Admin, under Developers. Or in Channels, under Integrations.
    Company keyYour company, in the partner portal, under Developers. It is shown one time. You switch it off there too.
  • How a request names the hotel
    Hotel keyIt does not. The key belongs to one hotel. No extra header.
    Company keyWith the header X-ZS-Property. Its value is the property id from GET /properties.
  • Which hotels it works for
    Hotel keyThat one hotel.
    Company keyA live key: every hotel you added, and every hotel whose owner allowed your company. A test key: the test hotels in your own sandbox only. It can also create them.
  • Scopes
    Hotel keyAny scope the owner gives: for the channel manager, and for bookings.
    Company keyThe channel manager scopes, and six scopes only a company key can hold. On a live key none of the six is ticked at the start. On a test key one is ticked: adding and removing hotels. Not the bookings scopes.
  • Rate limits
    Hotel keyCounted for the key, and for the hotel.
    Company keyEach hotel keeps its own limits. The company key also has one limit across all its hotels: 1,200 requests a minute.

A request with a company key

A company key works for many hotels. So each request must say which hotel it is for. You do that with the header . Put the hotel's id in place of YOUR_PROPERTY_ID.

Open a terminal and run this. On Windows PowerShell, type curl.exe instead of curl.

terminal
curl "https://api.zimmerstack.com/api/v1/connect-api/v1/catalog" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "X-ZS-Property: YOUR_PROPERTY_ID"
Find out which key you hold
Send List your hotels. It works for both kinds. The field keyKind says property or company. Read it first, and one piece of software can serve both kinds.
A company key with no header
The answer is 400 PROPERTY_REQUIRED. Add the header.
Requests that need no header
The requests about your own company: GET /properties, POST /properties, PATCH /properties/{propertyId}, DELETE /properties/{propertyId}, /properties/{propertyId}/keys, /webhook-endpoints, /connect-links, /billing and /support-tickets.
Requests that work both ways
GET /requests, GET /limits and GET /status. Without the header they answer for your company. With it they answer for one hotel.
A hotel the key may not use
The answer is 404 PROPERTY_NOT_FOUND. It is the same answer if the hotel does not exist at all.
A hotel key that names another hotel
A hotel key needs no header. If it sends X-ZS-Property with another hotel's id, the answer is 404 PROPERTY_NOT_FOUND.
A hotel that is not live yet
An update of availability, rates or restrictions is refused with 409 ARI_NOT_AUTHORITATIVE. This happens when your software is not yet that hotel's . It is the same for a company key and for a hotel's own key. A hotel you add yourself is live from the start. For any other hotel, see Go live.
When an owner takes your access back
A hotel's owner allows your company by your vendor code, in Integrations, under Software vendors. The owner can end this at any time. Your key stops working for that hotel on the next request.
Webhooks for a company key
One company receives the booking and sync events of every hotel a live company key works for. Each event names its hotel in property.id. A sandbox endpoint receives the events of your sandbox. Webhooks has the rest.
A paused or suspended endpoint
A pause keeps the events, for up to 90 days. They are sent in order when you resume. A suspension comes after 72 hours of failures, and it drops the events. You can ask for them again with Send missed webhooks again, or with Recover since in the partner portal. Only events of hotels that allowed your company then, and still do, are sent again.

Scopes

The person who makes a key chooses its scopes. They can be changed later, and the key stays the same. Every address of the API needs one scope. A key without that scope gets 403 SCOPE_MISSING.

To see the scopes of your key, send Check your key. The answer lists them.

  • Scopeari:read
    Lets the keyRead availability, rates and restrictions. See if an update is still on its way to the OTAs.
    Which key can hold itBoth kinds
  • Scopeari:write
    Lets the keyUpdate availability, rates and restrictions. ZimmerStack sends them to every connected OTA.
    Which key can hold itBoth kinds
  • Scopecatalog:write
    Lets the keyCreate and change room types and rate plans.
    Which key can hold itBoth kinds
  • Scopechannel-modifiers:write
    Lets the keySet the price modifier of one OTA. It changes every price sent to that OTA from then on.
    Which key can hold itBoth kinds
  • Scopechannel-bookings:read
    Lets the keyRead the bookings that came from the OTAs.
    Which key can hold itBoth kinds
  • Scopedirect-bookings:read
    Lets the keyRead the bookings guests made on the hotel's own website.
    Which key can hold itBoth kinds
  • Scopedirect-bookings:cancel
    Lets the keyCancel a booking made on the hotel's own website. You choose the refund: by the booking's policy, in full, or none.
    Which key can hold itBoth kinds
  • Scopebookings:read
    Lets the keyRead the bookings this key created.
    Which key can hold itA hotel key only
  • Scopebookings:write
    Lets the keyCreate and cancel bookings in the ZimmerStack PMS. The free rooms on every OTA change with them.
    Which key can hold itA hotel key only
  • Scopebookings:payments
    Lets the keyRecord a payment on a booking the key creates. The key must also hold bookings:write.
    Which key can hold itA hotel key only
  • Scopeproperties:write
    Lets the keyAdd a hotel. Change or remove a hotel you added.
    Which key can hold itA company key only
  • Scopewebhooks:manage
    Lets the keyManage your company's webhook endpoints: create, change, pause, test, send again, and read what was sent.
    Which key can hold itA company key only
  • Scopechannels:connect
    Lets the keyMake connect links: the last step of connecting an OTA. Except on Airbnb, the OTA must first accept our connectivity partner for the hotel. Then the hotel's own person opens the link. The same scope manages an OTA that is connected: read and change its mapping, disconnect it, and open the channel console.
    Which key can hold itA company key only
  • Scopekeys:manage
    Lets the keyList, make, replace and switch off the keys you made for a hotel. Never a company key.
    Which key can hold itA company key only
  • Scopebilling:read
    Lets the keyRead your invoices, your next invoice, money paid ahead and your hotel quota. It cannot pay or change anything.
    Which key can hold itA company key only
  • Scopesupport:write
    Lets the keyOpen a support ticket, read your tickets, add a message and close one.
    Which key can hold itA company key only
The channel manager scopes
These are ari:read, ari:write and the others that are not about bookings in the PMS. They need a hotel that has the channel manager switched on. For ari:read and ari:write, your software must also be that hotel's source of truth: the hotel must be live. The owner does not ask anyone for this. When the owner makes the key, a hotel that passes the check, with nothing waiting to be sent, goes live at once. Any other hotel gets the key too, and the API keys page shows what is missing and has a Go live button.
Who makes that switch
A software partner does it with its company key: Check if a hotel is ready, then Go live. For one hotel with its own key, ZimmerStack support makes the switch for the hotel's owner.
The bookings scopes
bookings:read, bookings:write and bookings:payments need a hotel that runs the ZimmerStack . They need that hotel's own key.
Both groups on one key
A key may hold scopes of both groups. Most keys hold one group.
Two scopes for reading bookings
channel-bookings:read reads the bookings from the . direct-bookings:read reads the bookings from the hotel's own website. Each is given on its own. A key that reads one does not read the other. A company key may hold both. Bookings from the hotel's own website says more.
Cancelling a website booking
direct-bookings:cancel cancels a website booking and moves its . It is given on its own, and never at the start. Reading website bookings does not include it. See Cancel a website booking.
Payments
bookings:payments needs bookings:write too.

Address allowlist

An is a list of a key may be used from. It is optional. Each key has its own list. The list can hold up to 20 entries. An entry is one address, or one .

Put the public addresses of your servers in it. Then a stolen key does not work from another computer.

A request from another address
The answer is 403 IP_NOT_ALLOWED.
It counts as a failed sign-in
It counts against that key from that address, and against the address. The two limits are named key-auth and ip-auth. Rate limits has the numbers.
The owner sees it
The key's owner sees it on the key, as “refused from” and the address.
Which address counts
The address ZimmerStack's own network saw. A forwarded-for header that you send is not read.
An empty list
The key works from any address.

The life of a key

  1. 1. Made

    Shown one time. It has scopes, and maybe an allowlist.

    then
  2. 2. In use

    Every request carries it. The owner sees when it was last used.

    later
  3. 3. Replaced

    A new key is made. The old key works for 24 more hours.

    or
  4. 4. Switched off

    The key answers 401 API_KEY_REVOKED from then on.

Made
The owner makes the key. It is shown one time. ZimmerStack does not save the key. It saves only a of it. Nobody at ZimmerStack can read your key back.
Changed
The owner can change the scopes and the allowlist of a key. The key itself stays the same and keeps working.
Replaced (rotated)
To a key is to replace it. A new key is made. The old key keeps working for 24 hours. After that it answers 401 API_KEY_REVOKED. So you can change keys without a stop.
Who can rotate
Every key can be rotated. A hotel's own key: by its owner. A company key, and a key a partner made for a hotel: by the partner, in the partner portal. A key a partner made for a hotel can also be rotated by API. A hotel's own key and a company key are rotated by a person.
Switched off (revoked)
To a key is to switch it off for good. The owner does it. ZimmerStack support can do it when the owner asks. The key answers 401 API_KEY_REVOKED from then on.
How many keys
A hotel can have up to 5 active keys. So your test system and your real system never share one key.
An end date
The owner can give a key an end date. It is optional. It can be at most two years ahead. The owner can change it, and the key stays the same. After that date every request gets 401 API_KEY_EXPIRED. A rotated key keeps the same end date.
Test keys and live keys
A key made on a sandbox starts with zsk_test_. It works only there. A live key never works on a sandbox. A key used on the wrong side gets 409 PROPERTY_UNAVAILABLE. So a test key used on a real hotel fails on the first request.

A key can check itself

A key is zsk_live_, then 40 letters and digits, then 6 more characters. The last 6 are a . They are the CRC32 of everything before them.

A key with a typing mistake
It is refused at once. ZimmerStack does not even look the key up.
A tool that searches code for secrets
It can tell a real key from text that only looks like one.
An older key
A key made before 22 November 2026 has 43 characters after the first part. It keeps working until you rotate it.

Your own software can do this check too, without sending the key anywhere. Do it where a person pastes a key: a settings screen, or a deploy script.

With the Node package it is one call. Its message never contains the key.

check a pasted key, with the Node package
import { checkKey } from "@zimmerstack/connect";

const check = checkKey(pastedValue);
if (!check.ok) return showError(check.message); // "…a character was mistyped or changed. Copy the whole key again…"
check.mode;   // "test" (a sandbox) or "live"
check.format; // "checksummed", or "legacy" for a key made before 22 Nov 2026

This check cannot say if a key still works. Only a request can say that. The check says only this: the text is a key that ZimmerStack made.

A key found in public

Sometimes a key is put in a public place by mistake. GitHub searches public code for secrets, and it reports a ZimmerStack key it finds. That key is switched off within minutes. Its holder gets an email. Make a new key. Keep it in your server's settings, never in code.

The request log (what your key did)

ZimmerStack keeps a list of every request made with your key. It keeps each one for 7 days. You can read the list with List your recent requests.

Use it to answer two questions yourself. Did my update arrive? Is someone else using my key?

Open a terminal and run this. On Windows PowerShell, type curl.exe instead of curl.

terminal
curl "https://api.zimmerstack.com/api/v1/connect-api/v1/requests?status=errors" -H "Authorization: Bearer zsk_test_YOUR_KEY"
what comes back: the data part
{
  "since": "2026-12-03T06:12:40.000Z",
  "retentionDays": 7,
  "items": [
    {
      "at": "2026-12-04T06:08:11.402Z",
      "method": "PUT",
      "route": "/rates",
      "status": 429,
      "errorCode": "RATE_LIMITED",
      "address": "203.0.113.7",
      "durationMs": 4,
      "requestId": "req_9f2c41d0",
      "propertyId": 61,
      "keyId": 5,
      "id": "…"
    }
  ],
  "more": false,
  "nextCursor": null
}
Who may read it
Any key. It needs no scope.
A hotel key
Reads the requests made with that key.
A company key
Reads every request made with it, for all its hotels. With X-ZS-Property, it reads the requests for that one hotel.
What one line holds
The time. The address pattern, like /rates. The and the error code of our answer. The IP address the request came from. How long it took. The .
What it never holds
The data you sent, the values after the question mark, or any data of a guest. Only the pattern of the address is kept, so no booking id or guest id is saved.
since
From when. If you leave it out, you get the last 24 hours. It can be at most 7 days back.
status
One code such as 429. Or a group such as 4xx. Or errors, for 400 and above.
limit and cursor
limit is how many lines you want. The default is 50. For the next part of a long list, send cursor with the value of nextCursor.
Many 429 answers in one minute
After twenty in one minute, the rest are counted, not listed.
An address you do not know
It is the first sign of a leaked key. Rotate the key at once. The old key works for 24 more hours. If you are sure it leaked, revoke it instead.
When you write to support
Quote a requestId. It is also in the header X-Request-Id of every answer.

The doctor reads this log for you. It groups the refused requests of the last day by reason.

For partners: manage a hotel's keys by API

This part is for a software partner with a company key. Before, you made each hotel's key by hand, in the partner portal. Now your company key can do it. It can make a key for a hotel you added, replace it, and revoke it.

This is the only kind of key your code may manage. A company key, and a hotel's own keys, stay with a person.

How you name the hotel
The hotel's id is in the address. The header X-ZS-Property is not read.
Who may
A company key with the scope keys:manage. Only a company key can hold it. It is never ticked at the start, because a key with it can make more keys. A hotel's own key gets 403 COMPANY_KEY_REQUIRED.
Which hotels
With a live key: the hotels you added and can still use. With a test key: your sandboxes.
Which keys
Only the keys you made. A hotel's own keys belong to its owner. They are never listed, rotated or revoked here.
Company keys
A company key is never made, rotated or revoked by API. A person does that in the partner portal.
Which scopes the new key may hold
Any scope a hotel key may hold. Never one of the six company scopes. ari:read and ari:write may be given on a hotel that is not live yet. If the hotel passes the check, with nothing waiting to be sent, it goes live as the key is made. If not, the key is made all the same, and its updates are refused with 409 ARI_NOT_AUTHORITATIVE until the hotel is live, unless they have the header X-ZS-Before-Go-Live: true.
How many keys
At most 5 active keys on one hotel, the owner's own keys included. One more gets 409 KEY_LIMIT.
It is written down
Each key you make, rotate or revoke is on the hotel's activity log. The line names the company key that did it.

Example: make a key for a hotel

Your set-up job adds a hotel. Then it makes the key that the hotel's nightly job will use.

example: the data you send
{
  "name": "Aarohan PMS, The Lantern House",
  "scopes": [
    "ari:read",
    "ari:write",
    "channel-bookings:read"
  ],
  "allowedCidrs": [
    "203.0.113.0/24"
  ]
}

Save the example above as make-hotel-key.json. Open a terminal in the same folder and run this. On Windows PowerShell, type curl.exe instead of curl.

terminal
curl -X POST "https://api.zimmerstack.com/api/v1/connect-api/v1/properties/61/keys" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "Content-Type: application/json" -d "@make-hotel-key.json"

Also send the header X-Idempotency-Key, with a value you choose, such as hotel-61-audit-key-1. Idempotency on this page says why.

what comes back: status code 201, the data part
{
  "key": "zsk_live_…",
  "view": {
    "id": 87,
    "propertyId": 61,
    "name": "Aarohan PMS, The Lantern House",
    "maskedKey": "zsk_live_Qm7…",
    "mode": "live",
    "status": "ACTIVE",
    "scopes": [
      "ari:read",
      "ari:write",
      "channel-bookings:read"
    ],
    "allowedCidrs": [
      "203.0.113.0/24"
    ],
    "createdAt": "2026-11-23T12:45:00.000Z",
    "lastUsedAt": null,
    "lastUsedIp": null,
    "expiresAt": null,
    "retireAt": null,
    "rotatedToId": null,
    "revokedAt": null,
    "revokedReason": null
  }
}

With the Node package, the same step is short:

make a key, save it, log only what is safe
const minted = await zs().hotelKeys.create(propertyId, { name: "Night audit job", scopes: ["ari:read", "channel-bookings:read"] });

// The key is in this answer only. Store it before anything else; shownOnce never hands you an empty one.
await store(shownOnce(minted));
// What is safe to log: the answer without the key.
console.log(withoutShownOnce(minted).view.maskedKey, minted.view.scopes.join(", "));

Example: rotate that key

A rotation makes a new key with the same name, scopes, addresses and end date. The old key keeps working for 24 hours. The answer says until when, in retireAt. Then the old key stops.

rotate, save the new key
const rotated = await zs().hotelKeys.rotate(propertyId, keyId);
await store(shownOnce(rotated));
console.log("the old key answers until", rotated.retired.retireAt);
What can go wrong
404 PROPERTY_NOT_FOUND, 404 KEY_NOT_FOUND, 409 KEY_LIMIT, 409 KEY_REVOKED, 409 KEY_ALREADY_ROTATING, 400 SCOPES_INVALID, 400 ALLOWED_CIDRS_INVALID, 400 REASON_REQUIRED and 400 VALIDATION. Errors says what each one means.

What a person does, and what your code does

A person, in the partner portal or in Admin
Makes, rotates and revokes a company key and a hotel's own key, and chooses their scopes. Accepts the price, enters billing details and pays. Invites team members. No API request does any of these. That is on purpose.
Your code, by API
Everything else. Hotels. Room types and rate plans. Prices and availability. Bookings. The event log. Your webhook endpoints and what was sent to them. The request log and the limits.
Your code, with a scope a person ticks on your company key
The keys you made for a hotel. Connect links. Your bills, to read only. Support tickets.

When a key is refused

401 API_KEY_INVALID
The key is missing, has a wrong shape, is not known, or has a right first part and a wrong rest. The answer says no more than this. That is on purpose.
401 API_KEY_REVOKED
The key was revoked, or it was rotated and its extra time is over. The answer says so.
401 API_KEY_EXPIRED
The key is past its end date.
A key that keeps failing
After 5 failures in a minute from one address, that key is refused from that address. The answer is 429, and the limit is named key-auth. ZimmerStack does not look the key up any more.
An address that keeps failing
After 20 failures in a minute, the address is cut off. The limit is named ip-auth. A key that works from that address keeps working. So one dead key never locks out your other keys.

Rate limits has every number.

Idempotency (send twice, done once)

Sometimes you send an update and the answer is lost. You do not know if it worked. An makes it safe to send again.

The header
x-idempotency-key. You choose its value. It is 10 to 64 characters: letters, digits, _ and -.
The same value and the same data
Within 7 days, you get the first answer again. Nothing is done a second time.
The same value and different data
The answer is 409 IDEMPOTENCY_KEY_REUSED. Use a new value for a new request.
Bookings
A booking you create has one more safety. Your own id for it, externalReference, is unique in a hotel for ever.

Words on this page

API key
A long secret code that proves who is calling the API. Keep it safe like a password.
Scope
One permission of a key. For example ari:write lets the key update availability, rates and restrictions.
Hotel key
A key that works for one hotel only. The hotel's owner makes it, or a partner makes it for a hotel it added.
Company key
The key of a software company. One key works for all the hotels of that company.
Live key
A key that starts with zsk_live_. It works on real hotels.
Test key
A key that starts with zsk_test_. It works only on a sandbox, so it can never change a real hotel.
Sandbox
Your test hotel. It works like a real hotel, but no OTA can see it and it costs nothing.
Property
One hotel in ZimmerStack. Each property has its own id, a number.
Request
One message your software sends to the API.
Header
A small piece of extra information sent with a request, like your key.
X-ZS-Property
The header that tells ZimmerStack which hotel a request is for. Its value is the property id.
Availability
How many rooms of one room type are free to sell on one night. Learn more
Rates
The price of a room for one night. Learn more
Restrictions
Stay rules for a night, like a minimum stay of 2 nights, or no arrival on that day. Learn more
OTA
Online travel agency: a website that sells hotel rooms, like Booking.com, MakeMyTrip or Agoda. Learn more
PMS
Property management system: the software a hotel uses at its front desk for bookings, guests and bills.
Refund
Money given back to a guest.
Source of truth
The one system whose numbers are the right ones. After go-live, that is your software.
Webhook endpoint
The address of your server where ZimmerStack sends webhooks.
Allowlist
A list of internet addresses a key may be used from. From any other address the key is refused.
IP address
The number that names a computer on the internet, like 203.0.113.7.
CIDR range
One line that names a group of IP addresses, like 203.0.113.0/24.
Hash
A scrambled form of a secret. It can be checked, but it cannot be turned back into the secret.
Checksum
A few extra characters at the end of a key, worked out from the rest of the key. A key with a typing mistake fails this check.
Rotate
To replace a key or a secret with a new one. The old one keeps working for a short time.
Revoke
To switch a key or a link off for good.
Status code
A number in every response. 200 to 299 means it worked. 400 and above means there is a problem.
Request id
A code ZimmerStack gives to every request. Quote it when you write to support.
Idempotency key
A code you choose and send with an update. If the same update is sent twice by mistake, it is done only once.

Routes, samples, limits and codes on this page come from the API's public contract, read live, Sat, 05 Dec 2026 01:08:04 UTC.