Skip to content

Create a workforce group member

Workforce module

POST/group-membersworkforceGroupMembers.create

A member of a group space. Deleting removes the member, who also leaves the group conversation. Creates a workforce group member. Requires `Idempotency-Key`; a replay returns the original response. The organization is derived from the credential or the parent row, never from the body.

  • Requires the capability org.communication.write.
  • OAuth scopes: org.
  • Send an Idempotency-Key header. A replay with the same key returns the original response.
  • Error statuses: 400, 401, 409, 422, 429. Errors are RFC 9457 problem details.

Request body: WorkforceGroupMemberCreate

workforceGroupMembers.create: WorkforceGroupMemberCreate
FieldTypeRequiredDescription
group_idstring (uuid)YesIdentifier of the group.
membership_idstring (uuid)YesIdentifier of the member of the org in the group.
group_role"Member" | "Owner"YesOwners add and remove members.
{
  "group_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "membership_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "group_role": "Member"
}

Response 201: WorkforceGroupMember

workforceGroupMembers.create: WorkforceGroupMember
FieldTypeRequiredDescription
idstring (uuid)YesIdentifier of the workforce group member.
org_idstring (uuid)YesIdentifier of the owning organization, derived from the parent row and never accepted from the caller.
created_atstring (date-time)YesWhen the row was created.
created_bystring (uuid) | nullYesPerson who created the row; null for seed, platform or system writes.
updated_atstring (date-time)YesWhen the row was last updated.
updated_bystring (uuid) | nullYesPerson who last updated the row; null for seed, platform or system writes.
group_idstring (uuid)YesIdentifier of the group.
membership_idstring (uuid)YesIdentifier of the member of the org in the group.
group_role"Member" | "Owner"YesOwners add and remove members.
{
  "id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "org_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "created_at": "2026-10-08T14:30:00Z",
  "created_by": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "updated_at": "2026-10-08T14:30:00Z",
  "updated_by": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "group_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "membership_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "group_role": "Member"
}

Code samples

curl -X POST "$XOS_BASE_URL/group-members" \
  -H "Authorization: Bearer $XOS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"group_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","membership_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","group_role":"Member"}'
const { data } = await xos.workforceGroupMembers.create({
    "group_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
    "membership_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
    "group_role": "Member"
  });
response = xos.workforce_group_members.create({"group_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", "membership_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", "group_role": "Member"})
xos workforce-group-members create --data '{"group_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","membership_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","group_role":"Member"}'