---
title: "Invite a member"
method: POST
path: "/v2/teamspaces/{teamspaceId}/members"
tags: ["Teamspace Admin"]
---

# Invite a member

`POST /v2/teamspaces/{teamspaceId}/members`

## Request

- Base URL: `https://context7.com/api`
- URL: `https://context7.com/api/v2/teamspaces/{teamspaceId}/members`
- Auth: HTTP bearer

Creates a pending invitation and sends the invitation email. Owners and admins only. Refused when the teamspace is full (30 seats on Pro, 200 on Enterprise, counting pending invitations), when the email is already a member or invited, and on Vercel Marketplace teamspaces (409 `marketplace_managed`).

## Request body

- object
  - `email` string, email, required
  - `role` 'admin' | 'developer', required

## Response `200`

Invitation created

- TeamspaceInviteResponse
  - `success` boolean
  - `data` object
    - `type` 'pending_invitation'
    - `email` string
    - `invitationId` string

## Other responses

- `400`: Bad Request - Invalid input parameters
- `401`: Unauthorized - Invalid or missing API key
- `403`: Forbidden - Insufficient permissions or plan restrictions
- `409`: Conflict - Resource already exists
- `500`: Internal Server Error

## Changes

- **2026-10-22** `e17589fd8767`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/context7/apis/context7-public-api/changes/v2/teamspaces/:teamspaceId/members/post.md)

---

[API](https://skmtc.dev/context7/apis/context7-public-api.md) - [All operations](https://skmtc.dev/context7/apis/context7-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/context7/apis/context7-public-api/revisions/945f7834fa8c?raw)
