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

# Create Account

> Create a new customer account.

Create a new customer account in the Stat Proxies system.

## Request

### Headers

| Header          | Value                   | Required |
| --------------- | ----------------------- | -------- |
| `Authorization` | `Bearer {your_api_key}` | Yes      |
| `Content-Type`  | `application/json`      | Yes      |

### Body Parameters

<ParamField body="discord_id" type="string" required>
  The customer's Discord ID.
</ParamField>

<ParamField body="discord_name" type="string" required>
  The customer's Discord username.
</ParamField>

<ParamField body="email" type="string" required>
  The customer's email address.
</ParamField>

### Example Request

```bash theme={null}
curl -X POST "https://dashboard.statproxies.com/api/v2/account/create" \
  -H "Authorization: Bearer {your_api_key}" \
  -H "Content-Type: application/json" \
  -d '{
    "discord_id": "123456789012345678",
    "discord_name": "user#1234",
    "email": "user@example.com"
  }'
```

## Response

### Success Response

```json theme={null}
{
  "response": "success"
}
```

### Error Responses

#### 503 Service Unavailable - Account Exists

```json theme={null}
{
  "error": "account_already_exists"
}
```

#### 503 Service Unavailable - Creation Failed

```json theme={null}
{
  "error": "account_creation_failed"
}
```

## Account Properties

When an account is created, it is initialized with:

| Property             | Value                 |
| -------------------- | --------------------- |
| `member`             | `false`               |
| `unix_creation_date` | Current timestamp     |
| `iso_creation_date`  | Formatted date string |

## Use Case

This endpoint is useful for:

* **Pre-provisioning accounts**: Create accounts before customers make purchases
* **Integration with external systems**: Sync user accounts from other platforms
* **Reseller platforms**: Create sub-accounts for customers

## Notes

* If an account with the same Discord ID already exists, the request will fail
* The email address is not validated for uniqueness
* Accounts created via API can later sign in using Discord OAuth
* This is a legacy endpoint primarily for Discord-based authentication

## Modern Authentication

For modern integrations, users typically create accounts by:

1. Signing in via the dashboard with Google, GitHub, or Discord
2. Accounts are automatically created on first sign-in
3. Multiple auth providers can be linked to the same account

<Card title="Learn About Authentication" icon="key" href="/api-reference/authentication">
  Set up API keys and authenticate your requests.
</Card>
