---
title: "Cancel invitation"
method: POST
path: "/v1/invitations/{invitationId}/cancel"
---

# Cancel invitation

`POST /v1/invitations/{invitationId}/cancel`

## Request

- Base URL: `https://api.zavu.dev`
- URL: `https://api.zavu.dev/v1/invitations/{invitationId}/cancel`
- Auth: HTTP bearer

Cancel an active invitation. The client will no longer be able to use the invitation link.

## Path parameters

- `invitationId` string, required

## Response `200`

Invitation cancelled.

- InvitationResponse
  - `invitation` Invitation, required
    - `id` string, required
    - `url` string, required: Full URL to share with the client.
    - `token` string, required: Unique invitation token.
    - `clientName` string, nullable
    - `clientEmail` string, nullable
    - `clientPhone` string, nullable
    - `phoneNumberId` string, nullable: ID of a pre-assigned Zavu phone number for WhatsApp registration. Always null for `messenger` invitations.
    - `connectionType` 'whatsapp_waba' | 'messenger': Which Meta channel the client connects: `whatsapp_waba` (official WhatsApp Cloud API via embedded signup) or `messenger` (a Facebook Page's Messenger inbox, including Marketplace chats).
    - `status` 'pending' | 'in_progress' | 'completed' | 'expired' | 'cancelled' | 'failed', required: Current status of the partner invitation. `failed` means the client started the connection and it did not finish (they cancelled Meta's dialog, denied a permission, or abandoned the tab). A failed invitation is still usable: the same link can be retried, and it moves back to `in_progress` when the client tries again.
    - `senderId` string, nullable: ID of the sender created when invitation is completed.
    - `connectedAccount` object, nullable: The account the client linked, populated once the invitation is `completed`. Null before that. Use it to show the partner what was connected without fetching the sender.
      - `channel` 'whatsapp' | 'messenger', required
      - `id` string, required: Provider-side identifier: the WhatsApp phone number ID, or the Facebook Page ID.
      - `name` string, nullable: Display name of the connected account: the WhatsApp verified name, or the Facebook Page name.
    - `failureReason` string, nullable: Stable code for why the last attempt failed, present when `status` is `failed`. Values include `fb_cancelled` (client closed Meta's dialog), `fb_not_authorized` (permission denied), `signup_abandoned` (started but never finished), `meta_no_pages` (the client administers no Facebook Page), and `internal_error`. Treat unknown codes as a generic failure.
    - `failedAt` string, date-time, nullable
    - `expiresAt` string, date-time, required
    - `viewedAt` string, date-time, nullable
    - `startedAt` string, date-time, nullable
    - `completedAt` string, date-time, nullable
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required

## Other responses

- `400`: Cannot cancel this invitation (already completed or cancelled).
- `401`: Unauthorized.
- `404`: Invitation not found.

## Changes

> 80 revisions in range; 1 not diffed.

- **2026-07-31** `59d740df8cdd`: 2 warning, 3 info
  - added the new `failed` enum value to the `invitation/status` response property for the response status `200`
  - added the new `messenger` enum value to the `invitation/connectionType` response property for the response status `200`
  - added the optional property `invitation/connectedAccount` to the response with the `200` status
  - added the optional property `invitation/failedAt` to the response with the `200` status
  - …1 more
- **2026-07-23** `12d6d706121e`: 1 info
  - removed the `whatsapp_alt` enum value from the `invitation/connectionType` response property for the response status `200`
- **2026-07-05** `4bde620b384f`: 1 info
  - added the optional property `invitation/connectionType` to the response with the `200` status

[Operation history](https://skmtc.dev/zavudev/apis/zavu-unified-messaging-layer-api/changes/v1/invitations/:invitationId/cancel/post.md)

---

[API](https://skmtc.dev/zavudev/apis/zavu-unified-messaging-layer-api.md) - [All operations](https://skmtc.dev/zavudev/apis/zavu-unified-messaging-layer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zavudev/apis/zavu-unified-messaging-layer-api/revisions/75bc777b0ffb?raw)
