# Delete a transaction

`DELETE /api/v1/vaults/{vault}/possessions/{possession}/transactions/{transaction}`

Delete a transaction of a possession, with the documents attached to it.

The deletion is final. When it was the acquisition, the next earliest purchase, exchange, gift received or inheritance becomes the acquisition. The account log keeps the name of the possession.

## Path parameters

- `vault` (string, required): The vault the possession is kept in, named either by the readable name it reports as slug or by its id. A vault of another account answers 404.
- `possession` (uuid, required): The id of the possession. A possession of another vault or of another account answers 404.
- `transaction` (uuid, required): The id of the transaction. A transaction of another possession answers 404.

## Returns

Nothing. A transaction of another possession or of another account answers 404.

## Rate limit

Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in `X-RateLimit-Remaining`.

## Request

```sh
curl https://my.monicahq.com/api/v1/vaults/dunder-mifflin/possessions/9c4e2a71-5b38-4f06-8d1e-2a7f3c6b9e15/transactions/b71d5e09-2c46-4a8f-9e3b-0f5c7a2d6e14 \
  -X DELETE \
  -H "Authorization: Bearer $MONICA_TOKEN"
```

```javascript
const response = await fetch('https://my.monicahq.com/api/v1/vaults/dunder-mifflin/possessions/9c4e2a71-5b38-4f06-8d1e-2a7f3c6b9e15/transactions/b71d5e09-2c46-4a8f-9e3b-0f5c7a2d6e14', {
  method: 'DELETE',
  headers: { Authorization: `Bearer ${token}` },
})
```

```php
$response = Http::withToken($token)->delete('https://my.monicahq.com/api/v1/vaults/dunder-mifflin/possessions/9c4e2a71-5b38-4f06-8d1e-2a7f3c6b9e15/transactions/b71d5e09-2c46-4a8f-9e3b-0f5c7a2d6e14');
```

## Response

`204`

```json
[]
```
