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
| Field | Type | Required | Description |
|---|---|---|---|
| group_id | string (uuid) | Yes | Identifier of the group. |
| membership_id | string (uuid) | Yes | Identifier of the member of the org in the group. |
| group_role | "Member" | "Owner" | Yes | Owners add and remove members. |
{
"group_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"membership_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"group_role": "Member"
}Response 201: WorkforceGroupMember
| Field | Type | Required | Description |
|---|---|---|---|
| id | string (uuid) | Yes | Identifier of the workforce group member. |
| org_id | string (uuid) | Yes | Identifier of the owning organization, derived from the parent row and never accepted from the caller. |
| created_at | string (date-time) | Yes | When the row was created. |
| created_by | string (uuid) | null | Yes | Person who created the row; null for seed, platform or system writes. |
| updated_at | string (date-time) | Yes | When the row was last updated. |
| updated_by | string (uuid) | null | Yes | Person who last updated the row; null for seed, platform or system writes. |
| group_id | string (uuid) | Yes | Identifier of the group. |
| membership_id | string (uuid) | Yes | Identifier of the member of the org in the group. |
| group_role | "Member" | "Owner" | Yes | Owners 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"}'