Add a group member

POST/v1/directory/groups/{group_id}/members

Puts someone in a group; they get the group's roles and apps.

Permission: identity:AddUserToGroup. Changes need a sign-in that used a second factor.

Path parameters

Parameter Type Description
group_id string The group's ID.

Body

Field Type Description
person_id string Required. The person's ID.

Returns

204 No Content, with no body.

Errors

Besides the errors every call can return:

Status When
404 No such resource in your organization.

Example

curl -X POST https://<company>.yotta.bot/v1/directory/groups/3c5e8a90-1d2b-4e6f-8a7c-9b0d1e2f3a4b/members \
  -H "Authorization: Bearer $YOTTABOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"person_id": "8f0c2c1e-6b1a-4f3e-9a51-0c3d2f7e9b10"}'

With yottactl

yottactl org groups add-member 3c5e8a90-1d2b-4e6f-8a7c-9b0d1e2f3a4b \
  --set person_id=8f0c2c1e-6b1a-4f3e-9a51-0c3d2f7e9b10