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

# Create a new user account and return an API key.

> **Required scope:** write

**Required scope:** `write`

### Request body

`AuthSignupRequest`

<ParamField body="email" type="string" required />

<ParamField body="org_id" type="string">
  Reserved for backward compatibility. Public signup does not allow overriding org\_id.
</ParamField>

<ParamField body="password" type="string" required />

### Response

`AuthResponse`

<ResponseField name="api_key" type="string" required />

<ResponseField name="api_key_created_at" type="string" required />

<ResponseField name="api_key_prefix" type="string" required />

<ResponseField name="email" type="string" required />

<ResponseField name="org_id" type="string" required />

<ResponseField name="user_id" type="string" required />

### Status codes

| Code  | Meaning                                            |
| ----- | -------------------------------------------------- |
| `201` | User created                                       |
| `401` | Unauthorized — missing or invalid credentials      |
| `403` | Forbidden — the key/token lacks the required scope |
| `429` | Rate limited — see Retry-After / X-RateLimit-Reset |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.nsr.stateset.com/api/v1/auth/signup' \
    --header 'X-API-Key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "email": "string",
    "org_id": "string",
    "password": "string"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "api_key": "string",
    "api_key_created_at": "string",
    "api_key_prefix": "string",
    "email": "string",
    "org_id": "string",
    "user_id": "string"
  }
  ```
</ResponseExample>
