API action
Make a hotel key
Make a new key that works for one hotel only. The key is shown once, in the answer.
About this action
- What it does
- Makes a for one hotel you added. You choose its name and its .
- When to use it
- When one hotel, or one job of your system, should have its own key. A hotel key works for that hotel only, so it cannot touch your other hotels.
- Who can use it
- A only. The key needs the
keys:manage. - Address
POSThttps://api.zimmerstack.com/api/v1/connect-api/v1/properties/{propertyId}/keys- Before this
- The hotel must be one you added. With a , it must be one of your .
What you send
In the address:
- propertyId
- The hotel's property id, a number. It is the
idin the answer of List your hotels.
You send a name for the key and the list of scopes it may have.
- name
- Text, 2 to 80 letters. Required. Your label for the key. The hotel's owner sees it too.
- scopes
- A list of 1 to 20 scopes, like
ari:read. Required. What the key may do. A hotel key cannot have a scope that only a company key can have, likeproperties:write. - allowedCidrs
- A list of up to 20 internet addresses, each as a . Optional. The key then works from these addresses only (). Left out or empty: any address.
- expiresAt
- Text: a date like
2027-12-31, or a date with a time. Optional. When the key stops by itself. At most two years from today.
{
"name": "Aarohan PMS, The Lantern House",
"scopes": [
"ari:read",
"ari:write",
"channel-bookings:read"
]
}Things to know
- The key is shown once. The full key is in
key, in this answer only. Save it at once in a safe place, and never in a log. ZimmerStack cannot show it again. - If you lost the answer, replace the key. A repeat of the same request with the same
X-Idempotency-Keyanswerskey: null(). Then get a new key with Replace a hotel key. - A sandbox gets a test key. On a sandbox the new key starts with
zsk_test_. On a real hotel it starts withzsk_live_. - A hotel can have only a few active keys. The
limitin List hotel keys is that number. The owner's own keys count too.
The request, in your language
Put your key in place of zsk_test_YOUR_KEY.
Save the example above as make-a-hotel-key.json. Open a terminal in the same folder and run this. On Windows PowerShell, type curl.exe instead of curl.
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-a-hotel-key.json"What comes back
The is 201. It means: the key was made. Save the key now. It is in key, and it is not shown again.
{
"statuscode": 201,
"message": "API key created",
"data": {
"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
}
}
}- key
- The full secret key. It is in this answer only. Empty (
null) when the same request was sent a second time. - view.id
- The id of the key. Use it as
keyIdto replace the key or to switch it off. - view.maskedKey
- The first 12 characters of the key. From now on the key is shown only like this.
- view.mode
- For a real hotel:
live. For a sandbox:test. - view.scopes
- What the key may do.
- view.expiresAt
- When the key stops by itself. Empty (
null) when it has no end date.
Then use the key for that hotel
Put the new key in the Authorization header, after the word Bearer. A hotel key works for one hotel, so its requests do not send X-ZS-Property. Test it with Check your key.
Common mistakes
- 400 SCOPES_INVALID
- A scope is not known, or it is one that only a company key can have. Fix the list.
- 400 ALLOWED_CIDRS_INVALID
- A value in
allowedCidrsis not a correct internet address or CIDR range. - 400 VALIDATION
- A value is missing or wrong, and the message names it. For example a
nameshorter than 2 letters. - 403 COMPANY_KEY_REQUIRED
- You used a hotel key. This request works with a company key only.
- 404 PROPERTY_NOT_FOUND
- The property id is not a hotel you added. With a test key, it is not one of your sandboxes. A hotel whose owner let you in with your vendor code gives this error too.
- 409 KEY_LIMIT
- The hotel already has the most active keys. Switch one off first, with Switch off a hotel key.
- 409 PMS_NOT_AVAILABLE
- You asked for a scope that starts with
bookings:, but this hotel does not run the ZimmerStack . Leave that scope out. - 409 CHANNEL_MANAGER_DISABLED
- You asked for a channel manager scope, but the channel manager is switched off for this hotel.
Other errors this request can give
- 401 API_KEY_INVALID
- The key is not right. Copy it again, all of it, with no space before or after.
- 403 SCOPE_MISSING
- The key is not allowed to do this. It needs the scope
keys:manage. - 403 IP_NOT_ALLOWED
- The key only works from the addresses its owner allowed.
- 429 RATE_LIMITED
- Too many requests in a short time. Wait the number of seconds in the
Retry-Afterheader, then send again. - 401 API_KEY_REVOKED
- The key was switched off, or it was replaced and its extra 24 hours are over. Ask the key's owner for the new key. Nothing else makes this key work.
- 404 PROPERTY_REQUIRED
- You hold a company key, and the request did not say which hotel. Add the header X-ZS-Property with the id of one of your hotels. The answer already lists the first 20 in details.properties (id and name), with details.total for how many there are. GET /properties lists them all.
Try it now
No code and no install. This box sends a real request to your . It works with a only, so it can never change a real hotel.
Try it here: make a hotel key
It starts with zsk_test_. It is kept in this browser tab only. Never paste a live key into a web page.
Go deeper
- Keys and scopes: The kinds of key, what each may do, and how to replace one.
Words on this page
- 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.
- Scope
- One permission of a key. For example ari:write lets the key update availability, rates and restrictions.
- 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.
- Company key
- The key of a software company. One key works for all the hotels of that company.
- CIDR range
- One line that names a group of IP addresses, like 203.0.113.0/24.
- Allowlist
- A list of internet addresses a key may be used from. From any other address the key is refused.
- 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.
- Status code
- A number in every response. 200 to 299 means it worked. 400 and above means there is a problem.
- PMS
- Property management system: the software a hotel uses at its front desk for bookings, guests and bills.
New here? Start with the partner path or the one-hotel path.
Routes, samples, limits and codes on this page come from the API's public contract, read live, Fri, 04 Dec 2026 23:24:17 UTC.