---
name: "updateUnlockMethod"
mode: "api"
versionRequirements:
  - { name: "@ray-js/lock-sdk", version: "1.0.0" }
title: "updateUnlockMethod - Update unlock method."
summary: "Update unlock method. Only supports updating unlock method name and special unlock method notification information."
---

## updateUnlockMethod

> [VERSION] @ray-js/lock-sdk >= 1.0.0

### Description

Update unlock method

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `number` | Yes | Unlock method ID |
| `name` | `string` | Yes | Unlock method name |
| `isSpecial` | `boolean` | No | Whether special |
| `specialInfo` | `SpecialUnlockMethodInfo` | No | Special additional information |

##### SpecialUnlockMethodInfo properties

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `appSend` | `boolean` | No | - | Whether App notifications are supported |
| `msgSend` | `boolean` | No | - | Whether SMS notifications are supported |
| `msgPhone` | `string` | No | - | SMS notification phone number |
| `verifyCode` | `string` | No | - | SMS verification code |
| `countryCode` | `string` | No | - | SMS notification country code |


### Return Value

Type: `Promise<void>`

None (resolve after a successful update)

### Error Codes

| Error Code | Error Message |
| --- | --- |
| `1057` | Special passwords are not supported and App push is not enabled |
| `1058` | SMS is supported but App push and SMS are not enabled |
| `1066` | SMS phone number is empty |
| `1056` | Country code is empty |
| `1055` | Verification code is empty |

### Examples

#### Example

```ts
import { updateUnlockMethod } from '@ray-js/lock-sdk';
await updateUnlockMethod({ id: 'method_001', name: 'Owner fingerprint' });
```
