---
title: "Update an invitation"
method: PATCH
path: "/invitations/{id}"
tags: ["Invitations"]
---

# Update an invitation

`PATCH /invitations/{id}`

## Request

- Base URL: `https://api.cavuno.com/v1`
- URL: `https://api.cavuno.com/v1/invitations/{id}`
- Auth: HTTP bearer

Changes a pending invitation's role.

## Path parameters

- `id` string, required: The invitation ID.

## Request body

- UpdateInvitationBody
  - `role` 'admin' | 'member', required: The new role for the pending invitation.

## Response `200`

Successful response.

- Invitation
  - `id` string, required: Unique identifier for the invitation.
  - `object` 'invitation', required: String representing the object's type.
  - `email` string, required: The invited email address.
  - `role` string, required: The role the invitee will receive on accept.
  - `status` string, required: The invitation status: pending, expired, accepted, declined.
  - `expiresAt` string, required: ISO-8601 timestamp of when the invitation expires.
  - `invitedByUserId` string, nullable, required: Identifier of the user who created the invitation.
  - `createdAt` string, required: ISO-8601 timestamp of when the invitation was created.

## Other responses

- `404`: Invitation not found.
- `409`: The invitation is no longer pending.

## Changes

- **2026-10-19** `c34152c38176`: 2 info
  - added the optional property `error/upgrade` to the response with the `404` status
  - added the optional property `error/upgrade` to the response with the `409` status

[Operation history](https://skmtc.dev/cavuno/apis/cavuno-v1-rest-api/changes/invitations/:id/patch.md)

---

[API](https://skmtc.dev/cavuno/apis/cavuno-v1-rest-api.md) · [All operations](https://skmtc.dev/cavuno/apis/cavuno-v1-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cavuno/apis/cavuno-v1-rest-api/revisions/d5974dabff14?raw)
