Bills API

Delete a bill draft

Delete an unsent draft at its current revision.

DELETEhttps://app.mindbill.org/partner/v2/bill-drafts/{draftId}

Discard a saved draft the biller no longer needs. Submitted drafts cannot be deleted; they remain as the record of their bill.

AuthenticationServer API key or browser session + Origin
Permissions by credentialServer: bills:write · Browser: bills:create
IdempotencyRequired for safe retries
Organization capabilitytreatmentBilling must be enabled

Use this URL with a server API key or a browser session and its exact allowed Origin. Both credentials use the same request and response contract. See the component API inventory for exact paths and SDK methods.

Path parameters

FieldTypeDescription
draftIdRequired
string

Bill draft identifier returned when the draft was saved.

1–255 characters

Query parameters

FieldTypeDescription
expectedRevisionRequired
integer

The draft's current revision.

≥ 1

Examples

Server API key
curl 'https://app.mindbill.org/partner/v2/bill-drafts/billdraft_example?expectedRevision=2' \
  --request DELETE \
  --header "Authorization: Bearer $MINDBILL_API_KEY" \
  --header 'Idempotency-Key: billdraft_example-delete'
Browser session
curl 'https://app.mindbill.org/partner/v2/bill-drafts/billdraft_example?expectedRevision=2' \
  --request DELETE \
  --header "Authorization: Bearer $MINDBILL_BROWSER_TOKEN" \
  --header 'Origin: https://your-app.example' \
  --header 'Idempotency-Key: billdraft_example-delete'

Response

200 OK

Response
{ "data": { "id": "billdraft_example", "deleted": true } }
FieldTypeDescription
data.idRequired
string

The deleted draft.

data.deletedRequired
true

Always true on success.