# app.tempomusic.actor.getDeletionState

> Published by [lexicons.tempomusic.fan](https://lexicon.garden/identity/did:plc:pxsuqmultto34oks44m2lgxm)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:pxsuqmultto34oks44m2lgxm/app.tempomusic.actor.getDeletionState)
- [Documentation](https://lexicon.garden/lexicon/did:plc:pxsuqmultto34oks44m2lgxm/app.tempomusic.actor.getDeletionState/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:pxsuqmultto34oks44m2lgxm/app.tempomusic.actor.getDeletionState/examples)

## Definitions

### `app.tempomusic.actor.getDeletionState`

**Type**: `query`

Return the requesting viewer's account-deletion state so the client's bootstrap gate can decide between showing the app, the dated restoration screen, or the terminal 'window passed' variant (TEM-492). The viewer DID is read from the service-auth JWT (`iss` claim) — no explicit parameter, matching the appview's `getAnalyticsConsent` convention. When the profile row has been hard-deleted at day 30 the endpoint returns `deleted: false` (indistinguishable from an account that was never deleted — intentional; a purged account IS effectively gone). `purgeAt` is the **earliest** possible purge date: profiles under moderation hold or with an open account report (TEM-416) survive past this timestamp until the guard clears, so the client-side date is a lower bound.

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `deleted` | `boolean` | Yes | True when `actor_profiles.deleted_at IS NOT NULL` for the viewer. False both when the account is live AND when the profile row has been hard-deleted at day 30 (the two are indistinguishable — purged accounts do not carry a marker). |
| `purgeAt` | `string` (datetime) | No | Earliest possible day-30 hard-delete timestamp (`deletedAt + APPVIEW_RETENTION_PROFILES_DAYS`). Absent when `deleted` is false. Note: profiles under an active moderation hold or an open account report survive past this timestamp until the guard clears. |
| `deletedAt` | `string` (datetime) | No | Timestamp at which the account was soft-deleted (`deleteAccount` day 0). Absent when `deleted` is false. |
| `restorable` | `boolean` | No | TEM-518: false when the soft deletion originated from a PDS-direct account destruction (self-service PDS account page, `delete_origin = PDS_DIRECT`) — the repo no longer exists upstream, `restoreAccount` refuses with `NotRestorable`, and the client gate must render the terminal variant instead of a dated restoration promise. Absent when `deleted` is false; clients default an absent field to true (rolling-deploy compat). |

## Raw Schema

```json
{
  "id": "app.tempomusic.actor.getDeletionState",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "deleted"
          ],
          "properties": {
            "deleted": {
              "type": "boolean",
              "description": "True when `actor_profiles.deleted_at IS NOT NULL` for the viewer. False both when the account is live AND when the profile row has been hard-deleted at day 30 (the two are indistinguishable — purged accounts do not carry a marker)."
            },
            "purgeAt": {
              "type": "string",
              "format": "datetime",
              "description": "Earliest possible day-30 hard-delete timestamp (`deletedAt + APPVIEW_RETENTION_PROFILES_DAYS`). Absent when `deleted` is false. Note: profiles under an active moderation hold or an open account report survive past this timestamp until the guard clears."
            },
            "deletedAt": {
              "type": "string",
              "format": "datetime",
              "description": "Timestamp at which the account was soft-deleted (`deleteAccount` day 0). Absent when `deleted` is false."
            },
            "restorable": {
              "type": "boolean",
              "description": "TEM-518: false when the soft deletion originated from a PDS-direct account destruction (self-service PDS account page, `delete_origin = PDS_DIRECT`) — the repo no longer exists upstream, `restoreAccount` refuses with `NotRestorable`, and the client gate must render the terminal variant instead of a dated restoration promise. Absent when `deleted` is false; clients default an absent field to true (rolling-deploy compat)."
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Return the requesting viewer's account-deletion state so the client's bootstrap gate can decide between showing the app, the dated restoration screen, or the terminal 'window passed' variant (TEM-492). The viewer DID is read from the service-auth JWT (`iss` claim) — no explicit parameter, matching the appview's `getAnalyticsConsent` convention. When the profile row has been hard-deleted at day 30 the endpoint returns `deleted: false` (indistinguishable from an account that was never deleted — intentional; a purged account IS effectively gone). `purgeAt` is the **earliest** possible purge date: profiles under moderation hold or with an open account report (TEM-416) survive past this timestamp until the guard clears, so the client-side date is a lower bound."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
