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

## albumSettingSave

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

### Description

Time Album settings save API

### Parameters

`Params`

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

### Referenced Types

##### `interface` AlbumSettingSaveReq

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

##### `enum` VisionEventType

| Enum Value | Actual Value | Description |
| --- | --- | --- |
| `VisionEventType.PRESET` | `0` | Preset event |
| `VisionEventType.CUSTOM` | `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
```
