POST/api/groups

Create a group

Creates a group for organizing peers and resources. Supply name and optionally include peer IDs in peers or resource entries in resources.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

3 body fields

Group details, including its name and optional peer and resource assignments.

namestringrequired
Group name identifier
peersarray<string>optional
List of peers ids
resourcesarray<object>optional
List of resources to associate with the group. Each entry includes a resource `id` and `type`.

5 status codes
200Returns the created group object, including its ID, name, peer and resource counts, peers, and resources.
idstringrequired
Group ID
issuedstringoptional
How the group was issued (api, integration, jwt)
Allowed:apiintegrationjwt
namestringrequired
Group Name identifier
peers_countintegerrequired
Count of peers associated to the group
resources_countintegerrequired
Count of resources associated to the group
peersarray<object>required
List of peers object
resourcesarray<object>required
400Returned when the request is invalid, such as when the required group name is missing.
401Returned when authentication is missing or invalid.
403Returned when the authenticated user is not permitted to create a group.
500Returned when an internal server error occurs.

Error handling

A 400 is returned when the request is invalid, including when name is missing; a 401 is returned when authentication is missing or invalid; a 403 is returned when the authenticated user is not permitted to create a group; and a 500 is returned when an internal server error occurs. Each entry in resources must include id and type.