Vault Management API (REST from CLI) Create Collection endpoint broken

Im using the fairly new REST Api for the CLI by running
bw serve

I cannot create a collection with the POST /object/org-collection endpoint
I get

{ "success": false, "message": "organizationid option is required." }

Back every time even though organizationid is specified correctly. I have tried organizationId as well. Creating a folder and the other endpoints work (though some don’t match the documentation but I figured it out). I am stuck and hoping someone can help so I can continue

Here is my most recent request body:
{ "organizationid": "removedMyValidUUID", "name": "ACME", "externalId": null }
I have also tried with an empty array for groups, organizationId with a capital, and more

1 Like

I’m not sure this is related, but it sounds like it could be - sounds like Bitwarden is working on a fix:

The above issue, if it was related, was resolved some time ago. However, I ran into another issue with the documentation so I’m updating this thread as it shows up in Google search results. The correct syntax is:

curl --header "Content-Type: application/json" \
-X POST \
--data '{"organizationId":"3c89a31d-f1cc-4673-8d5a-ae2700f9860d","name":"New Collection","externalid":null,"groups":[]}' \
'http://localhost:8080/object/org-collection?organizationid=3c89a31d-f1cc-4673-8d5a-ae2700f9860d'

The issue in the original post was that the query parameter was not being set, which you’ll notice on the URL on the end in my example. The other issue is with the capitalization of Id in organizationId in the request body.