Help Center

GuestsKey automation API reference

This reference documents the production endpoints used by the native GuestsKey Zapier connector. Client registration is managed by GuestsKey; there is no self-service OAuth client registration endpoint. For ordinary Zap setup, follow Connect GuestsKey to Zapier.

Authentication and workspace scope

API base: https://api.guestskey.com/api/automation/v1.

All API requests require Authorization: Bearer <access_token>. The OAuth grant binds the user, selected workspace, client, resource, and approved scopes. Requests cannot select another workspace by supplying a tenant ID. App session cookies are not an alternative authentication method for these endpoints. Membership and write authority are checked on the server.

Scope Permission
properties:read List and find properties.
bookings:read Read bookings and booking snapshots.
access:read Read access snapshots, property access state, and temporary keys.
health:read Read enabled native health-event history.
access:write Create, update, or revoke temporary access; requires Owner/Admin membership.

OAuth endpoints are outside the API base:

Method and URL Required request fields and behavior
GET https://api.guestskey.com/automation/oauth/authorize Query: registered client_id, exact allowlisted redirect_uri, response_type=code, state, space-separated scope, code_challenge, code_challenge_method=S256. Opens GuestsKey sign-in/workspace consent. Optional resource must equal the registered resource.
POST https://api.guestskey.com/automation/oauth/token Form-encoded grant_type=authorization_code, client_id, client_secret when configured for the client, code, matching redirect_uri, and PKCE code_verifier.
POST https://api.guestskey.com/automation/oauth/token Refresh: form-encoded grant_type=refresh_token, client_id, client_secret when configured, and refresh_token. Optional scope must exactly match the grant; refresh cannot expand permission.
POST https://api.guestskey.com/automation/oauth/revoke Form-encoded client_id, client_secret when configured, and token (access or refresh). Revokes the associated grant. Unknown tokens return success.

Successful token responses contain access_token, token_type: "Bearer", expires_in: 900, refresh_token, and scope. Refresh tokens expire after seven days and rotate on use. Store the successor token; do not reuse a consumed refresh token or refresh the same connection concurrently. Reuse revokes the grant. The Zapier connector handles token storage and refresh.

OAuth JSON responses are unwrapped; errors have an error field such as invalid_client, invalid_grant, or invalid_scope. Revocation success returns {}. Denied consent returns error=access_denied and the original state to the registered redirect.

GuestsKey sign-out and password resets revoke the user’s existing automation grants; membership removal revokes access for that workspace. OAuth revocation stops API authorization, not previously scheduled door access. Existing temporary keys require their own revocation or expiry and provider verification.

API responses and pagination

API success responses use {"ok":true,"data":...}; failures use {"ok":false,"error":"..."} and a non-2xx HTTP status. Send JSON bodies with Content-Type: application/json.

Collection responses have data.items and data.nextCursor. Send the returned cursor with the same endpoint and filters until nextCursor is null. limit is an integer from 1 to 100, default 100. Cursors are opaque and workspace/filter-bound. The Zapier connector reads at most ten pages per poll and reports an error rather than truncating a larger result set.

Times are ISO 8601 strings. Input timestamps require a timezone offset, such as 2030-01-02T09:00:00-07:00. Core entity IDs are 1–128 letters, digits, underscores, or hyphens. Unknown query fields are rejected.

Read endpoints

The paths below are relative to the API base. Collection endpoints accept cursor and limit in addition to the listed filters.

Method and path Scope Query and response data
GET /me Valid grant Object: id (user), tenantId, workspaceName, scopes. Used to test and label a connection.
GET /properties properties:read Optional query (case-insensitive name substring, max 200 characters) and externalId (exact PMS property ID, max 128). Items: id, name, timezone, source, externalId.
GET /bookings bookings:read Optional propertyId, id, arrivalFrom, arrivalTo, status (PENDING, CONFIRMED, CANCELLED). Arrival bounds apply inclusively to check-in time. Items: id, propertyId, status, checkInAt, checkOutAt, updatedAt.
GET /booking-snapshots bookings:read Same filters as bookings. Items have booking fields, entityId for the booking ID, and an id representing the observed booking state.
GET /access-snapshots access:read Optional propertyId. Items have a state-derived id, entityId for the code record, propertyId, and the access fields described below.
GET /properties/:propertyId/access access:read Object: propertyId, revision, locks (code lifecycle entries, potentially multiple per lock). Not paginated. More than 1,000 entries returns 422; use access snapshots instead.
GET /properties/:propertyId/temporary-access access:read Object with keys. Each key has keyId, propertyId, string revision, description, timezone, window: {start,end}, automationEnabled, and expired. No PIN or recipient is returned.

Access fields are lockId, codeId, nullable bookingId, state, startsAt, endsAt, configurationPending, nullable requestedStartsAt and requestedEndsAt, confirmationStatus: "not_verified", and observedAt: null. Stored lifecycle state and empty results do not prove physical access or deletion. Pending schedule changes expose requested times separately from the persisted schedule.

Snapshot IDs represent state, not every transition. Identical recurring states may deduplicate, and intermediate states between polls may be missed. Booking and access snapshots are returned in descending update order. They are not a durable event ledger.

Native health history

GET /health-events requires health:read and enabled health capture in the selected workspace. Optional filters: eventType, propertyId, lockId; pagination: cursor, limit.

Supported event types are lock.battery_low, keypad.battery_low, lock.offline, lock.recovered, keypad.disconnected, and keypad.connected.

Each event includes:

Field Meaning
schemaVersion, id, eventType Schema version 1, immutable event ID, and event type.
component, source lock or keypad; observation source webhook or poll.
occurredAt, recordedAt Observation/episode time and time written to the event history.
incidentId, healthStateId Episode correlation and component state identifiers. Recovery uses its published outage’s incident ID.
lock Object with name, deviceId, and provider: "seam".
lockIds, properties Mapped GuestsKey lock IDs and properties (id, name, optional ownerrezPropertyId).
battery Nullable object with independently nullable percent (0–100) and critical (boolean).
connectivity Nullable object with connected, nullable offlineSince, and nullable thresholdMinutes.

Only Seam observations are currently captured. Unknown battery percentages are not zero. Events are retained for 30 days and ordered by recorded time. A health pagination cursor expires after 15 minutes; restart the query on HTTP 410. Capture starts on enablement without historical backfill. Outages resolved before the configured delay produce neither an outage nor recovery event. Delivery timing also depends on the Zapier polling schedule.

Temporary-access writes

All three write endpoints require access:write, current Owner/Admin membership, and an Idempotency-Key header of 8–128 letters, digits, underscores, dots, colons, or hyphens.

Keep the same key and complete inputs for a retry. Each new intended operation needs a distinct key, including when switching from create to update or revoke. Reusing a key with different inputs or a different action returns 409 idempotency_conflict. A completed request replays the original acceptance result; use read endpoints for current state.

Create

POST /temporary-access

{
  "propertyId": "property-id",
  "description": "Scheduled vendor visit",
  "window": {
    "start": "2030-01-02T09:00:00-07:00",
    "end": "2030-01-02T11:00:00-07:00"
  },
  "deliveryMethod": "email",
  "recipientEmail": "[email protected]"
}

Replace all example values before use. The description is trimmed and must be 1–100 characters. The creation window must start in the future, end after the start, and fit within one property-local calendar day. deliveryMethod accepts sms (default), email, or both. Supply recipientPhone with country code for SMS, recipientEmail for email, or both fields for both channels. Fields for unselected channels are rejected. Creation generates the PIN server-side, attempts programming on eligible locks, and sends the code directly to the chosen recipient. It does not accept a caller-supplied PIN or reactivate paused sibling keys.

Response data: keyId, propertyId, configurationSaved: true, outcome (pending or needs_attention), smsDelivery: {status}, and emailDelivery: {status} when requested. Status is sent, failed, or unknown; SMS can also be not_requested for email-only requests. Provider acceptance (sent) is not confirmed recipient receipt. No PIN or recipient address is returned. A completed retry does not send again.

Update

PATCH /temporary-access/:keyId

Body: propertyId, expectedRevision (string from the latest temporary-key read), window: {start,end}, and optional description (1–100 characters). The end must remain in the future and after the start, and the window must fit within one property-local calendar day; updates may retain an already-started window. The update preserves the PIN and sibling keys; it does not send the PIN again.

Response data: key (the safe temporary-key summary), configurationSaved (boolean), and outcome (scheduled, pending, or needs_attention). A stale expected revision returns 409 revision_conflict.

Revoke

DELETE /temporary-access/:keyId

Send a JSON body with propertyId and expectedRevision from a fresh key read. Response data: keyId, configurationRemoved (boolean), and outcome (removed, pending, or needs_attention). pending means removal has not been confirmed. A missing key or stored configuration alone is not evidence that a provider removed the code.

Errors and retries

HTTP status Typical error or meaning Handling
400 Invalid request, invalid_cursor, OAuth validation failure Correct inputs. Restart pagination for an invalid cursor.
401 Missing/invalid bearer or invalid OAuth client/grant Refresh an eligible connection or reconnect; do not repeatedly reuse an invalid refresh token.
403 Insufficient scope or workspace/write authority Check current membership and approved scopes.
404 not_found Check the ID and selected workspace; do not assume provider removal.
409 feed_disabled Enable native health events in that workspace.
409 revision_conflict, idempotency_conflict Re-read current state or correct request identity; do not overwrite newer changes blindly.
409 automation_paused, temporary_key_limit, request_already_revoked Resolve the property/key condition in GuestsKey.
410 cursor_expired Restart health history pagination with no cursor.
422 use_access_snapshots_pagination Read the paginated access snapshot collection.
429 Rate limit exceeded Honor response retry/rate-limit headers and back off.
503 Automation temporarily unavailable Retry later with bounded backoff; preserve write idempotency keys and inputs.

For an uncertain write, inspect the key and stored access state before starting a new operation. Retain event IDs, request IDs, and non-sensitive error details for support. Never share access tokens, refresh tokens, client secrets, PINs, or recipient contact details in a public report.