BizKitHub
DocsAPI ReferenceIo T/bff/iot-lock/password-add
postIo TAdmin BFF

/bff/iot-lock/password-add

Creates a new keyboard passcode for a specific lock and sends it to the lock via the TTLock API. If no password is provided, a unique random 8-digit code is generated (retries up to 50 times to avoid duplicates). Start and end dates define the validity window; the system applies configured time offsets automatically.

IoTpostBffIot-lockPassword-add

Parameters

JSON body

Request body

application/json
lockIdnumberRequired

TTLock lock ID (from TTLock API).

passwordstringOptional

Custom passcode digits. If not provided, a random 8-digit code is generated.

passwordNamestringOptional

Human-readable label for the passcode (max 250 chars, ASCII only).

Length: 0250
startDatestringOptionaldate-time

ISO 8601 date-time when the passcode becomes active. Defaults to now.

Example2024-05-01T10:00:00.000Z
endDatestringOptionaldate-time

ISO 8601 date-time when the passcode expires. If not set, the passcode is permanent.

Example2024-05-01T10:00:00.000Z

Response schema

1 status code documented

200Success
successbooleanRequired

Always true on successful passcode creation.

Response example

application/json
{
  "success": false
}

Request example

POST /bff/iot-lock/password-add

post
curl -X POST "https://api.bizkithub.com/bff/iot-lock/password-add" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "lockId": 0,
  "password": "example_password",
  "passwordName": "example_passwordName",
  "startDate": "2024-05-01T10:00:00.000Z",
  "endDate": "2024-05-01T10:00:00.000Z"
}'

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key