DocumentsDelete a draft

Documents

Delete a draft

DEL/v1/documents/{id}

Soft-deletes a draft. Documents that were sent cannot be deleted.

Only a draft can be deleted, because it has no number yet, so no number is lost. The draft is soft-deleted and an audit entry is written. The request must include confirm: true.

A document that has been sent keeps its number for ever and is never deleted: void it with Void a document, or correct it with Create a credit note. See Void and delete.

Needs confirmation

This action is destructive or moves money. Send "confirm": true in the body; without it you get 428 confirmation_required and a preview of what would happen. See Drafts and confirmations.

Permission
documents.edit
Type
Destructive or money-moving. Needs "confirm": true (or a confirmation in the app).
Auth
API key, MCP token or signed-in session
Capability
delete_draft
CLI
freeinvoiceautomation doc delete
Available
At launch, 1 January 2027
delete_draft
curl --request DELETE \
  --url https://api.freeinvoiceautomation.com/v1/documents/<id> \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Idempotency-Key: <unique-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "confirm": true
}'
No content

Authorizations

Authorizationstringrequired
Bearer <api-key>. An API key from Settings > API keys, or an MCP token. See Authentication.

Headers

Idempotency-Keystring
Any unique string up to 255 characters. A retry with the same key and body returns the first response. See Idempotency.

Path Parameters

idstring<uuid>required
Id of the document.

Body

application/json
confirmbooleanrequired
Must be true to delete the draft. Without it nothing changes: you get the preview and confirmation_required. See Drafts and confirmations.

Errors

Plus the common errors every call can return. See Errors.