---
title: "Cancel a pending workspace invitation"
method: POST
path: "/api/v1/account/workspace-invites/{id}/cancel"
tags: ["Account"]
---

# Cancel a pending workspace invitation

`POST /api/v1/account/workspace-invites/{id}/cancel`

## Request

- Base URL: `https://api.dotsy.ai`
- URL: `https://api.dotsy.ai/api/v1/account/workspace-invites/{id}/cancel`
- Auth: HTTP bearer

Withdraws an invitation that has not been accepted. Only a workspace Owner or Admin can cancel.

## Path parameters

- `id` string, required

## Headers

- `X-Dotsy-Workspace` string

## Response `200`

The invitation was cancelled.

- object
  - `ok` true, required

## Other responses

- `400`: There is no such invitation, or it can't be cancelled.
- `401`: Missing or invalid credentials.
- `403`: `workspace_admin_required`: only a workspace Owner or Admin can do this. `guest_only`: this account can't invite teammates. `guest_requires_account`: a guest token can't invite teammates.

---

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