# Create or assign member

Create a new user in Transmit or assign an existing one as a member to the organization. A user must be created with at least one of the following: email, phone number, or username (used for password authentication). However, an email address is required to federate login using a SAML identity provider. The response contains a user ID that can be used to identify the user/member whenever needed. Required permissions: apps:create, [appId]:create, users:create.

Endpoint: POST /v1/organizations/{organization_id}/members
Security: OrgAdminAccessToken, ClientAccessToken

## Path parameters:

  - `organization_id` (string, required)
    ID of the organization

## Request fields (application/json):

  - `email` (string)
    Primary email address of the user

  - `phone_number` (string)
    Primary phone number of the user, specified in E.164 format

  - `username` (string)
    Username used to identify the user

  - `secondary_emails` (array)
    Secondary email addresses to add to user's current emails

  - `secondary_phone_numbers` (array)
    Secondary phone numbers to add to user's phone numbers, each specified in E.164 format

  - `birthday` (string)
    User's birthday

  - `address` (object)
    User's address

  - `address.country` (string)
    Country

  - `address.state` (string)
    State

  - `address.city` (string)
    City

  - `address.street_address` (string)
    Street address

  - `address.postal_code` (string)
    Postal code

  - `address.type` (string)
    Enum: "Home", "Work", "Other"

  - `name` (object)
    Object describing user's full name

  - `name.title` (string)
    Title

  - `name.first_name` (string)
    User's first name

  - `name.last_name` (string)
    User's last name

  - `name.middle_name` (string)
    User's middle name

  - `external_account_id` (string)
    User identifier in an app, set by the app

  - `custom_app_data` (object)
    Custom data object for app-related user info

  - `picture` (string)
    The picture of user, specified as a URL

  - `language` (string)
    The language of the user, as provided by the browser using the [Accept-Language](https://www.rfc-editor.org/rfc/rfc7231#section-5.3.5) header field

  - `custom_data` (object)
    Custom data object for tenant user info

  - `external_user_id` (string)
    A unique identifier in a tenant

  - `credentials` (object)
    The password of the user, who is identified by either a username or primary email.

  - `credentials.password` (string, required)
    The user's new password

  - `credentials.force_replace` (boolean)
    When true the password is temporary and the user will be required to replace it upon successful login

  - `delegated_access` (object)
    If this user is a dependent, this defines the permissions that the primary user will have to act on behalf of the dependent user.

  - `delegated_access.actor_id` (string, required)
    The ID of the primary user that has permissions to act on behalf of this user

  - `delegated_access.permissions` (array, required)
    Names of permissions that are granted to the primary user on behalf of the dependent

  - `organization_information` (object)
    Membership details

  - `organization_information.enabled` (boolean)
    Indicates if the user's membership is currently enabled

  - `organization_information.department` (string)
    The department of the user within the organization

  - `organization_information.title` (string)
    The title of the user within the organization

  - `organization_information.manager` (string)
    The manager of the user within the organization

  - `role_ids` (array, required)
    role ids to assign the member to.

  - `send_invite` (boolean)
    If true, sends the member an invitation email for each app the member is assigned to. The email contains an invite link that redirects to the app's login experience. Once authenticated, the member will be assigned to the app, their email address will be verified, and their status will be updated to active. The invitation is valid for 48 hours.

## Response 200 fields (application/json):

  - `result` (object, required)
    User ID autogenerated upon user creation

  - `result.user_id` (string, required)
    ID of the user

## Response 409 fields (application/json):

  - `message` (string, required)

  - `error_code` (number, required)

  - `ts_error_code` (string, required)


