---
title: "Add Members To Team"
method: POST
path: "/api/v2/teams/{team_id}/members"
tags: ["Teams V2"]
---

# Add Members To Team

`POST /api/v2/teams/{team_id}/members`

## Request

- Base URL: `https://public-api.linearb.io`
- URL: `https://public-api.linearb.io/api/v2/teams/{team_id}/members`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/linearb/apis/linearb-api/docs/api/v2/teams/:team_id/members/post.ts> (a function with typed inputs; its response is checked against the schema)

Teams V2 API endpoint performs a LinearB add members to a team.

## Path parameters

- `team_id` integer, required

## Request body

- TeamsToUsersRequestModel
  - `user_ids` TeamMembershipId[]: User ids
    - `joined_at` string: The date when the user joined the team (format: YYYY-MM-DD)
    - `id` integer, required: User id
  - `emails` TeamMembershipEmail[]: User emails
    - `joined_at` string: The date when the user joined the team (format: YYYY-MM-DD)
    - `email` string, required: User email

## Response `200`

Successful Response

- TeamToUserResponseModel[]
  - `team_id` integer, required: The unique identifier of the team
  - `user_identifier` union, required: The unique identifier of the user (can be numeric ID or email)
    - integer
    - string
  - `joined_at` string: The date when the user joined the team (ISO format) or null if not specified
  - `status` 'associated' | 'not_found', required: An enumeration.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `405`: Method Not Allowed
- `409`: Conflict
- `422`: Validation Error
- `500`: Internal Server Error
- `504`: Gateway Timeout

---

[API](https://skmtc.dev/linearb/apis/linearb-api.md) - [All operations](https://skmtc.dev/linearb/apis/linearb-api/llms.txt) - [OpenAPI document](https://skmtc.dev/linearb/apis/linearb-api/revisions/3aea06710db6?raw)
