---
title: "Invite new members"
method: POST
path: "/api/v2/members"
tags: ["Account members"]
---

# Invite new members

`POST /api/v2/members`

Invite one or more new members to join an account. Each member is sent an invitation. Members with Admin or Owner roles may create new members, as well as anyone with a `createMember` permission for "member/\*". If a member cannot be invited, the entire request is rejected and no members are invited from that request.

Each member _must_ have an `email` field and either a `role` or a `customRoles` field. If any of the fields are not populated correctly, the request is rejected with the reason specified in the "message" field of the response.

Valid base role names that you can provide for the `role` field include `reader`, `writer`, `admin`, `owner/admin`, and `no_access`. To learn more about base roles, read [Organization roles](https://launchdarkly.com/docs/home/account/roles/organization-roles).

If you are using the `customRoles` field instead, you can provide the key for any role that you have created, or for any preset [organization role](https://launchdarkly.com/docs/home/account/roles/organization-roles) or [project role](https://launchdarkly.com/docs/home/account/roles/project-roles) provided by LaunchDarkly. Some preset roles additionally require that you specify `roleAttributes`. To learn more, read [Using role scope](https://launchdarkly.com/docs/home/account/roles/role-scope).

Requests to create account members will not work if SCIM is enabled for the account.

_No more than 50 members may be created per request._

A request may also fail because of conflicts with existing members. These conflicts are reported using the additional `code` and `invalid_emails` response fields with the following possible values for `code`:

- **email_already_exists_in_account**: A member with this email address already exists in this account.
- **email_taken_in_different_account**: A member with this email address exists in another account.
- **duplicate_email**s: This request contains two or more members with the same email address.

A request that fails for one of the above reasons returns an HTTP response code of 400 (Bad Request).

## Request body

- NewMemberForm[]
  - `email` string, required — The member's email
  - `password` string — The member's password
  - `firstName` string — The member's first name
  - `lastName` string — The member's last name
  - `role` 'reader' | 'writer' | 'admin' | 'no_access' — The member's initial role, if you are using a base role for the initial role
  - `customRoles` string[] — An array of the member's initial roles, if you are using custom roles or preset roles provided by LaunchDarkly
  - `teamKeys` string[] — An array of the member's teams
  - `roleAttributes` RoleAttributeMap

## Response `201`

Member collection response

- Members
  - `items` Member[], required — An array of members
    - `_links` object, required — The location and content type of related resources
    - `_id` string, required — The member's ID
    - `firstName` string — The member's first name
    - `lastName` string — The member's last name
    - `role` string, required — The member's base role. If the member has no additional roles, this role will be in effect.
    - `email` string, required — The member's email address
    - `_pendingInvite` boolean, required — Whether the member has a pending invitation
    - `_verified` boolean, required — Whether the member's email address has been verified
    - `_pendingEmail` string — The member's email address before it has been verified, for accounts where email verification is required
    - `customRoles` string[], required — The set of additional roles, besides the base role, assigned to the member
    - `mfa` string, required — Whether multi-factor authentication is enabled for this member
    - `excludedDashboards` string[] — Default dashboards that the member has chosen to ignore
    - `_lastSeen` integer, required
    - `_lastSeenMetadata` LastSeenMetadata
      - `tokenId` string — The ID of the token used in the member's last session
    - `_integrationMetadata` IntegrationMetadata
      - `externalId` string, required
      - `externalStatus` IntegrationStatus, required
        - `display` string, required
        - `value` string, required
      - `externalUrl` string, required
      - `lastChecked` integer, required
    - `teams` MemberTeamSummaryRep[] — Details on the teams this member is assigned to
      - `customRoleKeys` string[], required — A list of keys of the custom roles this team has access to
      - `key` string, required — The team key
      - `_links` object
      - `name` string, required — The team name
    - `permissionGrants` MemberPermissionGrantSummaryRep[] — A list of permission grants. Permission grants allow a member to have access to a specific action, without having to create or update a custom role.
      - `actionSet` string — The name of the group of related actions to allow. A permission grant may have either an <code>actionSet</code> or a list of <code>actions</code> but not both at the same time.
      - `actions` string[] — A list of actions to allow. A permission grant may have either an <code>actionSet</code> or a list of <code>actions</code> but not both at the same time.
      - `resource` string, required — The resource for which the actions are allowed
    - `creationDate` integer, required
    - `oauthProviders` OAuthProviderKind[] — A list of OAuth providers
    - `version` integer — Version of the current configuration
    - `roleAttributes` RoleAttributeMap
  - `_links` object, required — The location and content type of related resources
  - `totalCount` integer — The number of members returned

## Other responses

- `400` — Invalid request
- `401` — Invalid access token
- `403` — Forbidden
- `409` — Status conflict
- `429` — Rate limited

---

[API](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api.md) · [All operations](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/launchdarkly/launchdarkly-rest-api/revisions/69c5c9aafe78/schema)
