---
title: "Add team member (admin)"
method: POST
path: "/api/admin/teams/{teamId}/members"
tags: ["Admin", "Teams"]
---

# Add team member (admin)

`POST /api/admin/teams/{teamId}/members`

## Request

- Base URL: `https://app.d-sports.org`
- URL: `https://app.d-sports.org/api/admin/teams/{teamId}/members`
- Auth: HTTP bearer

Gate: canManageTeam with owner or legacy admin on the team, or platform admin/superadmin. Editors and viewers get 403. Only platform admins may assign `owner`. Body `{ userId, role? }`, role defaults to editor. Missing userId is 400 "userId is required". Returns the TeamAdmin scalar row (no `user` object).

## Path parameters

- `teamId` string, required

## Request body

- object
  - `userId` string, required
  - `role` string

## Response `201`

{ success, data: TeamAdmin }

## Other responses

- `400`: { success: false, error: "userId is required" }
- `401`: { success: false, error, code: UNAUTHORIZED }
- `403`: { success: false, error, code: FORBIDDEN }
- `500`: { success: false, error, code: INTERNAL_ERROR }

## Changes

- **2026-11-18** `6de639c52609`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api/changes/api/admin/teams/:teamId/members/post.md)

---

[API](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api.md) - [All operations](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api/llms.txt) - [OpenAPI document](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api/revisions/63735cf90a04?raw)
