Add work package watcher
add_work_package_watcherSubscribe a user to a work package's notifications to keep them informed without assignment. Ensures watchers receive updates on comments and changes.
Instructions
Subscribe a user to a work package's notifications.
Use this when someone should be kept in the loop on a ticket without being assigned to it. Watchers receive OpenProject's notifications for comments and changes. Returns the watcher (user id and name), the watch state after the call, and whether this call actually changed anything.
Pitfalls. The user must already be able to see the work package;
OpenProject answers 422 with a violation on user otherwise, and
adding someone other than yourself needs the add-work-package-watchers
permission (adding yourself only needs view access). Calling twice is
harmless: the second call reports changed: false. Watching is not
assignment — use update_work_package(assignee=...) for that.
Cross-references: get_work_package(include=['watchers']) lists who
already watches; remove_work_package_watcher is the reverse;
list_work_package_comments shows what watchers are being notified
about.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes | Numeric id of the user to add. Get it from list_users, from get_instance_info for the current user, or from any Ref in a work-package result. The string 'me' is not accepted here — the API needs a real id. | |
| work_package_id | Yes | Work package to watch. Ids come from search_work_packages, list_work_packages or get_work_package. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | No | The watcher. 'id' is the user id; 'name' is filled in only when OpenProject returned the user resource (it does on add, not on remove). | |
| changed | No | True when this call actually changed the watcher list, false when the user was already watching. Null when OpenProject does not report it — removals answer 204 whether or not the user was watching. | |
| message | Yes | Human-readable confirmation. | |
| watching | Yes | Watch state after the call: true after adding, false after removing. | |
| work_package_id | Yes | Work package whose watcher list was changed. |