TempKeyCreate a collective / shared temporary access key

Create a collective / shared temporary access key

Generates one shared guest credential that grants slide-to-open access to multiple doors. The caller must be authorized for every lock included. Keypad PINs are managed per lock (SetMatterPin), not per temp key. Returns the guest-facing URL and the doors.

curl -X POST "https://api.spkey.co/collective-temp-keys" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "validFrom": "2024-12-25T10:00:00Z",
  "validUntil": "2024-12-25T10:00:00Z",
  "description": "example_string",
  "doors": [
    {
      "lockId": "null",
      "label": "example_string",
      "accessMethod": "key"
    }
  ]
}'
{
  "success": true,
  "uuid": "example_string",
  "url": "example_string",
  "validFrom": "example_string",
  "validUntil": "example_string",
  "doors": [
    {
      "id": 3.14,
      "lockId": "example_string",
      "lockUuid": "example_string",
      "label": "null",
      "accessMethod": "key"
    }
  ]
}
POST
/collective-temp-keys
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.
Content-Typestring
Required

The media type of the request body

Options: application/json
validFromstring
Required
Format: date-time
validUntilstring
Required
Format: date-time
descriptionstring
Max length: 2000
doorsarray
Required

Doors/rooms/zones included in this shared credential

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.

Body

application/json
doorsarray
Required

Doors/rooms/zones included in this shared credential

Responses