# Invite user

Create a user for a specific account (tenant).
Include the user's information in the request body. The `email` and `metadata` fields are required. The `metadata` field can be empty (e.g., `{}`).

Endpoint: POST /resources/users/v2
Version: 1.0
Security: bearer

## Security:

  - `bearer` (unknown)
    http bearer JWT

## Header parameters:

  - `frontegg-tenant-id` (string, required)
    The tenant ID

  - `frontegg-application-id` (string, required)
    The application ID

## Request fields (application/json):

  - `email` (string)
    The email of the user. If not provided, the username is required

  - `username` (string)
    The username of the user. If not provided, the email is required. Maximum length is 255 characters.

  - `name` (string)

  - `profilePictureUrl` (string)

  - `password` (string)

  - `phoneNumber` (string)

  - `provider` (string)
    Enum: "local", "saml", "google", "github", "facebook", "microsoft", "scim2", "slack", "apple"

  - `metadata` (string)
    Stringified JSON object
    Example: {}

  - `skipInviteEmail` (boolean)

  - `roleIds` (array)

  - `emailMetadata` (object)

  - `expirationInSeconds` (number)
    Temporary user expiration in seconds

## Response 201 fields (application/json):

  - `id` (string)

  - `email` (string)

  - `verified` (boolean)

  - `name` (string)

  - `profilePictureUrl` (string)

  - `roles` (array)

  - `permissions` (array)

  - `metadata` (string)

  - `createdAt` (string)

  - `lastLogin` (string)

  - `activatedForTenant` (boolean)

  - `temporaryExpirationDate` (string)

