# Create User with Role

```http
POST https://api.synup.com/api/v4/users/create
```

This API creates a new user with the specified role and attributes.

**Behavior:**
- Assigns the user a specific role based on permissions.
- Configures user attributes such as name, email, and access level.

Source: https://developer.synup.com/api/user-management/create-user-with-role

## Request body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `input` | object | required |  |
| `input.email` | string | required | User's email address |
| `input.roleId` | string | required | ID of the role to assign to the user |
| `input.firstName` | string | required | User's first name |
| `input.directCustomer` | boolean | required | Indicates if the user is a direct customer |

## Example request

```bash
curl -X POST 'https://api.synup.com/api/v4/users/create' \
  -H 'Authorization: API YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "input": {
    "email": "user@example.com",
    "roleId": "Q3VzdG9tUm9sZToyMDgzMQ==",
    "firstName": "John",
    "directCustomer": true
  }
}'
```

## Responses

| Status | Description |
| --- | --- |
| `200` | User created successfully |
| `400` | Bad Request - Invalid input parameters |
| `401` | Unauthorized - Valid API key required |
| `403` | Forbidden - Insufficient permissions to create users |
