---
title: "Change an invitation's role"
method: PATCH
path: "/v2/teamspaces/{teamspaceId}/invitations/{invitationId}"
tags: ["Teamspace Admin"]
---

# Change an invitation's role

`PATCH /v2/teamspaces/{teamspaceId}/invitations/{invitationId}`

## Request

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

Owners and admins only.

## Request body

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

## Response `200`

Role changed

- object
  - `success` boolean
  - `message` string

## Other responses

- `400`: Bad Request - Invalid input parameters
- `401`: Unauthorized - Invalid or missing API key
- `403`: Forbidden - Insufficient permissions or plan restrictions
- `404`: Not Found - Resource doesn't exist
- `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/invitations/:invitationId/patch.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)
