Open Platform
Skip to content

Modify lock settings ​

https://euapi.ttlock.com/v3/lock/updateSetting

Modify lock settings, including: 2-Privacy lock、3-Temper alert、4-Reset button、6-Lock sound、7-Open direction、8-Sound volume、10-Wifi lock's power saving(Note: Wifi lock's power saving mode can only be set via bluetooth, it can't be set it via gateway).

1 Request example ​

POST, ContentType:application/x-www-form-urlencoded

javascript
curl --location -g --request POST 'https://euapi.ttlock.com/v3/lock/updateSetting' \
--data-urlencode 'clientId=4773aa036f7f49c68d876bb4be85c80c' \
--data-urlencode 'accessToken=dfd5489d0cee31f0bdfaf59d0d42d71f' \
--data-urlencode 'lockId=163377' \
--data-urlencode 'type=3' \
--data-urlencode 'changeType=2' \
--data-urlencode 'date=1625025703000'

2 Request parameters ​

NameTypeRequiredDescription
clientIdStringYclient_id from Create application
accessTokenStringYAccess token,refer to: Get access token
lockIdIntYLock ID, generated by Lock init
typeIntYThe item to be set:2-Privacy lock、3-Tamper alert、4-Reset button、6-Lock sound、7-Open direction、8-Sound volume、10-Wifi lock's power saving、11-Door unclosed alarm time setting、12
Note: Wifi lock's power saving mode can only be set via bluetooth, it can't be set it via gateway.
valueIntYValue: 1-on、2-off;
Open direction:1-left open、2-right open;
Sound volume: 1 to 5
Door unclosed alarm time: In seconds, 0 mean off, need door sensor
changeTypeIntMethod:
1-via phone bluetooth, you should call APP SDK method first
2- via gateway or WiFi lock, you can call this api directly if it's a WiFi lock or it's connected to gateway
dateLongYCurrent time (timestamp in millisecond)

3 Response and example ​

ParameterTypeDescription
errcodeIntError code
errmsgStringError message
{
    "errcode": 0, 
    "errmsg": "none error message"
}
CopyRight © 2012-2026 TTLock.All Rights Reserved