---
title: "Cancel invite"
method: POST
path: "/iam/v1/users/{id}/actions/cancel"
tags: ["Users"]
---

# Cancel invite

`POST /iam/v1/users/{id}/actions/cancel`

Marks the invite as `Cancelled` and invalidates the invite token so any outstanding email
links stop working. The invite document is retained (soft cancel) — the user row remains
visible in `GET /iam/v1/users` with `inviteStatus: Cancelled`. Use `DELETE /iam/v1/users/{id}`
to fully remove the record.

Returns `404` if no invite exists for the given ID, and `409` if the invite is already cancelled.

Requires `usersManager` permission.

## Path parameters

- `id` string, required

## Query parameters

- `dryRun` boolean

## Headers

- `Idempotency-Key` string, required

## Request body

- object

## Response `200`

OK - Invite cancelled.

- CancelInviteResponse — Response confirming invite cancellation.
  - `message` string, required — Success message
  - `inviteId` string, required — The invite document ID.

## Other responses

- `400` — Bad Request - The server cannot process the request, often due to a malformed request.
- `401` — Unauthorized - Invalid API key.
- `403` — Forbidden - The client is not authorized to perform the request.
- `404` — Not Found - The requested resource does not exist.
- `409` — Conflict - Invite already cancelled.
- `500` — Internal Server Error - Something went wrong with the DoiT API server.

---

[API](https://skmtc.dev/doit/apis/doit-cloud-intelligence.md) · [All operations](https://skmtc.dev/doit/apis/doit-cloud-intelligence/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/doit/doit-cloud-intelligence/revisions/9416402fc119/schema)
