# Create a new user and obtain a unique API key or get an API key from an already created account without Steam OAuth

`POST /v1/user`

**Create a new user and obtain a unique API key or get an API key from an already created account without Steam OAuth.**

Both accounts must be unrestricted on Waxpeer.

Target account must be new on Waxpeer or have no active 2fa and enabled the collection of account information (You can enable it on the site if it is turned off).

**The token will not be used as a cookie in Steam during the API key creation/get process.**

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `api` | query | string | required | Your [WAXPEER API](https://waxpeer.com/profile/user) of creator account |

## Request body

```json
{
  "token": "ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnpkV0lpT2lJeE1qTTBOVFkzT0Rrd0lpd2libUZ0WlNJNklrcHZhRzRnUkc5bElpd2lhV0YwSWpveE5URTJNak01TURJeWZRLlNmbEt4d1JKU01lS0tGMlFUNGZ3cE1lSmYzNlBPazZ5SlZfYWRRc3N3NWM="
}
```

## Example (curl)

```bash
curl -X POST 'https://api.waxpeer.com/v1/user?api=%7B%7BAPI_KEY%7D%7D' \
  -H 'Content-Type: application/json' \
  -d '{
  "token": "ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnpkV0lpT2lJeE1qTTBOVFkzT0Rrd0lpd2libUZ0WlNJNklrcHZhRzRnUkc5bElpd2lhV0YwSWpveE5URTJNak01TURJeWZRLlNmbEt4d1JKU01lS0tGMlFUNGZ3cE1lSmYzNlBPazZ5SlZfYWRRc3N3NWM="
}'
```

## Example response

```json
{
  "success": true,
  "msg": "Need to refresh access token",
  "data": {
    "api": "1hbhbhodexkdei1axlc3ka7woibo2h16zoyidjv5wfwvqd6bty39e4086d110228",
    "isNew": true
  },
  "exp": 1712852259
}
```

## Responses

- `200` successful operation

**Please open the response schema if you need more information about the response parameters**
- `403` Wrong or missing Waxpeer API key of creator account

## Notes for agents

- Auth is the query parameter `api`, not an Authorization header.
- See [/statuses.md](/statuses.md) for numeric trade status plus `escrow_status` / `release_date`.
- Prefer GET /v2/search-items-by-name over v1.
- Do not use GET /v1/ready-to-transfer-p2p; use the [trade websocket](/websocket.md).
