Create Group from Mender API

Hello there,
I’m trying to develop an integration between our services and Mender.
I need to create and maintain groups of devices in mender.
In my service i have a list of customers that i want to use as Groups in mender.
So i started developing a little connector between my service and Mender.
Than i found out that mender has no CRUD for Groups!
Just a GET for the group list :

Someone knows how to manage groups from API?


you can add device to a group with PUT (, remove device from group with DELETE (, get the group the device belongs to (, get groups (, and list devices in given group (
once group has no devices it ceases to exist.

hope it help,


thanks I’m currently stuck with creating group. If I read API right I should use PATH method to create new group and add my device to it. I’m using:

curl -X PATCH -k -H "Authorization: Bearer $JWT" -H "Content-Type: application/json" -d "{"DeviceIDs": ["5f3ea06314e0ef000110776f"]}" $MENDER_SERVER_URI/api/management/v1/inventory/groups/releases/devices | jq '.'

but getting:

  "error": "Method not allowed"

I’m using mender server v2.1. Any ideas what is the flow to add device to new group? Thanks.

Hej Marek!

I think you should use PUT -d ‘{“group”:“releases”}’ /api/management/v1/inventory/devices/5f3ea06314e0ef000110776f/group
does that work?

thanks for using Mender!

@peter Yes that works! Thanks.