Delete work package
delete_work_packagePermanently remove a work package and all its attachments, comments, and time entries after user confirmation. Use only when closing the status is not an option, as deletion cannot be undone.
Instructions
Permanently delete a work package and everything attached to it.
Use only on explicit user instruction. Deletion removes the work package with its comments, attachments, time entries and relations, and OpenProject offers no API-side undo.
Returns a small confirmation object once OpenProject accepts the deletion.
Pitfalls: children are not deleted with the parent, so check
get_work_package(id, include=['children']) first and decide what happens to them. If you
only want the work package out of the way, update_work_package(id, status=<a closed status>) is almost always the better answer — get_project_metadata lists which statuses
this instance treats as closed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Work package id to delete permanently. | |
| confirm | No | Must be true. Ask the user to confirm first — the API offers no undo. Calling with confirm=false returns a confirmation_required error rather than deleting anything. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Id of the work package that was deleted. | |
| deleted | Yes | True once OpenProject accepted the deletion. | |
| message | Yes | Human-readable confirmation. |