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

# Engagement Cancel

> Cancels an engagement.

<RequestExample>
  ```graphql Request [expandable] theme={null}
  mutation EngagementCancel($id: EngagementGID!) {
    engagementCancel(id: $id) {
      engagement {
        cancellable
        createdAt
        id
        owner
        shortId
        type
        clients {
          email
          firstName
          lastName
          middleName
          phoneNumber
        }
        ... on PurchaseEngagement {
          closingDate
          property {
            address {
              city
              country
              latitude
              longitude
              postalCode
              province
              shortTitle
              street
              title
              unitNumber
            }
          }
          status {
            state
          }
        }
        ... on RefinanceEngagement {
          closingDate
          property {
            address {
              city
              country
              latitude
              longitude
              postalCode
              province
              shortTitle
              street
              title
              unitNumber
            }
          }
          status {
            state
          }
        }
      }
      userErrors {
        code
        field
        message
      }
    }
  }
  ```

  ```graphql Variables theme={null}
  {
    "id": "gid://ownright/Engagement/1"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "data": {
      "engagementCancel": {
        "engagement": {
          "cancellable": true,
          "createdAt": "2025-01-15T10:30:00Z",
          "id": "gid://ownright/Engagement/1",
          "owner": "Jane Doe",
          "shortId": "ABC-123",
          "type": "PURCHASE",
          "clients": [
            {
              "email": "jane@example.com",
              "firstName": "Jane",
              "lastName": "Doe",
              "middleName": "M",
              "phoneNumber": "+14165551234"
            }
          ],
          "closingDate": "2025-06-15",
          "property": {
            "address": {
              "city": "Toronto",
              "country": "CANADA",
              "latitude": 1,
              "longitude": 1,
              "postalCode": "M5V 1A1",
              "province": "ALBERTA",
              "shortTitle": "123 Main St, Toronto",
              "street": "123 Main St",
              "title": "123 Main St, Toronto",
              "unitNumber": "Suite 100"
            }
          },
          "status": {
            "state": "CANCELLED"
          }
        },
        "userErrors": []
      }
    }
  }
  ```
</ResponseExample>

## Mutation field

`engagementCancel`

### Arguments

<ParamField path="id" type="EngagementGID!" required>
  The GID of the engagement to cancel.
</ParamField>

### Return fields

<ResponseField name="engagement" type="Engagement">
  The cancelled engagement.

  <Expandable title="properties">
    <ResponseField name="cancellable" type="Boolean!" required>
      Whether the engagement can be cancelled.
    </ResponseField>

    <ResponseField name="clients" type="[EngagementClient!]!" required>
      The clients on this engagement.

      <Expandable title="properties">
        <ResponseField name="email" type="String">
          The email address of the client.
        </ResponseField>

        <ResponseField name="firstName" type="String">
          The first name of the client.
        </ResponseField>

        <ResponseField name="lastName" type="String">
          The last name of the client.
        </ResponseField>

        <ResponseField name="middleName" type="String">
          The middle name of the client.
        </ResponseField>

        <ResponseField name="phoneNumber" type="String">
          The phone number of the client.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="createdAt" type="ISO8601DateTime!" required>
      The time the engagement was created.
    </ResponseField>

    <ResponseField name="id" type="EngagementGID!" required>
      The unique identifier of the engagement.
    </ResponseField>

    <ResponseField name="owner" type="String">
      The name of the engagement owner.
    </ResponseField>

    <ResponseField name="shortId" type="String!" required>
      A short human-readable identifier for the engagement.
    </ResponseField>

    <ResponseField name="type" type="EngagementType!" required>
      The type of the engagement.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="userErrors" type="[EngagementCancelUserError!]!" required>
  List of errors that occurred while executing the mutation.

  <Expandable title="properties">
    <ResponseField name="code" type="EngagementCancelUserErrorCode">
      Error code associated with the error.
    </ResponseField>

    <ResponseField name="field" type="[String!]">
      The path to the input field that caused the error.
    </ResponseField>

    <ResponseField name="message" type="String!" required>
      A description of the error.
    </ResponseField>
  </Expandable>
</ResponseField>

### Types

* [`Engagement`](/lender-api/reference/members/interfaces/engagement) (interface) — Represents an engagement.
* [`EngagementCancelPayload`](/lender-api/reference/members/objects/engagement-cancel-payload) (object) — Return type for the `engagementCancel` mutation.
* [`EngagementCancelUserError`](/lender-api/reference/members/objects/engagement-cancel-user-error) (object) — An error that could occur during the execution of the `engagementCancel` mutation.
* [`EngagementCancelUserErrorCode`](/lender-api/reference/members/enums/engagement-cancel-user-error-code) (enum) — Possible error codes that can be returned by EngagementCancelUserError.
* [`EngagementClient`](/lender-api/reference/members/objects/engagement-client) (object) — A client contact on an engagement.
* [`EngagementGID`](/lender-api/reference/members/scalars/engagement-gid) (scalar) — A global identifier for a Engagement object in format of 'gid://ownright/Engagement/ID'.
* [`EngagementType`](/lender-api/reference/members/enums/engagement-type) (enum) — The type of engagement.
* [`ISO8601DateTime`](/lender-api/reference/members/scalars/iso8601-date-time) (scalar) — An ISO 8601-encoded datetime
