Hi Sebastián,
what does your request look like? When looking at the cURL example in the docs (https://woocommerce.github.io/woocommerce-rest-api-docs/?shell#create-a-product) you need to pass the category IDs like this:
"categories": [
{
"id": 9
},
{
"id": 14
}
],
So it is an array of objects.
Best,
Florian