> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opnform.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel Workspace Invite

> Requires `workspace-users-write`. Delete a pending invite.

# Cancel Workspace Invite

Delete an outstanding workspace invitation.

## Authentication & Scope

Requires `workspace-users-write` ability and **admin** privileges in the workspace.

## Request

```http theme={null}
DELETE /open/workspaces/{workspaceId}/invites/{inviteId}/cancel HTTP/1.1
Host: api.opnform.com
Authorization: Bearer <token>
```

### Path Parameters

| Parameter   | Type   | Description                 |
| ----------- | ------ | --------------------------- |
| workspaceId | number | ID of the workspace.        |
| inviteId    | number | ID of the invite to cancel. |

## Response

`200 OK` – Confirmation message.

```json theme={null}
{
  "message": "Invite deleted successfully."
}
```

Possible errors:

* `Invite not found for this workspace.`
* `Invite already accepted.`

Both are returned with status **400**.

`403 Forbidden` – Token lacks `workspace-users-write` or insufficient privileges.


## OpenAPI

````yaml delete /open/workspaces/{workspaceId}/invites/{inviteId}/cancel
openapi: 3.0.1
info:
  title: OpnForm API
  description: API for interacting with OpnForm, primarily used for Zapier integration
  version: 1.0.0
servers:
  - url: https://api.opnform.com
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: Create and manage workspaces.
  - name: Workspace Users
    description: Manage users within a workspace.
  - name: Forms
    description: Manage and retrieve forms.
  - name: Submissions
    description: Access and manage form submissions.
  - name: Integrations
    description: Manage form integrations (webhooks) via API.
  - name: Zapier
    description: Legacy endpoints for the Zapier integration.
paths:
  /open/workspaces/{workspaceId}/invites/{inviteId}/cancel:
    delete:
      tags:
        - Workspace Users
      summary: Cancel Workspace Invite
      description: Requires `workspace-users-write`. Delete a pending invite.
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: string
        - name: inviteId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Invite canceled
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invite deleted successfully.
        '403':
          description: Forbidden
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Personal Access Token
      x-bearer-scopemap:
        workspaces-read: Read access to workspaces
        workspaces-write: Write access to workspaces
        workspace-users-read: Read access to workspace users
        workspace-users-write: Write access to workspace users
        forms-read: Read access to forms
        forms-write: Write access to forms
        manage-integrations: Manage form integrations (webhooks)

````