magento2 – Magento 2 Async WebAPI: Data in topic must be of type mixed. array given


I’m using magento v2.3.4 and created a Magento 2 rest webapi function like this:

/**
 * POST for create brands api
 * @param mixed $data
 * @return array
 */
public function create($data);

I usually use the API using this URL:

http://m2.local/rest/V1/test/brands

with data like this:

{
    "data": (
        {
            "name": "Adidas",
            "type": "apparel"
        },
        { 
            "name": "Nike",
            "type": "apparel"
        }
    )
}

The problem arise when I tried to use the async function in the REST Webapi url:

http://m2.local/rest/async/V1/test/brands

Then I got the following error:

“error_message”: “Data in topic “async.vendor.module.api.brandsinterface.create.post” must be of type “mixed”. “array” given.”