Can you add new product categories through the API

Hello - I am working on logic to add new Products through the API.
I have been able to set the category on a product if the category has already been created.
I will have the situation where the category choice does not yet exist.
Is there a way for me to add a category choice using an API?