---
name: "updateTempCustom"
mode: "api"
versionRequirements:
  - { name: "@ray-js/lock-sdk", version: "1.0.0" }
title: "updateTempCustom - Update custom temporary password name and validity configuration."
summary: "Update custom temporary password name and validity configuration. Currently only supports updating name and validity configuration, and only supports cloud update."
---

## updateTempCustom

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

### Description

Update a custom temporary password.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `unlockBindingId` | `string` | Yes | Password ID |
| `name` | `string` | Yes | Password name, up to 20 characters |
| `effective` | `EffectiveConfig` | Yes | Password validity settings |

### Return Value

Type: `Promise<boolean>`

None (resolve after successful update)

### Error Codes

| Error Code | Error Message |
| --- | --- |
| `1031` | Password name too long (over 20 characters) |
| `1032` | Missing validity time settings |
| `1033` | Missing start date |
| `1034` | Missing end date |
| `1010` | Start time is later than end time |
| `1035` | weeks not provided in weekly repeat mode |
| `1039` | Cloud: Invalid time parameters (START_END_DATE_NOT_RIGHT) |

### Referenced Types

##### `type` BitStatus

Bit switch: 0 off, 1 on / Single-bit flag

```typescript
export type BitStatus = 0 | 1;
```


### Examples

#### Example

```ts
import { updateTempCustom } from '@ray-js/lock-sdk';
await updateTempCustom({ id: 'pwd_001', name: 'New password name' });
```
