---
updatedAt: 2025-08-05T08:58:25.000Z
agentTools:
  projectIndex: https://dev.tapcart.com/llms.txt
---

# storage/add

Save persistent data to the app

#### Fields

### `type` • *string* <span class="required-tag">required</span>

##### Types can be `string`, `number`, `boolean`, `json`

### `key` • *string* <span class="required-tag">required</span>

##### This is the value you would like to add to your storage. This can also use dot notation ex.`user.age`

### `value` • *string* <span class="required-tag">required</span>

##### The value to store. Can be a string, number, boolean, or JSON object. Capped at 2000 bytes

***

The storage/add action stores a key-value pair in the app's local storage. This storage persists across app sessions and can be used to store user preferences, temporary data, or any other information your app needs to remember.

The storage system supports dot notation for organizing data hierarchically (e.g., user.name, settings.theme).

### Basic usage - Saving a basic value to Storge

```javascript App Studio - React.js
Tapcart.action("storage/add", {
  "type": "boolean",
  "key": "is_vip",
  "value": true
});
```

<br />

### Basic usage - Saving custom data to storage

```javascript App Studio - React.js
Tapcart.action("storage/add", {
  "type": "json",
  "key": "customer_profile",
  "value": {
    "age": 26,
    "gender": "f",
		"location": "california"
	}
});
```