[API] Specify optional mail notification

Specifies:
* [#4128](https://community.openproject.org/work_packages/4128)
* [#17009](https://community.openproject.org/work_packages/17009) (dup)