# Delete an order

> Permanently remove a completed or refunded order

`DELETE /v2/orders/{id}`

Permanently remove a completed or refunded order.

**Authentication:** Required: the order’s owner session in `X-Session-ID`.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (pattern `^[A-Za-z0-9:_-]{1,128}$`) | Yes | Public order identifier. Not a credential: every read still requires the owner session or the destination proof. |

## Response

`200` returns an object with:

- `ok` · `true` · **required**

Errors use the [standard error envelope](https://docs.wagyu.xyz/actions-and-retries.md#the-error-envelope): branch on `code`, never on the message.

## Example

<!-- curl -->
```bash
curl -X DELETE 'https://api-beta.wagyu.xyz/v2/orders/<orderId>' \
  -H 'x-session-id: <sessionId>' \
  -H 'content-type: application/json' \
  -d '{}'
```

<!-- JavaScript -->
```javascript
const res = await fetch('https://api-beta.wagyu.xyz/v2/orders/<orderId>', {
  method: 'DELETE',
  headers: {"content-type":"application/json","x-session-id":"<sessionId>"},
  body: JSON.stringify({}),
});
const data = await res.json();
```

<!-- Python -->
```python
import requests

res = requests.delete('https://api-beta.wagyu.xyz/v2/orders/<orderId>', headers={"x-session-id":"<sessionId>"}, json={}, timeout=30)
data = res.json()
```

_No response is captured for this route: calling it creates or changes a real order. The response fields above come from the live contract._

---
Source: https://docs.wagyu.xyz/api-reference/delete-order · Built from the live Wagyu API on 2026-11-04.
