> ## Documentation Index
> Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete App Data

> Delete records by key or key prefix

Deletes the record with a key, or every record whose key starts with a
prefix. One of `key` or `prefix` is required, so a bare request can't wipe
your app's data.

> [!NOTE]
>
> App data is authenticated with your app's **client credentials**, not a
> store's access token — so your app can read what it stored (for example a
> store's access token) before it has a token to use:
>
> ```
> Authorization: Basic base64(<client_id>:<client_secret>)
> ```
>
> Records are private to your app. `storeId` is a partition you choose: pass
> the store's id to keep a record per store, or omit it for app-wide records.

## Request

```bash theme={null}
curl -X DELETE "https://api.launchmystore.io/api/v1/app-data?storeId=ef10744c-5c4a-4f47-85fc-062ba44afb5f&key=settings" \
  -H "Authorization: Basic $(printf '%s:%s' "$CLIENT_ID" "$CLIENT_SECRET" | base64)"
```

## Query Parameters

**key** `string`

Delete the record with exactly this key.

**prefix** `string`

Delete every record whose key starts with this text.

**storeId** `string`

The store partition. Omit to delete app-wide records.

**all** `string`

`1` to delete across every store partition. Overrides `storeId`.

## Response

The number of records deleted under `data.deleted` (`0` when nothing
matched).

```json theme={null}
{
  "status": 200,
  "state": "success",
  "message": null,
  "data": { "deleted": 1 }
}
```

## Errors

| Status | Description |
| - | - |
| `400` | Neither `key` nor `prefix` given |
| `401` | Missing, malformed or wrong client credentials |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.