# Create a user

`POST /user/signup`

Time to create a user account, eh?

Base URL: https://galaxy.scalar.com, https://void.scalar.com/

## Request body (application/json)

Also accepts: application/xml.

User to create

- `id` (integer)
- `name` (string)
- `email` (string, required)
- `password` (string, required)

Example:

```json
{
  "name": "Marc",
  "email": "marc@scalar.com",
  "password": "i-love-scalar"
}
```

## Responses

### 201: User account created successfully

Returns `User`.

- `id` (integer)
- `name` (string)

```json
{
  "id": 1,
  "name": "Marc"
}
```

### 400: Bad Request

Returns `BadRequestError`.

- `type` (string)
- `title` (string)
- `status` (integer)
- `detail` (string)

```json
{
  "type": "https://example.com/errors/bad-request",
  "title": "Bad Request",
  "status": 400,
  "detail": "The request was invalid."
}
```

### 401: Unauthorized

Returns `UnauthorizedError`.

- `type` (string)
- `title` (string)
- `status` (integer)
- `detail` (string)

```json
{
  "type": "https://example.com/errors/not-found",
  "title": "Unauthorized",
  "status": 401,
  "detail": "You are not authorized to access this resource."
}
```

### 403: Forbidden

Returns `ForbiddenError`.

- `type` (string)
- `title` (string)
- `status` (integer)
- `detail` (string)

```json
{
  "type": "https://example.com/errors/forbidden",
  "title": "Forbidden",
  "status": 403,
  "detail": "You are not authorized to access this resource."
}
```

### 409: Conflict

Returns `Conflict`.

- `type` (string)
- `title` (string)
- `status` (integer)
- `detail` (string)

```json
{
  "type": "https://example.com/errors/conflict",
  "title": "Conflict",
  "status": 409,
  "detail": "The resource you are trying to access is in conflict."
}
```

### 422: Unprocessable Entity

Returns `UnprocessableEntity`.

- `type` (string)
- `title` (string)
- `status` (integer)
- `detail` (string)

```json
{
  "type": "https://example.com/errors/unprocessable-entity",
  "title": "Unprocessable Entity",
  "status": 422,
  "detail": "The request was invalid."
}
```

## Example request

```bash
curl -X POST 'https://galaxy.scalar.com/user/signup' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Marc",
  "email": "marc@scalar.com",
  "password": "i-love-scalar"
}'
```
