---
title: "Create a team membership"
method: POST
path: "/api/public/v1/team-membership"
tags: ["TeamMembershipResource"]
---

# Create a team membership

`POST /api/public/v1/team-membership`

## Request

- Base URL: `https://allquiet.app` (the document declares no server; this is the origin it was published from)
- URL: `https://allquiet.app/api/public/v1/team-membership`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/allquiet/apis/all-quiet-public-api/docs/api/public/v1/team-membership/post.ts> (a function with typed inputs; its response is checked against the schema)

Add a user to a team with a role. Team-scoped keys can only manage memberships within their scoped teams.

**Required API key permissions**

- **Scope:** `team-memberships:create`
- **Accepted key types:** organization API key (org-wide), organization API key (team-scoped), personal access token (org-wide), personal access token (team-scoped)
- **Access:** Operates on a single organization. Pass organizationId when your API key spans multiple organizations.
- **Organization role (user-linked keys only):** Member when the user has an explicit organization membership. Explicit organization membership is not required; team-based access applies and effective access is gated by the required team role.
- **Required team role (user-linked keys only):** Administrator
- Organization API keys are not subject to organization or team role checks.

## Query parameters

- `organizationId` string, uuid
- `provision` boolean

## Request body

- AllQuietApiPublicTeamMembershipsTeamMembershipResourceRequest
  - `teamId` string, uuid, required
  - `userId` string, uuid, nullable
  - `email` string, email, nullable
  - `role` string, required

## Response `200`

OK

- AllQuietApiPublicTeamMembershipsTeamMembershipResourceResponse
  - `id` string, uuid
  - `teamId` string, uuid
  - `userId` string, uuid, nullable
  - `email` string, nullable
  - `role` string, nullable
  - `activatedAt` string, date-time, nullable
  - `isProvisioned` boolean

---

[API](https://skmtc.dev/allquiet/apis/all-quiet-public-api.md) - [All operations](https://skmtc.dev/allquiet/apis/all-quiet-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/allquiet/apis/all-quiet-public-api/revisions/bd7da0475359?raw)
