Delete groups

Delete groups along with their meeting events, positions, attendance and pending requests. Provide ids, or explicitly set include to false to delete every group matching the filters (and every group outright when no filters are given); an empty body is rejected. The response reports how many were deleted and how many were skipped because the caller may not delete them (outside the campuses where they hold the permission, or outside their group type or category limit). While multi-campus is on, a group that also belongs to campuses outside the caller's access needs the permission at every campus of its set, and a group's type and category must be admitted by the caller's group type and category limits at every campus of its set, not only at one: explicit ids that include such a group answer 403 with shared_record_delete_desc and nothing is deleted; a select-all skips it and counts it in skipped. A group available to every campus needs a caller with no campus limit and no restriction on that permission: explicit ids that include one answer 403 with every_campus_record_delete_desc (every_campus_organization_record_delete_desc while multi-org is on), and a select-all skips it. With action 3, detached counts the subgroups you can see that you could not delete and that now stand as top-level groups because their parent was deleted; it is omitted when there are none. Ids the caller cannot see are dropped before counting and are neither deleted nor skipped.

Required permission: Full Write Groups

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string

Return groups whose name contains the given text.

string

Comma-delimited list of group type ids. Values come from /api/property_values/group_types/values.

boolean

Whether to return listed or unlisted groups.

boolean

Whether the group is connected to a Mailchimp list.

int32
≥ 1

The id of a person. Returns groups the person leads.

string

Return groups led by someone whose name contains the given text.

string

Comma-delimited list of campus ids. Use -1 to include groups without a campus. Values come from /api/locations. Ignored while multi-campus is off.

string

Organization ids, comma-separated; honoured only while multi-org is on. A record matches when it is scoped to one of them or has a campus in one of them.

boolean

Whether to return active or inactive groups.

string

Comma-delimited list of language ids. Use -1 to include groups without a language. Values come from /api/property_values/languages/values.

string

Comma-delimited list of category ids. Use -1 to include groups without a category. Values come from the group type's category list: append _categories to the group type code (e.g. /api/property_values/group_type_class_categories/values).

string

Comma-delimited list of weekday names. Returns groups that meet on any of the given weekdays.

string

Return groups that meet at a street address containing the given text.

string

Return groups that meet at an address whose city contains the given text.

string

Return groups that meet in the given state. Use the full state name, not an abbreviation.

string

Return groups that meet at an address with the given postal code.

string

Return groups that meet in the given country. Use the full country name, not an abbreviation.

boolean

Whether this address has to carry a postal code. Only US and Canadian addresses do; a blank country counts as the US.

boolean

Whether childcare is provided in the group.

int32

The id of a parent group. Returns its sub-groups. Use -1 to return only groups without a parent.

string

Return groups whose parent group's name contains the given text.

string

Comma-delimited list of membership type ids: 1 = auto enroll, 2 = approval required.

boolean

Whether the group is published to the public group finder.

boolean

Whether registration is required to join the group.

int32

The id of a sign-up form. Returns groups using that form; use -1 for groups with no sign-up form. Values come from /api/forms.

double

Return groups with at least this many members.

double

Return groups with at most this many members.

string

Return groups created by a user whose name contains the given text.

string

Full-text search text. Matching groups are returned ranked by relevance.

Body Params

The selection criteria

ids
array of doubles | null

The ids the operation applies to: an include list by default, or an exclude list when include is false. For deletes, required unless include is false.

ids
boolean | null

Whether ids is an include list (true, default) or an exclude list (false). Setting include to false with no ids applies the operation to every record matching the query filters.

action
object | null

What happens to sub-groups of the deleted groups, by id: 1 = sub-groups become top-level groups, 2 = sub-groups are reassigned to the deleted group's parent, 3 = sub-groups are deleted too, except a sub-group the caller may not delete, which is left in place and becomes top-level when its parent is deleted; only a selected one is counted in skipped. When omitted, a group that has sub-groups cannot be deleted. While multi-campus is on, a sub-group that also belongs to campuses outside the caller's access is one the caller may not delete.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

401

Authentication is required, or the Ocs-Api-Key header is missing or invalid.

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json