# Withdraw dispute

Withdraw a dispute by setting its status to `CLOSED`.
You can only withdraw a dispute if `canWithdraw` is `true` on the dispute resource.

Endpoint: PUT /spend/profiles/{profileId}/disputes/{disputeId}/status
Security: UserToken

## Path parameters:

  - `profileId` (integer, required)
    Your profile ID.

  - `disputeId` (string, required)
    The dispute ID.

## Header parameters:

  - `X-External-Correlation-Id` (string)
    Optional UUID for correlating requests across systems. If provided, Wise echoes it back in the response. Maximum 36 characters. [Learn more](/guides/developer/headers/correlation-id).

## Request fields (application/json):

  - `status` (string, required)
    Must be set to `CLOSED`.
    Enum: "CLOSED"

## Response 200 fields (application/json):

  - `id` (string)
    Unique identifier of the dispute.
    Example: b4eae16c-b3a9-4327-b0bd-6a2ad430d803

  - `transactionId` (integer)
    Card transaction ID.
    Example: 476873

  - `profileId` (integer)
    Profile ID.
    Example: 14547572

  - `reason` (string)
    Dispute reason code.
    Example: WRONG_AMOUNT

  - `status` (string)
    Dispute overall status.
    Enum: "ACTIVE", "CLOSED"

  - `subStatus` (string)
    Dispute detailed status.
    Enum: "SUBMITTED", "IN_REVIEW", "REFUNDED", "REJECTED", "WITHDRAWN", "CONFIRMED", "REFUND_IN_PROGRESS", "ATTEMPTING_RECOVERY", "RECOVERY_UNSUCCESSFUL"

  - `statusMessage` (string)
    Explanation for `subStatus`.
    Example: Withdrawn

  - `createdAt` (string)
    Time when the dispute was created.
    Example: 2024-03-18T03:47:52.493Z

  - `createdBy` (string)
    Creator of the dispute. Currently set to the user ID.
    Example: 9867661

  - `lastUpdatedAt` (string)
    Time when the dispute was last updated.
    Example: 2024-03-27T02:30:27.374Z

  - `canWithdraw` (boolean)
    Whether the dispute can be withdrawn.
    Example: false

