# End transfer session
URL: https://musicapi.com/docs/reference/end-transfer-session.md

`DELETE https://api.musicapi.com/public/transfer-sessions/{sessionUuid}`

Section: Managed Transfers.
Product: MusicAPI Managed Transfers.
Auth: Basic, DevToken (any one of them). Use Basic with your Client ID and Client Secret from your server only.

Ends a session: the wizard stops working for it, a running transfer is cancelled, and the stored token and personal data of a pre-authorized destination account are erased unless another live session or running transfer uses the same account. Calling it again changes nothing.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `sessionUuid` | uuid | yes | The sessionUuid from Create transfer session |

## Response 200

The session is ended.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `sessionUuid` | uuid | no |  |
| `transferCancelled` | boolean | no |  |
| `credentialsErased` | boolean | no | False when another live session or running transfer still uses the destination account. |

```json
{
  "sessionUuid": "5b0c6f0e-2c8a-4d0e-9a51-7e3f1c2d9b44",
  "transferCancelled": true,
  "credentialsErased": true
}
```

## Errors

- 401: The request has no credentials.
- 403: The credential is not secret.
- 404: Your account has no session with this UUID.

## Example

```bash
curl -X DELETE "https://api.musicapi.com/public/transfer-sessions/{sessionUuid}" \
  -u "$MUSICAPI_CLIENT_ID:$MUSICAPI_CLIENT_SECRET"
```
