---
title: "AddMemberToTeam"
method: POST
path: "/api/teams/{team_slug}/members/add"
tags: ["Team Members"]
---

# AddMemberToTeam

`POST /api/teams/{team_slug}/members/add`

Add a member to a team, or send an invitation if the user doesn't exist.

If the user exists in the system, they are added directly as a team member.
If the user doesn't exist, an invitation email is sent to them to sign up
and join the team.

Returns:
    Message describing whether the user was added or invited.

Raises:
    ValidationException: If the user is already a member or has a pending invitation.

## Path parameters

- `team_slug` string, required — The team slug.

## Request body

- TeamMemberModify
  - `userName` string, required

## Response `201`

Document created, URL follows

- Message
  - `message` string, required

## Other responses

- `400` — Bad request syntax or unsupported method

---

[API](https://skmtc.dev/litestar-org/apis/app.md) · [All operations](https://skmtc.dev/litestar-org/apis/app/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/litestar-org/app/revisions/461f3baecebb/schema)
