> ## Documentation Index
> Fetch the complete documentation index at: https://doc.playsmart.api.dolly.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# PlaySmart API overview: endpoints, auth, and responses

> PlaySmart's REST API manages player accounts, coin economies, real-money payouts, and analytics for mobile games. Learn the base URLs and response format.

PlaySmart is a backend API platform built for mobile game developers who need a complete monetization stack out of the box. It handles user registration and authentication, a virtual coin economy with USD conversion, PayPal cash withdrawals, game configuration delivery, and analytics event ingestion — so your game client can focus on gameplay rather than infrastructure.

## What the API provides

* **User authentication** — register and log in players with email and password; receive short-lived access tokens and long-lived refresh tokens
* **Coin economy** — track each player's `coins_balance`, award or deduct coins based on game events, and convert coin balances to USD money balances
* **PayPal withdrawals** — let players request real-money payouts; the API manages payout status (`pending`, `paid`, `failed`)
* **Game configuration** — fetch active game records including store URLs, game mode, ad settings, and version requirements
* **Event tracking** — ingest batches of named analytics events (such as `LevelCompleted`, `AdImpression`, or `IAPPurchase`) with arbitrary custom data

## Base URL

All endpoints are grouped under three path prefixes:

| Prefix      | Purpose                                              |
| ----------- | ---------------------------------------------------- |
| `/auth/*`   | Registration and login                               |
| `/v1/*`     | Game config, coin economy, withdrawals, app settings |
| `/ingest/*` | Analytics event ingestion                            |

Your PlaySmart API base URL is provided when you set up your integration. All examples in this documentation use [https://playsmart-gateway-1w8ko864.uc.gateway.dev](https://playsmart-gateway-1w8ko864.uc.gateway.dev) as a placeholder.

## Response format

Every response uses a consistent envelope. Successful responses wrap the payload in a `data` key:

```json theme={null}
{
  "data": { ... }
}
```

Error responses use an `error` object with a machine-readable `code` and a human-readable `message`:

```json theme={null}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "invalid_credentials"
  }
}
```

## Where to go next

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Register a player, get a token, and make your first API call in under five minutes.
  </Card>

  <Card title="Authentication" icon="lock" href="/authentication">
    Understand how JWT bearer tokens work and how to handle token expiry.
  </Card>

  <Card title="Coin economy" icon="coins" href="/concepts/economy">
    Learn how coin balances, USD conversion, and withdrawals fit together.
  </Card>

  <Card title="Event tracking" icon="chart-line" href="/concepts/events">
    See the full list of event types and how to batch-ingest analytics events.
  </Card>
</CardGroup>
