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

# Deletes a document from a contract

`DELETE /contracts/{contract_id}/documents/{document_id}`

## Request

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

Removes one attachment from a contract. The stored file is deleted unless another
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.

## Response `204`

Document removed

## Other responses

- `400`: Malformed contract or document id
- `404`: Contract not found or not accessible, or the document is not attached to this contract
- `409`: Other requests kept changing the contract's attachments; retry the deletion. Or a change to the contract is waiting for approval; delete once it is approved, rejected or cancelled.
- `default`: Error

## Changes

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

[Operation history](https://skmtc.dev/rillet/apis/rillet-accounting-api/changes/contracts/: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)
