The problem it that it was not what was happening there. When I create group with this params:
{
"name": "test23hlk0urasdlnalkj20m93",
"member_viewability_level": "admins_and_members"
}
Permission Setting in UI of the created group will still be “Admins Only”. Also at least in UI its gonna be same if we pass “admin_only” to “member_viewability_level”. So no matter what I pass to “member_viewability_level”, it never becomes “Group Members” in UI.
But I think I figured it out, “Permission Setting” of the created group only becomes “Group Members” when I set both “invitability_level” and “member_viewability_level” to “admins_and_members” with query like this:
{
"name": "test23hlk0urasdlnalkj20m93",
"invitability_level": "admins_and_members",
"member_viewability_level": "admins_and_members"
}
If one of “invitability_level” or “member_viewability_level” is missing in the query, group will be created with “Admins Only” permission setting.
I think I am fine with this as it solves the problem, but its quiet confusing as it never mentioned in docs (or I missed it somewhere) that Permission Setting depends both on “invitability_level” “member_viewability_level” in API.