---
title: "Add a user to a team"
method: POST
path: "/users/{id}/teams"
tags: ["Users"]
---

# Add a user to a team

`POST /users/{id}/teams`

Adds a user to a team. If the user is already a member of the team, the operation is idempotent and returns the existing membership.

## Path parameters

- `id` integer, required — User ID

## Request body

- AddTeamToUserRequest
  - `teamId` integer, required — ID of the team to add the user to

## Response `201`

User added to team

- UserTeam
  - `userId` number, required — User ID
  - `teamId` number, required — Team ID

## Other responses

- `401` — Authentication failed. The API key is missing or invalid.
- `404` — User or team not found
- `429` — Rate limit exceeded. Retry after the X-RateLimit-Reset interval.

---

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