# Create a new end user

`POST /user_registration`

> Wheelhouse Pro API. Web version: https://docs.usewheelhouse.com/pro/reference/create-user · OpenAPI spec: https://docs.usewheelhouse.com/pro/openapi.yaml · Operation ID: `createUser` · Tag: Users · Index of all docs pages: https://docs.usewheelhouse.com/llms.txt

Registers a new user, or registers again a user you have already registered.

A user you have already registered is found by their `integrators_user_id` first, and only then by
`email`. When the `integrators_user_id` matches, that user is returned and the `email` you send is
not used.

To register a customer who already has a Wheelhouse account, include their User API Key in the
`X-User-API-Key` header. Their account is linked to your integration and their profile and password
are left unchanged.

`email` and `password` are set only when the user is created. An existing user's email and password
are never changed by this endpoint.

## Request

`POST https://api.usewheelhouse.com/ss_api/v1/user_registration`

Authentication: send your integration API key in the `X-Integration-API-Key` header (see https://docs.usewheelhouse.com/pro/authentication.md).

### Request body (`application/json`, required)

A user

An integration user. Include as much information as is available.

- `first_name` (string, required): The user's first name.
- `last_name` (string, required): The user's last name.
- `email` (string, required): The email contact for this user. This is a unique identifier across the system.
- `integrators_user_id` (string, required): The unique id used to identify this user within the integration partner. **This MUST be unique across environments.**
- `phone` (string): The phone number for this user.
- `integrators_affiliate_name` (string): The name of the affiliate if the end user is through an affiliate.
- `integrators_affiliate_user_id` (string): The unique id used to identify this user within the integration partner.
- `password` (string): (Recommended) Password for accessing Wheelhouse website. If not specified, user will not have access to Wheelhouse website. Applies only when the user is created; it is ignored for existing users.
- `allow_marketing_emails` (boolean, default: `false`): Whether we are allowed to send marketing emails to the customer.
- `company` (string): Company affiliation of the user.
- `portfolio_size` (string, one of: `0-9`, `10-49`, `50-99`, `100+`): Number of listings the user operates.

### Example request

```bash
curl -X POST 'https://api.usewheelhouse.com/ss_api/v1/user_registration' \
  -H 'X-Integration-API-Key: <your integration API key>' \
  -H 'Content-Type: application/json' \
  -d '{
  "integrators_user_id": "pm-10482",
  "first_name": "Jane",
  "last_name": "Doe",
  "email": "jane.doe@example.com",
  "phone": "+1 512 555 0142",
  "company": "Doe Vacation Rentals",
  "portfolio_size": "10-49",
  "allow_marketing_emails": false
}'
```

Path and query parameters are placeholders. The body is a complete example; replace its values with your own.

## Responses

### 200

Successfully created user

Body (`application/json`): object `userApiResponse`

- `id` (integer, required): The Wheelhouse user ID.
- `first_name` (string, required, nullable): The user's first name. `null` when linking an existing Wheelhouse user who has none.
- `last_name` (string, required, nullable): The user's last name. `null` when linking an existing Wheelhouse user who has none.
- `email` (string, required): The user's email.
- `user_api_key` (string, required, nullable): The user specific API key. `null` if the user has no valid user API key.

Example shape (generated from the schema; placeholder values, not a real response):

```json
{
  "id": 0,
  "first_name": "string",
  "last_name": "string",
  "email": "string",
  "user_api_key": "string"
}
```

### 401

API key authorization failed, or the `X-User-API-Key` is invalid

### 403

The user already connects this integration to Wheelhouse directly from their Wheelhouse account, so it cannot also be managed through the API.

### 409

The email belongs to an existing Wheelhouse account you did not register (send that user's User API Key in the `X-User-API-Key` header to link them), or the `integrators_user_id` is already registered to another Wheelhouse user.
