---
title: "Put somebody on a team"
method: POST
path: "/api/v1/teams/{id}/members"
tags: ["Team"]
---

# Put somebody on a team

`POST /api/v1/teams/{id}/members`

## Request

- Base URL: `http://localhost:5180`
- URL: `http://localhost:5180/api/v1/teams/{id}/members`
- Auth: API key in cookie `better-auth.session_token`

By the address they signed up with. An address nobody has signed up with and confirmed yet is filed as an invitation instead: the row waits with `userId` empty and becomes a membership, with the permissions it was sent with, on the first request its owner makes once signed in. Adding an address that already holds an invitation here replaces it, so nobody is listed twice.

Either way the address is told by mail, and `notified` says whether that mail was accepted for delivery. A false there is not a failure of the request: the place is held, but nobody has been told yet, so send it again.

## Path parameters

- `id` string, required

## Request body

- object
  - `email` string, email, required
  - `permissions` 'owner' | 'member'

## Response `200`

The members, with them on the list.

- object
  - `ok` unknown, required
  - `data` object, required
    - `members` object[], required
      - `id` string, required
      - `teamId` string, required
      - `userId` string: Absent while an invitation to `pendingEmail` is outstanding.
      - `permissions` 'owner' | 'member', required
      - `pendingEmail` string
      - `invitedByUserId` string
      - `name` string, required
      - `email` string, required
      - `createdAt` string, required
      - `updatedAt` string, required
    - `notified` boolean: Whether the mail telling them they are on the team was accepted for delivery. False means the place is held but nobody has been told, so the invitation is worth sending again.
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

---

[API](https://skmtc.dev/dardaris/apis/dardaris-api.md) · [All operations](https://skmtc.dev/dardaris/apis/dardaris-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dardaris/apis/dardaris-api/revisions/4aff33835c73?raw)
