API action
Switch off a hotel key(revoke)
Make a key stop working at once. This cannot be undone.
About this action
- What it does
- Switches one off for good. Hotel people call this: to a key. The next request with that key gets
401 API_KEY_REVOKED. - When to use it
- When a key was stolen or shown by mistake, or when nothing uses it any more. To change a key without a stop, use Replace a hotel key.
- 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/{keyId}/revoke- Before this
- You need the
keyId. Get it with List hotel keys.
What you send
In the address:
- propertyId
- The hotel's property id, a number. It is the
idin the answer of List your hotels. - keyId
- The id of the key, a number. It is the
idin the answer of List hotel keys.
You send one field: the reason.
- reason
- Text, 3 to 500 letters. Required. Why you switch the key off. It is saved on the key and on the hotel's activity log.
{
"reason": "The old server was switched off"
}Things to know
- It stops at once. There are no 24 hours here. Every request with this key fails from now on.
- It cannot be switched on again. If you still need a key, make a new one with Make a hotel key.
- A key that is already off gives no error. The answer then shows the key as it is.
- Only the keys you made. You cannot switch off a key the hotel's owner made. You cannot switch off your company key here either: a person does that in the partner portal.
The request, in your language
Put your key in place of zsk_test_YOUR_KEY.
Save the example above as switch-off-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/87/revoke" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "Content-Type: application/json" -d "@switch-off-a-hotel-key.json"What comes back
The is 200. It means: the key is off. The answer is the key, with the same fields that List hotel keys shows.
{
"statuscode": 200,
"message": "API key revoked",
"data": {
"id": 87,
"propertyId": 61,
"name": "Aarohan PMS, The Lantern House",
"maskedKey": "zsk_live_Qm7…",
"mode": "live",
"status": "REVOKED",
"scopes": [
"ari:read",
"ari:write",
"channel-bookings:read"
],
"allowedCidrs": [
"203.0.113.0/24"
],
"createdAt": "2026-11-23T12:45:00.000Z",
"lastUsedAt": "2026-11-24T07:59:12.000Z",
"lastUsedIp": "203.0.113.24",
"expiresAt": null,
"retireAt": null,
"rotatedToId": null,
"revokedAt": "2026-11-24T08:05:00.000Z",
"revokedReason": "The old server was switched off"
}
}- status
- Now
REVOKED: the key is switched off. - revokedAt
- The time the key was switched off.
- revokedReason
- The reason you sent.
Common mistakes
- 400 VALIDATION or REASON_REQUIRED
- The
reasonis missing, or it is not 3 to 500 letters long. - 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.
- 404 KEY_NOT_FOUND
- No key with this id that you made for this hotel. Read the ids again with List hotel keys.
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.
- 409 ARI_NOT_AUTHORITATIVE
- The hotel is not live yet: your software is not its source of truth, so nothing was saved. GET /readiness says what is missing, and POST /go-live makes the switch. To send rates before that, add the header X-ZS-Before-Go-Live: true. It is the same for a company key and for a hotel's own key: a hotel key with ari:read or ari:write can be made before its hotel is live.
- 409 CHANNEL_MANAGER_DISABLED
- The hotel's channel manager is off, so nothing would be sent to an OTA. details.reason says why. not_on_channel_manager: the hotel was never put on it. With a company key, send its room types and rate plans (PUT /catalog/room-types, then PUT /catalog/rate-plans), or press Finish setup in the Channels app. Either puts it there. switched_off: the hotel's owner switched it off. Only the owner can switch it back on.
- 409 PROPERTY_UNAVAILABLE
- The hotel is deleted or is a demo. Or a test key was used on a real hotel, or a live key on a sandbox. Check which key you send. If the key is right, contact the hotel's owner.
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: switch off 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.
- Revoke
- To switch a key or a link off for good.
- Company key
- The key of a software company. One key works for all the hotels of that company.
- Scope
- One permission of a key. For example ari:write lets the key update availability, rates and restrictions.
- Status code
- A number in every response. 200 to 299 means it worked. 400 and above means there is a problem.
- Sandbox
- Your test hotel. It works like a real hotel, but no OTA can see it and it costs nothing.
- Test key
- A key that starts with zsk_test_. It works only on a sandbox, so it can never change a real hotel.
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.