Is there a way to update the forecast category independently from the deal's stage through an API?

Is there a way to update the forecast category independently from the deal's stage through an API?

Hello, 

We're experimenting with the Forecast module and we've created custom categories to signal the top 10/50/100 deals currently in the pipeline. We would like to assign these categories automatically using custom functions but I found that the only way to update the forecast category is by changing the deal's stage based on the stage-category mapping, which does not work in this instance.

Is there a way to update the forecast category independently from the deal's stage through an API? It would also be helpful if we were able to disable the category mapping for open stages.

Thanks in advance.