---
agentTools:
  projectIndex: https://developer-docs.gomotive.com/llms.txt
---

# Remove users from a group

**Purpose**: Use this API to remove an existing driver from the group. This usually happens when an existing driver is no longer with the organisation or has moved on to a different group.

You must specify the group from where the driver must be removed.

> 📘 NOTE
>
> You can remove one or more number of drivers from a single group. To remove multiple drivers, enter the Driver ID of all the drivers and pass them as Query Parameters. Refer to the Query Parameter section for more info.

## Response Parameters

### success

* **Type**: Boolean
* **Description**: Denotes if the user or users (drivers) were deleted successfully from the group. Mostly the value for this parameter will be "true". Otherwise, you will see the status 400 appearing.

***

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Motive",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.gomotive.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/groups/{id}/users": {
      "delete": {
        "summary": "Remove users from a group",
        "description": "",
        "operationId": "remove-users-from-a-group",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Specify the ID of the group, from which you want to remove users (drivers).",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          },
          {
            "name": "ids[]",
            "in": "query",
            "description": "Specify the IDs of the drivers who should be removed or deleted from their existing group.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "X-Time-Zone",
            "in": "header",
            "description": "Specify the timezone for formatting the timestamps.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Metric-Units",
            "in": "header",
            "description": "Specify if you want to use the Metric units or the Imperial units. TRUE: Metric units. FALSE: Imperial Units",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "X-User-Id",
            "in": "header",
            "description": "Specify the ID of the Fleet Admin or the Fleet Manager who is accessing this endpoint.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Delete a user from a group": {
                    "value": "  {\n  \"success\": true\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Cannot Delete": {
                    "value": "{\n  \"error_message\": \"user Alexandrea Koch 11 could not be removed from the group\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error_message": {
                      "type": "string",
                      "example": "user Alexandrea Koch 11 could not be removed from the group"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "examples": {
                  "Group Invalid": {
                    "value": "{\n  \"error_message\": \"group not found\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error_message": {
                      "type": "string",
                      "example": "group not found"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "66acf64a829e88001980fbf2:66d74d3005b2f600138b4dd6"
}
```