Delete User Group
This endpoint permanently deletes a user group by ID.
Endpoint
Section titled “Endpoint”DELETE /v1/user-groups/user-groups/:idAuthentication
Section titled “Authentication”Include your API key in the x-api-key header. See Authentication.
Required Scope
Section titled “Required Scope”user-groups:writePath Parameters
Section titled “Path Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | User group ID to delete. |
Request Body
Section titled “Request Body”This endpoint does not accept a request body.
Example Request
Section titled “Example Request”curl -X DELETE "https://api.crewsum.com/v1/user-groups/user-groups/36b735f8-4dd7-4c3c-836f-35d2fe84e872" \ -H "x-api-key: $CREWSUM_API_KEY"const response = await fetch( "https://api.crewsum.com/v1/user-groups/user-groups/36b735f8-4dd7-4c3c-836f-35d2fe84e872", { method: "DELETE", headers: { "x-api-key": process.env.CREWSUM_API_KEY, }, },);const result = await response.json();DELETE /v1/user-groups/user-groups/36b735f8-4dd7-4c3c-836f-35d2fe84e872 HTTP/1.1Host: api.crewsum.comx-api-key: <your-api-key>Response
Section titled “Response”On success, the API returns HTTP 200 OK.
Example Response
Section titled “Example Response”{ "message": "Successfully deleted user group"}Behavior
Section titled “Behavior”- This is a hard delete. The group, its memberships, and its project and task assignments are removed.
- Users in the group are not deleted. They lose the project and task assignments they received through the group. Their direct assignments are not changed.
Error Responses
Section titled “Error Responses”| Status | Meaning |
|---|---|
400 | "User group ID not found": the ID path segment was empty. |
500 | "Error deleting user group": returned for every other failure, including an unknown group ID. |
Authentication and scope failures are described in Errors.
Related Webhooks
Section titled “Related Webhooks”This endpoint does not trigger a webhook.