/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.
Parameters
5 body
lockIdnumberRequiredTTLock lock ID (from TTLock API).
passwordstringCustom passcode digits. If not provided, a random 8-digit code is generated.
passwordNamestringHuman-readable label for the passcode (max 250 chars, ASCII only).
startDatestringISO 8601 date-time when the passcode becomes active. Defaults to now.
date-timeendDatestringISO 8601 date-time when the passcode expires. If not set, the passcode is permanent.
date-timeRequest
POST /bff/iot-lock/password-add
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"
}'Response
JSON payload
{
"success": false
}All response codes
1 status code documented
Need an API key?
All BizKitHub API endpoints require authentication via API key.