How can I convert a sub task to task with REST API?

I would like to see if it is possible to convert a sub task to task using the REST API, like PUT edit issue. Right now I am able to convert a task to another task type of issue, but not from a sub task type to a task type. Each time I call the edit issue method, I get the the error code 400, with a message showing “The selected issue type is not valid”. Does anyone know if that conversion is possible? If so, how can I do it? Thanks.