# Invite a user

`POST https://backend.estactics.com/api/users/inviteUser`

Adds a person to your team and sends them an invitation email.

Authentication: `Authorization: Bearer YOUR_API_KEY`. Required permission: `users.MANAGE_ORG_USERS`.

## Body parameters

- `email` (string, required): Email address.
- `firstName` (string, required): First name.
- `lastName` (string): Last name.
- `occupationRole` (string): Job title.
- `country` (string): Country name.
- `gender` (string): Gender.
- `timezone` (string): Time zone.
- `language` (string): Language code.
- `phoneCountryCode` (string): Two-letter country code of the phone number.
- `phoneDialCode` (integer): Dial code without the plus sign.
- `phone` (integer): National phone number, digits only.
- `hierarchyId` (integer, required): ID of the team the user belongs to.
- `permissionsRoleId` (integer, required): ID of the role of the user.
- `hasHierarchyDataAccess` (boolean): True when the user sees all the data of their team.
- `password` (string, required): A first password for the account. At least 8 characters, with upper and lower case letters, a number and one of @#$!^()%*?&.
- `brandsIds` (array of integer, required): IDs of the brands the user can access.

## Example request body

```json
{
  "email": "jamie.parker@example.com",
  "password": "Example#Pass123",
  "firstName": "Jamie",
  "lastName": "Parker",
  "hierarchyId": 7,
  "permissionsRoleId": 2,
  "brandsIds": [
    3
  ]
}
```

## Example response

```json
{
  "success": true,
  "data": {
    "id": 19,
    "email": "jamie.parker@example.com",
    "language": null
  }
}
```
