# Add teammates to a team

```http
POST https://trydimmi.com/api/v1/teams/{team}/members
```

## Authorization

Send an API token as `Authorization: Bearer <token>`.
The token needs: `members:write`.

## Path parameters

- `team` (string, required): Id of the team, starting with team_, such as team_01jx2m8k4t. Find it with GET /teams.

## Body

- `member_ids` (string[] | null, required): Member ids (mem_...), 1 to 100.

## Response 200 (OK)

- `data` (object[] | null, required): One result for each member the request asked to add to the team.
  - `member_id` (string, required): The member id exactly as the request sent it.
  - `result` (string, required): What adding this member came to: added, already_member, inactive or not_found.

## Response default (Error)

- `code` (string, required): Stable code for programs to tell errors apart, such as validation_failed or internal_error.
- `errors` (object): Each rejected field mapped to its messages. Only present when the input was invalid.
- `message` (string, required): What went wrong, in words safe to show a person.

## Example request

```bash
curl --request POST \
  --url 'https://trydimmi.com/api/v1/teams/{team}/members' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "member_ids": [
    "<string>"
  ]
}'
```

## Example response

```json
{
  "data": [
    {
      "member_id": "<string>",
      "result": "<string>"
    }
  ]
}
```

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
