---
name: "albumSettingSave"
mode: "kit"
versionRequirements:
  - { name: "@tuya-miniapp/cloud-api", version: "1.0.5" }
---

## albumSettingSave

> [VERSION] @tuya-miniapp/cloud-api >= 1.0.5

### Method signature

```typescript
albumSettingSave(params: AlbumSettingSaveReq)
```

### Description

Time Album settings save API

### Parameters

`Params`

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `params` | `AlbumSettingSaveReq` | Yes | - | Request body |

### Return Value

Type: `Promise<boolean>`

Whether saving succeeded

### Referenced Types

##### `interface` AlbumSettingSaveReq

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `stockId` | `string` | Yes | Inventory ID |
| `gid` | `string` | Yes | Home ID |
| `albumName` | `string` | Yes | Album name |
| `enableStatus` | `0 \| 1` | Yes | Enabled status |
| `timedCaptureConfig` | `string[]` | Yes | Scheduled capture settings |
| `smartCaptureConfig` | `VisionBoxEvent[]` | Yes | Smart capture settings |

##### `enum` VisionEventType

| Enum Value | Actual Value | Description |
| --- | --- | --- |
| `VisionEventType.PRESET` | `0` | Preset event |
| `VisionEventType.CUSTOM` | `1` | Custom event |

##### `type` VisionBoxEvent

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `eventCode` | `string` | Yes | Event code |
| `eventValue` | `string` | Yes | Event value |
| `eventType` | `"VisionEventType.PRESET" \\| "VisionEventType.CUSTOM"` | Yes | Event type (preset/custom) |


### Valid Values

##### `AlbumSettingSaveReq.enableStatus`

| Value | Description | Since |
| --- | --- | --- |
| `0` | - | - |
| `1` | - | - |

##### `VisionEventType`

| Value | Description | Since |
| --- | --- | --- |
| `0` | Preset event | - |
| `1` | Custom event | - |


### Examples

#### Request example

```typescript
import { albumSettingSave } from '@tuya-miniapp/cloud-api';

albumSettingSave({
  stockId: '1',
  gid: '194137',
  albumName: 'Nursery',
  enableStatus: 1,
  timedCaptureConfig: ['12:00'],
  smartCaptureConfig: [{ eventCode: 'person', eventValue: '1', eventType: 0 }],
})
  .then((ok) => console.log(ok))
  .catch(console.error);
```

#### Response example

```json
true
```
