Add new modality via REST API ?

Is there any way to add/delete a new modality to the config file using Orthanc’s REST API ?

You can add modalities dynamically through the REST API but they won’t be stored in the config file. Orthanc will forget them as soon as it exits.

Check the orthanc-tests for sample usage of these routes:
https://bitbucket.org/sjodogne/orthanc-tests/src/1eea4d3a1ba9ee22a0d1a36773c605aa968f15dd/Tests/Tests.py?at=default&fileviewer=file-view-default#Tests.py-1247