---
title: "Assign a driver to a group"
url: "https://developers.vzconnect.com/apis/group-api-1/versions/1abd2768-7ba0-4b09-8b60-156957ef21ce/operations/POST__groups__groupid__drivers"
---

> Full API specification: https://developers.vzconnect.com/apis/group-api-1/versions/1abd2768-7ba0-4b09-8b60-156957ef21ce.md

# Assign a driver to a group

`POST` `/cmd/v1/groups/{groupid}/drivers`

Operation ID: `POST__groups__groupid__drivers`

Add a driver to a specific Group ID. The Driver Number is supplied in the body and the Group ID in the path. Assigning a driver to a group does not remove the driver from previously assigned groups; drivers can belong to multiple groups. If the driver is assigned to a parent group, the driver is also associated with any subgroups. POST methods do not return an object review, only a standard HTTP code.

## Path parameters

- `groupid` (string, required) - The Group ID, the unique alphanumeric identifier associated with the group created within the REVEAL account. Must be unique within the account.

## Request body (required)

Content types: `application/json`

## Responses

- `204` - Successfully assigned the driver to the group.
- `400` - Bad request. The request body is missing or invalid, or no group was found for the given Group ID. Validation errors are returned as an array of objects with Name and Message.
- `401` - Unauthorized. The request lacks valid authentication credentials.
- `404` - The specified driver was not found.
- `500` - Internal server error. An unexpected error occurred on the server.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Group API
  version: "1.0"
servers:
  - url: https://api.us.vzconnect.com
paths:
  /cmd/v1/groups/{groupid}/drivers:
    post:
      tags:
        - Group API
      summary: Assign a driver to a group
      description: Add a driver to a specific Group ID. The Driver Number is supplied
        in the body and the Group ID in the path. Assigning a driver to a group
        does not remove the driver from previously assigned groups; drivers can
        belong to multiple groups. If the driver is assigned to a parent group,
        the driver is also associated with any subgroups. POST methods do not
        return an object review, only a standard HTTP code.
      parameters:
        - schema:
            type: string
            example: CPTG1
          name: groupid
          in: path
          required: true
          description: The Group ID, the unique alphanumeric identifier associated with
            the group created within the REVEAL account. Must be unique within
            the account.
      requestBody:
        description: The driver number to assign to the group.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DriverNumberBody"
            example:
              DriverNumber: 6543-10
        required: true
      operationId: POST__groups__groupid__drivers
      responses:
        "204":
          description: Successfully assigned the driver to the group.
          content:
            application/json: {}
        "400":
          description: Bad request. The request body is missing or invalid, or no group
            was found for the given Group ID. Validation errors are returned as
            an array of objects with Name and Message.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Unauthorized. The request lacks valid authentication credentials.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: The specified driver was not found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Internal server error. An unexpected error occurred on the server.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      deprecated: false
      x-kong-route-defaults:
        strip_path: false
        paths:
          - ~/cmd/v1/groups/[^/]+/drivers/?$
components:
  schemas:
    DriverNumberBody:
      type: object
      description: Request body to add a driver to a Group ID.
      required:
        - DriverNumber
      properties:
        DriverNumber:
          type: string
          description: Driver Number is the unique identifier that will be used to
            reference the driver within the API. The Driver Number is not a
            mandatory field within the REVEAL account, but is required for the
            API.
          example: 6543-10
    Error:
      type: object
      description: Generic error response. The documentation does not define an
        explicit error body schema.
      properties:
        Message:
          type: string
          description: A human-readable description of the error.
```
