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

# Audience

> A signed-in player's own play history on OpenGame, which they can read, share or erase, and the player totals a creator may see.

A player's play history is private to that player, who can read, share or erase it. Creators get counts of signed-in players across their games, not names.

[Authentication](https://docs.opengame.io/api-reference/authentication.md) covers each credential, and [errors](https://docs.opengame.io/api-reference/errors.md) covers the JSON error body.

## Read your own play history

`GET https://opengame.io/api/v1/audience/passport`

**Authentication:** A signed-in browser session.

Browser session only; a token is not read. Any signed-in account can read the history, whether or not it has platform access, and the platform flag does not apply. Covers the signed-in account and nobody else.

### Parameters

#### Query

**year** `integer`

The recap year: four digits, from 1970 to this year in UTC. Defaults to this year. At least 1970.

### Request

```bash cURL theme={"system"}
curl --request GET \
  --url 'https://opengame.io/api/v1/audience/passport' \
  --cookie "$OPENGAME_BROWSER_COOKIE"
```

### Response 200

The passport.

```json theme={"system"}
{
  "year": 2026,
  "timezone": "UTC",
  "coverage": {
    "dataSince": "2026-09-14T08:00:00Z",
    "completeThrough": "2026-10-19T00:00:00Z",
    "updatedAt": "2026-10-19T06:00:00Z"
  },
  "preferences": {
    "publicPassport": false,
    "audienceOverlap": false
  },
  "lifetime": {
    "visibleMs": 14520000,
    "games": 2,
    "days": 11,
    "longestStreak": 5,
    "currentStreak": 2
  },
  "recap": {
    "visibleMs": 14520000,
    "games": 2,
    "days": 11,
    "longestStreak": 5,
    "currentStreak": 2,
    "achievements": [
      {
        "publicId": "tq7m4x2k9p",
        "gameTitle": "Tide Runner",
        "achievementId": "first_win",
        "title": "First win",
        "description": "Finish any level with every marble.",
        "unlockedAt": "2026-10-21T19:04:12Z",
        "rarity": 0.31,
        "coverageSince": "2026-10-14T10:20:31Z",
        "source": "game_reported"
      }
    ]
  },
  "achievements": [
    {
      "publicId": "tq7m4x2k9p",
      "gameTitle": "Tide Runner",
      "achievementId": "first_win",
      "title": "First win",
      "description": "Finish any level with every marble.",
      "unlockedAt": "2026-10-21T19:04:12Z",
      "rarity": 0.31,
      "coverageSince": "2026-10-14T10:20:31Z",
      "source": "game_reported"
    }
  ],
  "games": [
    {
      "publicId": "tq7m4x2k9p",
      "title": "Tide Runner",
      "visibleMs": 9180000,
      "days": 7
    },
    {
      "publicId": "m3k8v2rw",
      "title": "Lantern Keeper",
      "visibleMs": 5340000,
      "days": 4
    }
  ],
  "leaderboards": [
    {
      "gameId": "b3e1d9a4-27c6-4f80-9d15-0a6e8c4b2f71",
      "gameTitle": "Tide Runner",
      "boardKey": "fastest-run",
      "board": "Fastest run",
      "rank": 1,
      "players": 214,
      "percentile": 99.5
    }
  ]
}
```

### Errors

| Status | Meaning |
| - | - |
| 400 | `invalid_request`: not a four-digit year up to this one. |
| 401 | `sign_in_required`, including an account that is no longer active. |
| 500 | `internal_error`: a failure retrying cannot fix. Quote `requestId` when you report it. |
| 503 | `temporarily_unavailable`: your account or your play history could not be read. Try again; this answer includes no wait. Any other failure on our side includes `retryAfterSeconds`. |

## Erase your play history

`DELETE https://opengame.io/api/v1/audience/passport`

**Authentication:** A signed-in browser session.

Browser session only, from the OpenGame site. Deletes your measured play time, turns off both sharing settings, and takes you out of any overlap a creator has already been shown. Achievements unlocked before now stop appearing. Reviews you wrote stay up without the play time measured beside them, and friends stop seeing the games you played before now. Your scores stay on their boards and in `leaderboards`.

### Request

```bash cURL theme={"system"}
curl --request DELETE \
  --url 'https://opengame.io/api/v1/audience/passport' \
  --cookie "$OPENGAME_BROWSER_COOKIE" \
  --header 'Origin: https://opengame.io'
```

### Response 200

Erased.

```json theme={"system"}
{
  "erased": true
}
```

| Field | Required | Type |
| - | - | - |
| `erased` | yes | `true` |

### Errors

| Status | Meaning |
| - | - |
| 401 | `sign_in_required`: no browser session, or the account is no longer active. |
| 403 | `forbidden`: the request did not come from the OpenGame site. |
| 429 | `erasure_running`: an earlier erasure is still removing this history from the analytics warehouse. Includes `retryAfterSeconds`. |
| 500 | `internal_error`: a failure retrying cannot fix. Quote `requestId` when you report it. |
| 503 | `temporarily_unavailable`: your account or your play history could not be read. Try again; this answer includes no wait. Any other failure on our side includes `retryAfterSeconds`. `platform_unconfigured`: a fault on OpenGame's side, so try again later. |

## Choose what your play history shares

`PATCH https://opengame.io/api/v1/audience/preferences`

**Authentication:** A signed-in browser session.

Browser session only, from the OpenGame site. Send both settings. Passport sharing is off for now, so both must be false.

### Body

Sent as `application/json`.

**publicPassport** `boolean` *required*

Show lifetime totals on your public profile. Off for now: `true` is rejected. Example: `false`.

**audienceOverlap** `boolean` *required*

Include your play in the overlap between games that creators see. Off for now: `true` is rejected. Example: `false`.

### Request

```bash cURL theme={"system"}
curl --request PATCH \
  --url 'https://opengame.io/api/v1/audience/preferences' \
  --cookie "$OPENGAME_BROWSER_COOKIE" \
  --header 'Origin: https://opengame.io' \
  --header 'Content-Type: application/json' \
  --data '{
  "publicPassport": false,
  "audienceOverlap": false
}'
```

### Response 200

Saved.

```json theme={"system"}
{
  "saved": true
}
```

| Field | Required | Type |
| - | - | - |
| `saved` | yes | `true` |

### Errors

| Status | Meaning |
| - | - |
| 400 | `invalid_request`: both settings are needed, as booleans, and nothing else, and passport sharing is off for now, so either one `true` is rejected. |
| 401 | `sign_in_required`: no browser session, or the account is no longer active. |
| 403 | `forbidden`: the request did not come from the OpenGame site. |
| 413 | `body_too_large`: the body is over `analytics.batchBytesMax` (65536) bytes. |
| 415 | `content_type`: send `Content-Type: application/json`. |
| 500 | `internal_error`: a failure retrying cannot fix. Quote `requestId` when you report it. |
| 503 | `temporarily_unavailable`: your account or your play history could not be read. Try again; this answer includes no wait. Any other failure on our side includes `retryAfterSeconds`. `platform_unconfigured`: a fault on OpenGame's side, so try again later. |

## Count signed-in players across all your games

`GET https://opengame.io/api/v1/audience/creator`

**Authentication:** A creator token or a signed-in browser session.

Requires the `read` scope on an account-wide token or a browser session; a game-pinned token is rejected. Reads the same complete UTC weeks as game stats, and filters are rejected as `filters_removed`. Counts only signed-in players whose play was measured, and none smaller than 5. A week's totals are frozen the first time they are released, so each later read of it answers the same.

### Parameters

#### Query

**window** `string` (default: week)

Only `week`. Always `week`, one ISO week from Monday to Sunday in UTC. A week is readable 6 hours after it ends, and each read of it counts the same receipts. `day`, `month` and `all` are rejected as `invalid_range`, and the message names `window=week` and `period`.

**period** `string`

Which ISO week, such as `2026-W43`. Defaults to the newest complete week. At most 104 weeks back, and never a week starting before 2026-08-01. A week that starts more than 90 days ago has numbers only if it was read before then; otherwise they are null and `freshness.unavailable` names why. Example: `2026-W43`.

### Request

```bash cURL theme={"system"}
curl --request GET \
  --url 'https://opengame.io/api/v1/audience/creator' \
  --header "Authorization: Bearer $OPENGAME_TOKEN"
```

### Response 200

The totals.

```json theme={"system"}
{
  "window": {
    "kind": "week",
    "period": "2026-W42",
    "start": "2026-10-12T00:00:00Z",
    "end": "2026-10-19T00:00:00Z"
  },
  "from": "2026-10-12",
  "to": "2026-10-18",
  "timezone": "UTC",
  "population": "signed_in_measured",
  "released": true,
  "coverage": {
    "dataSince": "2026-09-14T08:00:00Z",
    "completeThrough": "2026-10-19T00:00:00Z",
    "updatedAt": "2026-10-19T06:00:00Z"
  },
  "overlapStatus": "released",
  "overlapReleasedAt": "2026-10-19T06:00:00Z",
  "players": 164,
  "returningPlayers": 41,
  "multipleGamePlayers": null,
  "visibleMs": 81904000,
  "overlap": [
    {
      "publicId": "m3k8v2rw",
      "title": "Lantern Keeper",
      "players": 23
    }
  ]
}
```

### Errors

| Status | Meaning |
| - | - |
| 400 | `invalid_range` for a window or period a reader may not ask for, `filters_removed` when a filter was sent, or `invalid_request` for a funnel. `from`, `to` and a `timezone` except UTC are rejected as `invalid_range`, never snapped to a nearby week, and the message names `window` and `period`. |
| 401 | `sign_in_required`: no credential, or the account is no longer active. `token_invalid` or `token_revoked`: sign in again, or use a token that has not been revoked. |
| 403 | `insufficient_scope`: use an account-wide token with the `read` scope. `not_launched`: the creator API is closed to this caller. It is open to each signed-in account, so sign in and try again. |
| 500 | `internal_error`: a failure retrying cannot fix. Quote `requestId` when you report it. |
| 503 | `temporarily_unavailable`: your token, your account or the totals could not be checked. Try again. These answers include no wait; the token check's names `retry: later`. Any other failure on our side includes `retryAfterSeconds`. |

## Compare players before and after one of your updates

`GET https://opengame.io/api/v1/audience/updates/{versionId}`

**Authentication:** A creator token or a signed-in browser session.

Same access as the audience totals. Compares signed-in players in the ISO week before and the ISO week after the week a version was published, leaving out the release week itself, so both sides are windows a creator can also read on their own. The week after is counted once it has settled. `available` is false for a version that was never published, and `partial` is true when the week after has not settled or recorded history does not cover both weeks.

### Parameters

#### Path

**versionId** `string (uuid)` *required*

A published version of one of your games. Example: `0d7e3b58-6a21-4f9c-b4e2-93c1a8f05d17`.

### Request

```bash cURL theme={"system"}
curl --request GET \
  --url 'https://opengame.io/api/v1/audience/updates/0d7e3b58-6a21-4f9c-b4e2-93c1a8f05d17' \
  --header "Authorization: Bearer $OPENGAME_TOKEN"
```

### Response 200

The comparison.

```json theme={"system"}
{
  "available": true,
  "partial": false,
  "before": "2026-W40",
  "after": "2026-W42",
  "excludedWeek": "2026-W41",
  "publishedAt": "2026-10-07T10:31:56Z",
  "timezone": "UTC",
  "coverage": {
    "dataSince": "2026-09-14T08:00:00Z",
    "completeThrough": "2026-10-19T00:00:00Z",
    "updatedAt": "2026-10-19T06:00:00Z"
  },
  "windows": [
    {
      "period": "before",
      "week": "2026-W40",
      "players": 71,
      "returningPlayers": 18
    },
    {
      "period": "after",
      "week": "2026-W42",
      "players": 88,
      "returningPlayers": 26
    }
  ]
}
```

### Errors

| Status | Meaning |
| - | - |
| 400 | `invalid_request`: not a version UUID. |
| 401 | `sign_in_required`: no credential, or the account is no longer active. `token_invalid` or `token_revoked`: sign in again, or use a token that has not been revoked. |
| 403 | `insufficient_scope`: use an account-wide token with the `read` scope. `not_launched`: the creator API is closed to this caller. It is open to each signed-in account, so sign in and try again. |
| 404 | `game_not_found`: the version is not one of your games', or the game was removed. |
| 500 | `internal_error`: a failure retrying cannot fix. Quote `requestId` when you report it. |
| 503 | `temporarily_unavailable`: your token, your account or the totals could not be checked. Try again. These answers include no wait; the token check's names `retry: later`. Any other failure on our side includes `retryAfterSeconds`. |


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