Log In

Delete a Document

delete/public/v1/documents/{document}

Deleting a Document is permanent: the Document and the file behind it are both removed, so there is nothing left to restore. Archive it instead when it needs to stay on the record.

It removes the Document from every record it is attached to, not only the one you found it on. A Document attached to two participants is one Document held in two places, so deleting it from a list of one participant's Documents takes it off the other's as well.

Refuses with a 409 when the Document is attached to a participant record, whose Documents are deleted with the record, or when another record such as a service agreement or a generated document still points at it. A Document placed as compliance evidence is not refused: the placement is removed with it and the framework requirement reverts to unevidenced.

Refuses with a 403 when any record the Document is attached to is one these endpoints do not manage. Every attachment has to be a participant, a participant record, a contact, an organisation, a plan manager, a task or a site, or a note about a participant or a task, so a staff member's HR file, a staff note's attachment, a leave certificate, a candidate's resume, a payment record, a signature request's document, a form submission's upload, a participant information item's attachment, a Document frozen to a published policy version and a file that came from an SMS conversation are all refused rather than deleted.

  • Authorizationstringrequired

    Bearer authentication header of the form Bearer <token>, where <token> is your API key. See How to set up an API key.

  • documentstringrequired

    The document UUID

No content

  • 401Unauthenticated
  • 403The Document is attached to a record these endpoints do not support, or it is no longer attached to any record at all.
  • 404Not found
  • 409Another record still needs this Document.