---
title: "Cancel Workspace"
url: "https://developer.pexa.co.uk/apis/workspace-v1-v1/versions/f42817f3-815f-4a74-8ba5-2f83efd8ab42/operations/cancelWorkspace"
---

> Full API specification: https://developer.pexa.co.uk/apis/workspace-v1-v1/versions/f42817f3-815f-4a74-8ba5-2f83efd8ab42.md

# Cancel Workspace

`DELETE` `/partner/api/platformconnect/v1/workspaces/{workspace_id}/cancel-workspace`

Operation ID: `cancelWorkspace`

This API is used to cancel the created workspaces which are no longer required by the integrators.

## Path parameters

- `workspace_id` (string, uuid, required) - Workspace id

## Header parameters

- `X-Request-Correlation-Id` (string, optional)

## Request body (required)

Content types: `application/json`

## Responses

- `204` - NO CONTENT
- `400` - BAD REQUEST
- `404` - NOT FOUND
- `500` - INTERNAL SERVER ERROR
- `503` - SERVICE UNAVAILABLE

## OpenAPI definition

```yaml
openapi: 3.0.1
info:
  title: Workspace
  version: v1
servers:
  - url: https://api.pexa.co.uk
    description: API Gateway URL
paths:
  /partner/api/platformconnect/v1/workspaces/{workspace_id}/cancel-workspace:
    delete:
      tags:
        - CancelWorkspace
      summary: Cancel Workspace
      description: This API is used to cancel the created workspaces which are no
        longer required by the integrators.
      security:
        - oauth2:
            - x-api:cancel:workspaces
            - edit:workspaces
      operationId: cancelWorkspace
      parameters:
        - in: header
          name: X-Request-Correlation-Id
          schema:
            type: string
            description: The unique identifier for the request
        - name: workspace_id
          in: path
          description: Workspace id
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - cancellationReason
              properties:
                cancellationReason:
                  type: string
                  pattern: ^(APPLICANT_DECIDED_NOT_TO_PROCEED|TITLE_COMPLICATIONS_OUTSIDE_PEXA_SCOPE|LAW_FIRM_NO_LONGER_ACTING|LENDER_DECIDED_NOT_TO_PROCEED|LOAN_INVOLVES_MULTIPLE_TITLES|OTHER)$
                  example: APPLICANT_DECIDED_NOT_TO_PROCEED
                  description: >
                    Reason to cancel the workspace.


                    Allowed values:
                      [`APPLICANT_DECIDED_NOT_TO_PROCEED`, `TITLE_COMPLICATIONS_OUTSIDE_PEXA_SCOPE`, `LAW_FIRM_NO_LONGER_ACTING`, `LENDER_DECIDED_NOT_TO_PROCEED`, `LOAN_INVOLVES_MULTIPLE_TITLES`, `OTHER`]
                cancellationNotesForOther:
                  maxLength: 100
                  minLength: 1
                  type: string
                  example: Title complications outside PEXA scope
                  description: Mandatory when cancellationReason "OTHER" is provided
        required: true
      responses:
        "204":
          description: NO CONTENT
          headers:
            X-API-Version:
              schema:
                type: string
                description: The API version that was used to process the request.
            X-Request-Correlation-Id:
              schema:
                type: string
                description: The unique identifier for the request
        "400":
          description: BAD REQUEST
          headers:
            X-API-Version:
              schema:
                type: string
                description: The API version that was used to process the request.
            X-Request-Correlation-Id:
              schema:
                type: string
                description: The unique identifier for the request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: Field
                        message:
                          type: string
                          description: Error message
              example:
                errors:
                  - field: cancellationNotesForOther
                    message: cancellation notes cannot be null for the cancellationReason OTHER
        "404":
          description: NOT FOUND
          headers:
            X-API-Version:
              schema:
                type: string
                description: The API version that was used to process the request.
            X-Request-Correlation-Id:
              schema:
                type: string
                description: The unique identifier for the request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: Field
                        message:
                          type: string
                          description: Error message
              example:
                errors:
                  - field: workspace_id
                    message: "Resource not found for: workspaceId"
        "500":
          description: INTERNAL SERVER ERROR
          headers:
            X-API-Version:
              schema:
                type: string
                description: The API version that was used to process the request.
            X-Request-Correlation-Id:
              schema:
                type: string
                description: The unique identifier for the request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: Field
                        message:
                          type: string
                          description: Error message
              example:
                errors:
                  - message: Internal Server Error
        "503":
          description: SERVICE UNAVAILABLE
          headers:
            X-API-Version:
              schema:
                type: string
                description: The API version that was used to process the request.
            X-Request-Correlation-Id:
              schema:
                type: string
                description: The unique identifier for the request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: Field
                        message:
                          type: string
                          description: Error message
              example:
                errors:
                  - message: Service under maintenance
security:
  - oauth2:
      - x-api:cancel:workspaces
      - edit:workspaces
components:
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://login.pexauk.co.uk/oauth/token
          scopes:
            x-api:create:purchase_workspaces: Permission to create purchase workspace
            x-api:create:remortgage_workspaces: Permission to create remortgage workspace
            x-api:cancel:workspaces: Permission to cancel the workspace
            add:law_firm_reference: add law firm reference
            add:legal_representation_details: add legal representation details
            view:workspaces: view workspace
            create:title_change_request: create title change request
            edit:workspace_parties: edit workspace parties
            x-api:add:legal_representation_details: Permission to add party representation
            x-api:edit:external_law_firm_details: Permission to update external law firm representation
            create:workspaces: Permission to create workspaces
            edit:workspaces: Permission to edit workspaces
            edit:lodgement_proprietors: Permission to edit proprietors linked to lodgement case
            view:lodgement_proprietors: Permission to view proprietors linked to lodgement case
            add:workspace_participants: Permission to add workspace participants
            edit:external_law_firm_details: Permission to edit external law firm details
            edit:law_firm_reference: Permission to edit law firm reference
```
