> ## Documentation Index
> Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Add multiple members to team

> > For the complete documentation index, see [llms.txt](https://launchdarkly-preview.mintlify.app/llms.txt). For the full documentation snapshot, see [llms-full.txt](https://launchdarkly-preview.mintlify.app/llms-full.txt).

Add multiple members to an existing team by uploading a CSV file of member email addresses. Your CSV file must include email addresses in the first column. You can include data in additional columns, but LaunchDarkly ignores all data outside the first column. Headers are optional. To learn more, read [Manage team members](https://launchdarkly.com/docs/home/account/manage-teams#manage-team-members).

**Members are only added on a `201` response.** A `207` indicates the CSV file contains a combination of valid and invalid entries. A `207` results in no members being added to the team.

On a `207` response, if an entry contains bad input, the `message` field contains the row number as well as the reason for the error. The `message` field is omitted if the entry is valid.

Example `207` response:
```json
{
  "items": [
    {
      "status": "success",
      "value": "new-team-member@acme.com"
    },
    {
      "message": "Line 2: empty row",
      "status": "error",
      "value": ""
    },
    {
      "message": "Line 3: email already exists in the specified team",
      "status": "error",
      "value": "existing-team-member@acme.com"
    },
    {
      "message": "Line 4: invalid email formatting",
      "status": "error",
      "value": "invalid email format"
    }
  ]
}
```

Message | Resolution
--- | ---
Empty row | This line is blank. Add an email address and try again.
Duplicate entry | This email address appears in the file twice. Remove the email from the file and try again.
Email already exists in the specified team | This member is already on your team. Remove the email from the file and try again.
Invalid formatting | This email address is not formatted correctly. Fix the formatting and try again.
Email does not belong to a LaunchDarkly member | The email address doesn't belong to a LaunchDarkly account member. Invite them to LaunchDarkly, then re-add them to the team.

On a `400` response, the `message` field may contain errors specific to this endpoint.

Example `400` response:
```json
{
  "code": "invalid_request",
  "message": "Unable to process file"
}
```

Message | Resolution
--- | ---
Unable to process file | LaunchDarkly could not process the file for an unspecified reason. Review your file for errors and try again.
File exceeds 25mb | Break up your file into multiple files of less than 25mbs each.
All emails have invalid formatting | None of the email addresses in the file are in the correct format. Fix the formatting and try again.
All emails belong to existing team members | All listed members are already on this team. Populate the file with member emails that do not belong to the team and try again.
File is empty | The CSV file does not contain any email addresses. Populate the file and try again.
No emails belong to members of your LaunchDarkly organization | None of the email addresses belong to members of your LaunchDarkly account. Invite these members to LaunchDarkly, then re-add them to the team.




## OpenAPI

````yaml /openapi/launchdarkly-api.json post /api/v2/teams/{teamKey}/members
openapi: 3.0.3
info:
  title: LaunchDarkly REST API
  description: >
    > For the complete documentation index, see
    https://launchdarkly-preview.mintlify.app/llms.txt.

    > For the full documentation snapshot, see
    https://launchdarkly-preview.mintlify.app/llms-full.txt.


    This is the LaunchDarkly REST API. It lets you build custom integrations,
    automate your workflow, and manage feature flags and other LaunchDarkly
    resources programmatically.


    For authentication, rate limits, pagination, versioning, JSON Patch and
    semantic patches, beta resources, and the full SDK End-of-Life table, read
    the [REST API overview](https://launchdarkly-preview.mintlify.app/api).


    To fetch the complete OpenAPI spec, use [Get OpenAPI
    spec](https://launchdarkly.com/docs/api/other/get-openapi-spec).
  contact:
    name: LaunchDarkly Technical Support Team
    url: https://support.launchdarkly.com
    email: support@launchdarkly.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: '2.0'
servers:
  - url: https://app.launchdarkly.com
    description: ' Default'
  - url: https://app.launchdarkly.us
    description: ' Federal'
security:
  - ApiKey:
      - read
      - write
tags:
  - name: Access tokens
    description: >-
      The access tokens API allows you to list, create, modify, and delete
      access tokens programmatically.
  - name: Account members
    description: >-
      The account members API allows you to invite new members to an account by
      making a `POST` request to `/api/v2/members`. When you invite a new member
      to an account, an invitation is sent to the email you provided.
  - name: Account usage (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: AI Configs
    description: >-
      The AI Configs API allows you to create, retrieve, and edit AI Configs, AI
      Config variations, and AI model configurations.
  - name: Announcements
    description: >-
      The announcements API lets you create and update a custom announcement
      banner that appears in the LaunchDarkly user interface for everyone in
      your organization.
  - name: Applications (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Approvals
    description: >-
      An account member can request approval on changes to a flag or AI Config's
      targeting or variations, or to a segment's targeting. Members may be
      required to request approval depending on the settings in their
      LaunchDarkly project.
  - name: Approvals (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Audit log
    description: >-
      LaunchDarkly maintains a record of all the changes made to any resource in
      the system. You can access this history using the audit log API, including
      filtering by timestamps, or using a custom policy to select which entries
      to receive.
  - name: Code references
    description: >-
      > ### Code references is an Enterprise feature > > Code references is
      available to customers on an Enterprise plan. To learn more, [read about
      our pricing](https://launchdarkly.com/pricing/).
  - name: Context settings
    description: >-
      You can use the context settings API to assign a context to a specific
      variation for any feature flag. To learn more, read [View and manage
      contexts](https://launchdarkly.com/docs/home/observability/context-attributes#view-and-manage-contexts).
  - name: Contexts
    description: >-
      Contexts are people, services, machines, or other resources that encounter
      feature flags in your product. Contexts are identified by their `kind`,
      which describes the type of resources encountering flags, and by their
      `key`.
  - name: Custom roles
    description: >-
      > ### Custom roles is an Enterprise feature > > Custom roles is available
      to customers on an Enterprise plan. To learn more, [read about our
      pricing](https://launchdarkly.com/pricing/).
  - name: Data Export destinations
    description: >-
      > ### Data Export is an add-on feature > > Data Export is available as an
      add-on for customers on a Foundation or Enterprise plan. To learn more,
      [read about our pricing](https://launchdarkly.com/pricing/).
  - name: Environments
    description: >-
      Environments allow you to maintain separate rollout rules in different
      contexts, from local development to QA, staging, and production. With the
      LaunchDarkly Environments API, you can programmatically list, create, and
      manage environments.
  - name: Experiments
    description: >-
      > ### Available for subscription customers > > Experimentation is
      available to all customers on a Developer, Foundation, or Enterprise
      subscription. If you're on an older Pro or Enterprise plan,
      Experimentation is available as an add-on.
  - name: Feature flags
    description: >-
      The feature flags API allows you to list, create, and modify feature flags
      and their targeting. For example, you can control percentage rollouts,
      target specific contexts, or even toggle off a feature flag
      programmatically.
  - name: Feature flags (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Flag import configurations (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Flag links (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Flag triggers
    description: >-
      > ### Flag triggers is an Enterprise feature > > Flag triggers is
      available to customers on an Enterprise plan. To learn more, [read about
      our pricing](https://launchdarkly.com/pricing/).
  - name: Follow flags
    description: >-
      Follow flags to receive email updates about targeting changes to a flag in
      a project and environment.
  - name: Holdouts (beta)
    description: >-
      > ### Available for customers using Experimentation > > Holdouts are
      available to customers using
      [Experimentation](https://launchdarkly.com/docs/api/experiments).
  - name: Insights charts (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Insights deployments (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Insights flag events (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Insights pull requests (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Insights repositories (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Insights scores (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Integration audit log subscriptions
    description: >-
      Audit log integration subscriptions allow you to send audit log events
      hooks to one of dozens of external tools. For example, you can send flag
      change event webhooks to external third party software.
  - name: Integration delivery configurations (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Integrations (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Layers
    description: >-
      > ### Available for customers using Experimentation > > Layers are
      available to customers using
      [Experimentation](https://launchdarkly.com/docs/api/experiments).
  - name: Metrics
    description: >-
      Metrics track flag behavior over time when an experiment is running. The
      data generated from experiments gives you more insight into the impact of
      a particular flag.
  - name: Metrics (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: OAuth2 Clients
    description: >-
      The OAuth2 client API allows you to register a LaunchDarkly OAuth client
      for use in your own custom integrations.
  - name: Persistent store integrations (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Projects
    description: >-
      Projects allow you to manage multiple different software projects under
      one LaunchDarkly account. Each project has its own unique set of
      environments and feature flags.
  - name: Relay Proxy configurations
    description: >-
      > ### Relay Proxy automatic configuration is an Enterprise feature > >
      Relay Proxy automatic configuration is available to customers on an
      Enterprise plan. To learn more, [read about our
      pricing](https://launchdarkly.com/pricing/).
  - name: Release pipelines (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Release policies (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Releases (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Scheduled changes
    description: >-
      > ### Scheduled flag changes is an Enterprise feature > > Scheduled flag
      changes is available to customers on an Enterprise plan. To learn more,
      [read about our pricing](https://launchdarkly.com/pricing/).
  - name: Segments
    description: >-
      > ### Synced segments and larger list-based segments are an Enterprise
      feature > > This section documents endpoints for rule-based, list-based,
      and synced segments.
  - name: Tags
    description: >-
      Tags are simple strings that you can attach to most resources in
      LaunchDarkly. Tags are useful for grouping resources into a set that you
      can name in a resource specifier.
  - name: Teams
    description: >-
      > ### Teams is an Enterprise feature > > Teams is available to customers
      on an Enterprise plan. To learn more, [read about our
      pricing](https://launchdarkly.com/pricing/).
  - name: Teams (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: User settings
    description: >-
      > ### Contexts are now available > > After you have upgraded your
      LaunchDarkly SDK to use contexts instead of users, you should use
      [Contexts](https://launchdarkly.com/docs/api/contexts) instead of the user
      settings API.
  - name: Users
    description: >-
      > ### Contexts are now available > > After you have upgraded your
      LaunchDarkly SDK to use contexts instead of users, you should use
      [Contexts](https://launchdarkly.com/docs/api/contexts) instead of these
      endpoints.
  - name: Users (beta)
    description: >-
      > ### Contexts are now available > > After you have upgraded your
      LaunchDarkly SDK to use contexts instead of users, you should use
      [Contexts](https://launchdarkly.com/docs/api/contexts) instead of these
      endpoints.
  - name: Views (beta)
    description: >-
      > ### This feature is in beta > > To use this feature, pass in a header
      including the `LD-API-Version` key with value set to `beta`. Use this
      header with each call.
  - name: Webhooks
    description: >-
      The webhooks API lets you build your own integrations that subscribe to
      activities in LaunchDarkly. When you generate an activity in LaunchDarkly,
      such as when you change a flag or you create a project, LaunchDarkly sends
      an HTTP POST payload to the...
  - name: Workflow templates
    description: >-
      > ### Workflows are in maintenance mode > > The workflows feature is in
      maintenance mode, and is planned for future deprecation at a date not yet
      specified.
  - name: Workflows
    description: >-
      > ### Workflows are in maintenance mode > > The workflows feature is in
      maintenance mode, and is planned for future deprecation at a date not yet
      specified.
  - name: Other
    description: Other requests available in the LaunchDarkly API.
paths:
  /api/v2/teams/{teamKey}/members:
    post:
      tags:
        - Teams
      summary: Add multiple members to team
      description: >
        > For the complete documentation index, see
        [llms.txt](https://launchdarkly-preview.mintlify.app/llms.txt). For the
        full documentation snapshot, see
        [llms-full.txt](https://launchdarkly-preview.mintlify.app/llms-full.txt).


        Add multiple members to an existing team by uploading a CSV file of
        member email addresses. Your CSV file must include email addresses in
        the first column. You can include data in additional columns, but
        LaunchDarkly ignores all data outside the first column. Headers are
        optional. To learn more, read [Manage team
        members](https://launchdarkly.com/docs/home/account/manage-teams#manage-team-members).


        **Members are only added on a `201` response.** A `207` indicates the
        CSV file contains a combination of valid and invalid entries. A `207`
        results in no members being added to the team.


        On a `207` response, if an entry contains bad input, the `message` field
        contains the row number as well as the reason for the error. The
        `message` field is omitted if the entry is valid.


        Example `207` response:

        ```json

        {
          "items": [
            {
              "status": "success",
              "value": "new-team-member@acme.com"
            },
            {
              "message": "Line 2: empty row",
              "status": "error",
              "value": ""
            },
            {
              "message": "Line 3: email already exists in the specified team",
              "status": "error",
              "value": "existing-team-member@acme.com"
            },
            {
              "message": "Line 4: invalid email formatting",
              "status": "error",
              "value": "invalid email format"
            }
          ]
        }

        ```


        Message | Resolution

        --- | ---

        Empty row | This line is blank. Add an email address and try again.

        Duplicate entry | This email address appears in the file twice. Remove
        the email from the file and try again.

        Email already exists in the specified team | This member is already on
        your team. Remove the email from the file and try again.

        Invalid formatting | This email address is not formatted correctly. Fix
        the formatting and try again.

        Email does not belong to a LaunchDarkly member | The email address
        doesn't belong to a LaunchDarkly account member. Invite them to
        LaunchDarkly, then re-add them to the team.


        On a `400` response, the `message` field may contain errors specific to
        this endpoint.


        Example `400` response:

        ```json

        {
          "code": "invalid_request",
          "message": "Unable to process file"
        }

        ```


        Message | Resolution

        --- | ---

        Unable to process file | LaunchDarkly could not process the file for an
        unspecified reason. Review your file for errors and try again.

        File exceeds 25mb | Break up your file into multiple files of less than
        25mbs each.

        All emails have invalid formatting | None of the email addresses in the
        file are in the correct format. Fix the formatting and try again.

        All emails belong to existing team members | All listed members are
        already on this team. Populate the file with member emails that do not
        belong to the team and try again.

        File is empty | The CSV file does not contain any email addresses.
        Populate the file and try again.

        No emails belong to members of your LaunchDarkly organization | None of
        the email addresses belong to members of your LaunchDarkly account.
        Invite these members to LaunchDarkly, then re-add them to the team.
      operationId: postTeamMembers
      parameters:
        - name: teamKey
          in: path
          description: The team key
          required: true
          schema:
            type: string
            format: string
            description: The team key
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: CSV file containing email addresses
        required: true
      responses:
        '201':
          description: Team member imports response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamImportsRep'
        '207':
          description: Partial Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamImportsRep'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestErrorRep'
        '401':
          description: Invalid access token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorRep'
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MethodNotAllowedErrorRep'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitedErrorRep'
components:
  schemas:
    TeamImportsRep:
      type: object
      properties:
        items:
          type: array
          description: >-
            An array of details about the members requested to be added to this
            team
          items:
            $ref: '#/components/schemas/MemberImportItem'
    InvalidRequestErrorRep:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Specific error code encountered
          example: invalid_request
        message:
          type: string
          description: Description of the error
          example: Invalid request body
    UnauthorizedErrorRep:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Specific error code encountered
          example: unauthorized
        message:
          type: string
          description: Description of the error
          example: Invalid access token
    MethodNotAllowedErrorRep:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Specific error code encountered
          example: method_not_allowed
        message:
          type: string
          description: Description of the error
          example: Method not allowed
    RateLimitedErrorRep:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Specific error code encountered
          example: rate_limited
        message:
          type: string
          description: Description of the error
          example: You've exceeded the API rate limit. Try again later.
    MemberImportItem:
      type: object
      required:
        - status
        - value
      properties:
        message:
          type: string
          description: >-
            An error message, including CSV line number, if the
            <code>status</code> is <code>error</code>
        status:
          type: string
          description: >-
            Whether this member can be successfully imported
            (<code>success</code>) or not (<code>error</code>). Even if the
            status is <code>success</code>, members are only added to a team on
            a <code>201</code> response.
          example: error
        value:
          type: string
          description: >-
            The email address for the member requested to be added to this team.
            May be blank or an error, such as 'invalid email format', if the
            email address cannot be found or parsed.
          example: new-team-member@acme.com
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Authorization

````