It's easy to upload an API to an organisation via SwaggerHub CLI:
swaggerhub api:create OWNER/API_NAME/[VERSION]
But I need to upload an API under some project inside an organisation.
In all examples from https://github.com/SmartBear/swaggerhub-cli there is no "project" variable.
SwaggerHub CLI does not support projects yet. There's an existing feature request for that.
You can, however, use SwaggerHub Registry API to add your uploaded API to a specific project.
If you use self-hosted SwaggerHub On-Premise, the request would be as follows and requires v. 1.26 or later. Add the
-kflag if your instance uses a self-signed or privately signed certificate.