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

# Create User

> Create a new user in your project

Create a new user in your project. This endpoint allows you to register users with platform and locale information.

<ParamField body="appUserId" type="string">
  Your app's custom user identifier
</ParamField>

<ParamField body="userPlatform" type="string" required>
  Platform (IOS, ANDROID, WEB, OTHER)
</ParamField>

<ParamField body="locale" type="string" required>
  User's locale/language (e.g., "en\_US")
</ParamField>

<ParamField body="email" type="string">
  User email address (must be valid email)
</ParamField>

<ParamField body="country" type="string">
  User's country code
</ParamField>

## Response Fields

| Field          | Type   | Required | Description                             |
| -------------- | ------ | -------- | --------------------------------------- |
| id             | string | Yes      | Unique user identifier (auto-generated) |
| projectId      | string | Yes      | Project this user belongs to            |
| appUserId      | string | No       | Your app's custom user identifier       |
| email          | string | No       | User email address                      |
| monthlyRevenue | number | No       | User's monthly revenue (null initially) |
| country        | string | No       | User's country                          |
| userPlatform   | string | No       | Platform                                |
| locale         | string | No       | User's locale                           |
| createdAt      | string | Yes      | User creation timestamp (ISO 8601)      |
| updatedAt      | string | Yes      | Last update timestamp (ISO 8601)        |

## Example Request

```json theme={null}
{
  "appUserId": "my_user_789",
  "userPlatform": "IOS",
  "locale": "en_US",
  "email": "newuser@example.com",
  "country": "US"
}
```

## Example Response

```json theme={null}
{
  "id": "clm7x1a2b000008l7h3k1b2c3",
  "projectId": "clm7x1a2b000008l7h3k1b2c3", 
  "appUserId": "my_user_789",
  "email": "newuser@example.com",
  "monthlyRevenue": null,
  "country": "US",
  "userPlatform": "IOS",
  "locale": "en_US",
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z"
}
```

## Error Responses

| Status Code | Description                           | Example Response                                    |
| :---------- | :------------------------------------ | :-------------------------------------------------- |
| 400         | Bad request - Missing required fields | `{"error": "userPlatform and locale are required"}` |
| 401         | Unauthorized - Invalid API key        | `{"error": "Unauthorized"}`                         |
| 500         | Internal server error                 | `{"error": "Failed to create user"}`                |
