---
title: "Add a user to a team"
method: PUT
path: "/teams/{id}/members"
tags: ["team"]
---

# Add a user to a team

`PUT /teams/{id}/members`

Add a user to a team.

## Path parameters

- `id` integer, required

## Request body

- ModelsTeamMember
  - `admin` boolean — Whether or not the member is an admin of the team. See the docs for more about what a team admin can do
  - `created` string — A timestamp when this relation was created. You cannot change this value.
  - `id` integer — The unique, numeric id of this team member relation.
  - `username` string — The username of the member. We use this to prevent automated user id entering.

## Response `201`

The newly created member object

- ModelsTeamMember
  - `admin` boolean — Whether or not the member is an admin of the team. See the docs for more about what a team admin can do
  - `created` string — A timestamp when this relation was created. You cannot change this value.
  - `id` integer — The unique, numeric id of this team member relation.
  - `username` string — The username of the member. We use this to prevent automated user id entering.

## Other responses

- `400` — Invalid member object provided.
- `403` — The user does not have access to the team
- `500` — Internal error

---

[API](https://skmtc.net/go-vikunja/apis/vikunja-api.md) · [All operations](https://skmtc.net/go-vikunja/apis/vikunja-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/go-vikunja/vikunja-api/revisions/feb3f68bbdf1/schema)
