---
title: "Deletes a document from a draft contract"
method: DELETE
path: "/draft-contracts/{draft_contract_id}/documents/{document_id}"
tags: ["Draft Contract Documents"]
---

# Deletes a document from a draft contract

`DELETE /draft-contracts/{draft_contract_id}/documents/{document_id}`

## Request

- Base URL: `https://api.rillet.com`
- URL: `https://api.rillet.com/draft-contracts/{draft_contract_id}/documents/{document_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/rillet/apis/rillet-accounting-api/docs/draft-contracts/:draft_contract_id/documents/:document_id/delete.ts> (a function with typed inputs; its response is checked against the schema)

Removes one attachment from a draft contract. The stored file is deleted unless a contract,
another draft contract or a milestone still uses it, or the file belongs to another part of Rillet.
Works for files uploaded through the API or the Rillet application, or imported from Salesforce.
A file imported from Salesforce stays removed when the draft contract is imported again, unless
a newer version of it is uploaded in Salesforce.

## Response `204`

Document removed

## Other responses

- `400`: Malformed draft contract or document id
- `404`: Draft contract not found or not accessible, or the document is not attached to this draft contract
- `409`: The draft contract changed while the document was being removed; retry the request.
- `default`: Error

## Changes

- **2026-11-03** `c393d0102005`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/rillet/apis/rillet-accounting-api/changes/draft-contracts/:draft_contract_id/documents/:document_id/delete.md)

---

[API](https://skmtc.dev/rillet/apis/rillet-accounting-api.md) - [All operations](https://skmtc.dev/rillet/apis/rillet-accounting-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rillet/apis/rillet-accounting-api/revisions/c393d0102005?raw)
