# Delete a draft

`DELETE https://morzepay.com/v1/invoices/{invoice_id}`

DELETE`/v1/invoices/{invoice_id}`

Deletes a draft for good. Finalized invoices can’t be deleted: void them instead.

Permission`invoices:write`

### Path parameters

`invoice_id`stringrequired

The invoice, such as `inv_UfwyBh1W4Jfa6iG2u2AVT3`.

### Returns

Confirmation that it was deleted.

### Errors

| Status | Code | When |
| 409 | INVOICE_NOT_DRAFT | It has been finalized. Void it instead. |

The common codes, such as `UNAUTHENTICATED` and `RATE_LIMITED`, can come from any endpoint. See [Errors](https://morzepay.com/docs/api#errors).



## Example request

```bash
curl -X DELETE "https://morzepay.com/v1/invoices/inv_UfwyBh1W4Jfa6iG2u2AVT3" \
  -H "Authorization: Bearer $MORZEPAY_KEY"
```

## Example response (200)

```json
{
  "success": true,
  "data": {
    "id": "inv_UfwyBh1W4Jfa6iG2u2AVT3",
    "object": "invoice",
    "deleted": true
  }
}
```
