Hello,
Please post a complete minimal working example using the REST API so as we can understand what is your use case:
https://book.orthanc-server.com/users/support.html#discussing-a-minimal-working-example
Also, make sure to use the latest version of Orthanc (1.9.2 at the time of writing).
Regards,
Sébastien-