> ## 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.

# Sweep Expired App Data

> Remove your app records whose TTL has passed

Deletes every record of your app whose `ttlSeconds` has passed. Reads
already skip expired records, so this is housekeeping — call it from a
scheduled job to keep short-lived records (OAuth state, idempotency markers)
from piling up.

> [!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 POST "https://api.launchmystore.io/api/v1/app-data/sweep-expired" \
  -H "Authorization: Basic $(printf '%s:%s' "$CLIENT_ID" "$CLIENT_SECRET" | base64)"
```

## Response

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

## Errors

| Status | Description |
| - | - |
| `401` | Missing, malformed or wrong client credentials |


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