TempKeyOpen a lock with a temp-key PIN

Open a lock with a temp-key PIN

Unauthenticated endpoint for a connected entrance panel. Verifies the submitted PIN against the live temp keys covering this lock and, on success, opens the door exactly as the guest page slide-to-open does. Every refusal — wrong PIN, unknown PIN, a lock the key does not cover, revoked, expired, not yet valid — returns the identical 401 so the endpoint is not an enumeration oracle. Repeated failures are throttled and then locked out per lock (429 with Retry-After).

curl -X POST "https://api.spkey.co/locks/123/open-with-pin" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "pin": "example_string"
}'
{
  "success": true,
  "offline": true
}
POST
/locks/{id}/open-with-pin
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (JWT)
Bearer Tokenstring
Required

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.
API Key (header: X-API-Key)
X-API-Keystring
Required

API key for B2B organization access. Provided during organization onboarding.

API key for B2B organization access. Provided during organization onboarding.
path
idinteger
Required

Lock ID (numeric)

Content-Typestring
Required

The media type of the request body

Options: application/json
pinstring
Required

The PIN issued with the temp key (always 6 digits today)

Pattern: ^\d{4,8}$
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

header
X-API-Keystring
Required

API Key for authentication. API key for B2B organization access. Provided during organization onboarding.

Path Parameters

idinteger
Required

Lock ID (numeric)

Body

application/json
pinstring
Required

The PIN issued with the temp key (always 6 digits today)

Responses

successboolean
Required
offlineboolean
Required

The device was offline; the unlock is queued on its shadow. The command was still accepted.