---
title: "Cancel doc group invite"
url: "https://docs.signnow.com/docs/doc-group-field-invite/operations/cancel-document-group-invite"
type: "endpoint"
section: "doc-group-field-invite"
slug: "doc-group-field-invite/operations/cancel-document-group-invite"
method: "POST"
path: "/documentgroup/{document_group_id}/groupinvite/{invite_id}/cancelinvite"
operation_id: "cancel-document-group-invite"
authorization: "bearer"
---

# Cancel doc group invite

`POST /documentgroup/{document_group_id}/groupinvite/{invite_id}/cancelinvite`

This endpoint allows API users to cancel a document group invite. All documents will be unshared with invitees. Any signatures that occurred before canceling will remain on the documents.

## Authorization

bearer

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `document_group_id` | string | Yes | ID of the document group. |
| `invite_id` | string | Yes | ID of the document group invite. |

## Request Body

**Schema**

```json
{
  "type": "object",
  "properties": {
    "reason": {
      "type": "string",
      "maxLength": 1000,
      "description": "Reason for canceling the invite. Included in the cancellation email to signers. Max: `1000` characters. Emoji and other 4-byte characters aren't supported."
    },
    "notify_users": {
      "type": "boolean",
      "default": true,
      "description": "If `true`, signers get a cancellation email and SMS. Set to `false` to cancel the invite without notifying them. Default: `true`."
    }
  }
}
```

**Example** (`Request`)

```json
{
  "reason": "Contract terms changed.",
  "notify_users": true
}
```

## Responses

### 200

The document group invite was cancelled.

**Example** (`Successful response`)

```json
{
  "status": "success"
}
```

### 400

* Wrong, expired, or missing token.
* The document group doesn't exist.
* The group invite doesn't exist.
* The group invite belongs to a different document group.
* The document group belongs to another user.
* The group invite was already canceled.
* `reason` isn't a string, is blank, is longer than `1000` characters, or contains 4-byte characters such as emoji.
* `notify_users` isn't a boolean.

**Example** (`Wrong token`)

```json
{
  "code": 1537,
  "error": "invalid_token"
}
```

**Example** (`Blank reason`)

```json
{
  "errors": [
    {
      "code": 65536,
      "message": "The reason value must not be empty string."
    }
  ]
}
```

**Example** (`Not the owner`)

```json
{
  "errors": [
    {
      "code": 65582,
      "message": "User is not document group owner"
    }
  ]
}
```

**Example** (`Reason too long`)

```json
{
  "errors": [
    {
      "code": 65536,
      "message": "The reason value is too long. It should have 1000 characters or less."
    }
  ]
}
```

**Example** (`reason not a string`)

```json
{
  "errors": [
    {
      "code": 65536,
      "message": "The reason value should be of type string."
    }
  ]
}
```

**Example** (`Group invite not found`)

```json
{
  "errors": [
    {
      "code": 65582,
      "message": "unable to find document group invite of 0d4ad4b1d6a64bf6a8e8b7f0e2f5b5ac0c1f9e3d"
    }
  ]
}
```

**Example** (`Invite already canceled`)

```json
{
  "errors": [
    {
      "code": 66302,
      "message": "The group invite was canceled."
    }
  ]
}
```

**Example** (`Document group not found`)

```json
{
  "errors": [
    {
      "code": 65582,
      "message": "unable to find document group"
    }
  ]
}
```

**Example** (`Invite from another group`)

```json
{
  "errors": [
    {
      "code": 65582,
      "message": "Document group invite id 0d4ad4b1d6a64bf6a8e8b7f0e2f5b5ac0c1f9e3d does not belong to document group 9b4e36781745eb345d3148f33e6ff021a1a0a81b"
    }
  ]
}
```

**Example** (`notify_users not a boolean`)

```json
{
  "errors": [
    {
      "code": 65536,
      "message": "The notify_users value should be of type boolean."
    }
  ]
}
```

**Example** (`Unsupported characters in reason`)

```json
{
  "errors": [
    {
      "code": 65536,
      "message": "4-byte characters in reason are not supported."
    }
  ]
}
```

## Code Examples

> Replace `$SIGNNOW_ACCESS_TOKEN` and any `{placeholder}` values before running.

### cURL

```bash
curl -X POST \
  "https://api.signnow.com/documentgroup/{document_group_id}/groupinvite/{invite_id}/cancelinvite" \
  -H "Authorization: Bearer $SIGNNOW_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"reason": "Contract terms changed.", "notify_users": true}'
```

---
*Full reference: https://docs.signnow.com/docs/doc-group-field-invite/operations/cancel-document-group-invite*
