> For the complete documentation index, see [llms.txt](https://support.marscat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.marscat.io/development-guide/frontend-development/api-interface/api-interface-details/level-0/setextendeddata.md).

# setExtendedData

Used to set extended data for the current MarsApp, providing up to 1MB of independent storage space for each application.

{% hint style="info" %}
Tip:

* Each call will overwrite the previously written data. To clear data, simply set an empty object or empty string
* Recommended for small configuration data, account information, preference settings, etc.
  {% endhint %}

Request Parameters:

| Parameter Name | Type             | Required | Description                       |
| -------------- | ---------------- | -------- | --------------------------------- |
| extend         | Object \| String | Yes      | Arbitrary extended data to store. |

Response Parameters: None

Call Example:

{% code title="example.js" %}

```javascript
let payload = {
  extend: {
    xxxxx: "1Cg...Qij"
  }
};

const response = await relayx.setExtendedData(payload);
if (response.code == 200) {
  console.log("Set extended data successfully");
}
```

{% endcode %}
