> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usenash.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Nash exposes two MCP servers. The docs MCP server at https://docs.usenash.com/mcp searches this documentation and needs no credentials. The Nash MCP server at https://mcp.usenash.com/mcp operates an organization's deliveries and needs a Nash API key. See https://docs.usenash.com/reference/build-with-ai.
> Use the Sandbox environment (https://api.sandbox.usenash.com/v1) for anything that creates or dispatches deliveries during development.

# Upsert Driver Group

> Create or update a driver group, keyed on your own identifier.

Your `externalIdentifier` is the upsert key. Send a new value to create a group, which needs a `displayName`; send the same value again to update that group. `created` in the response says which happened. Fields you leave out keep their current values.

`driverIds` is the group's full roster. Sending it replaces the list, `[]` removes everyone, and leaving it out changes nothing. To add or remove one driver without resending the roster, use `addFirstVersionContractIds` and `removeFirstVersionContractIds` on [Upsert Driver](/api-reference/fleet/upsert-driver).

There is no delete call. To disable a group, upsert it with `isActive: false`. A disabled group can lose members but can't gain new ones.


## OpenAPI

````yaml put /v1/fleet/driver-groups/upsert
openapi: 3.1.0
info:
  title: Nash API
  version: 1.0.0
servers:
  - url: https://api.sandbox.usenash.com
    description: Sandbox API
  - url: https://api.sandbox.ap-southeast-2.usenash.com
    description: Sandbox API (Australia)
  - url: https://api.usenash.com
    description: Production API
  - url: https://api.ap-southeast-2.usenash.com
    description: Production API (Australia)
security: []
tags:
  - name: Notifications
    description: Notifications
    x-nash-topic: config
  - name: Annotate
    description: Annotate
    x-nash-topic: wismo
  - name: Notifications — Send
    description: One-off notification send without a NotificationTrigger.
    x-nash-topic: notifications
  - name: Shipping
    description: Shipping operations
    x-nash-topic: shipping
  - name: Workflow
    description: Workflow automation management
    x-nash-topic: scheduling
  - name: Workflow Execution
    description: Workflow execution history and monitoring
    x-nash-topic: scheduling
  - name: Optimization Strategies
    description: Create, read, update, and delete route optimization strategies.
    x-nash-topic: scheduling
  - name: AI Agents
    description: AI agent management — create, read, update, and delete agents
    x-nash-topic: config
  - name: AI Functions
    description: LLM-backed domain tools
    x-nash-topic: ai
  - name: Webhooks
    description: Webhook delivery inspection
    x-nash-topic: webhooks
  - name: Miscellaneous
    description: Miscellaneous
  - name: Job
    description: Job
    x-nash-topic: wismo
  - name: Batch Job
    description: Batch Job
    x-nash-topic: wismo
  - name: Order
    description: Order
    x-nash-topic: wismo
  - name: Provider
    description: Provider
    x-nash-topic: provider
  - name: Dispatch Strategies
    description: Dispatch Strategies
    x-nash-topic: scheduling
  - name: Store Locations
    description: Store Locations
    x-nash-topic: config
  - name: Delivery Windows
    description: Delivery Windows
    x-nash-topic: config
  - name: Templates
    description: Templates
    x-nash-topic: config
  - name: Zones
    description: Zones
    x-nash-topic: config
  - name: Feedback
    description: Feedback
    x-nash-topic: reporting
  - name: Organizations
    description: Organizations
    x-nash-topic: config
  - name: Store Catalog
    description: Store Catalog
    x-nash-topic: config
  - name: Route
    description: Route
    x-nash-topic: scheduling
  - name: Messaging
    description: Messaging
    x-nash-topic: config
  - name: Billing
    description: Invoice-aligned customer billing usage
    x-nash-topic: config
  - name: Contracts
    description: Provider contract pricing and version listings
    x-nash-topic: provider
  - name: Couriers
    description: Couriers
    x-nash-topic: provider
  - name: Fleet
    description: >-
      Inbound endpoints fleets call to manage their drivers and update in-flight
      deliveries.
    x-nash-topic: driver
  - name: Embed Sessions
    description: >-
      Mint short-lived, browser-safe sessions for embedded Nash Widgets.
      Authenticated with an org embed credential, which must stay on your
      backend.
    x-nash-topic: config
  - name: Event Timeline
    description: Entity-scoped event timeline + outbound provider traffic for one entity.
    x-nash-topic: internal
  - name: Optimization Fleet Projection
    description: >-
      Optimizer-facing projection of the effective fleet for a single-store
      solve
    x-nash-topic: scheduling
  - name: Hub Scanning
    description: Scan physical packages onto their route rack at a hub.
    x-nash-topic: scheduling
  - name: Inventory
    description: Store inventory catalog sync to SFTP retail destinations (e.g. Uber).
    x-nash-topic: store_catalog
  - name: Optimization Activities
    description: Optimization runs launched from the portal or the API
    x-nash-topic: scheduling
  - name: Route Restrictions
    description: Org-scoped geographic areas the route optimizer must avoid traversing.
    x-nash-topic: config
  - name: Shifts
    description: Shifts
    x-nash-topic: provider
  - name: Users
    description: User, role, and organization-membership management.
    x-nash-topic: config
  - name: Vehicles
    description: Vehicles
    x-nash-topic: provider
  - name: Widgets
    description: >-
      Org configuration for embedded Nash Widgets: parent origins, enablement,
      and embed credentials.
    x-nash-topic: config
  - name: Provider Chat
    description: Carrier-chat context for a route, scoped to the caller's organization.
    x-nash-topic: internal
  - name: Order Ingestion
    description: >-
      Internal validate, commit, and reconciliation boundary for governed Order
      imports.
    x-nash-topic: internal
paths:
  /v1/fleet/driver-groups/upsert:
    put:
      tags:
        - Fleet
      summary: Upsert Driver Group
      description: >-
        Create or update a driver group in your internal fleet, keyed on your
        own `externalIdentifier`. Sending the same `externalIdentifier` again
        updates the existing group; the response's `created` field tells you
        which happened. Omitted fields are left unchanged. To disable a group,
        upsert with `isActive: false` — there is no delete call. `driverIds`
        replaces the full list of your drivers in the group. New members require
        an active group; existing members may be kept or removed while the group
        is inactive.
      operationId: driver_groups_v1_upsert_driver_group_route_upsert_put
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DriverGroupUpsert'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DriverGroupUpsertResponse'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NashValidationError'
components:
  schemas:
    DriverGroupUpsert:
      title: DriverGroupUpsert
      required:
        - externalIdentifier
      type: object
      properties:
        externalIdentifier:
          title: Externalidentifier
          minLength: 1
          type: string
          description: Your own id for this group; the upsert key.
        displayName:
          title: Displayname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: Required when the group is created.
          default: null
        isActive:
          title: Isactive
          anyOf:
            - type: boolean
            - type: 'null'
          description: Defaults to true for a new group. Set false to disable a group.
          default: null
        unassignedDriverTimeoutMinutes:
          title: Unassigneddrivertimeoutminutes
          anyOf:
            - type: integer
            - type: 'null'
          default: null
        driverIds:
          title: Driverids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Full list of your drivers in this group. Omit to leave membership
            unchanged; send [] to remove all.
          default: null
      additionalProperties: false
      description: >-
        ``PUT /v1/fleet/driver-groups/upsert`` request body.


        Keyed on ``external_identifier`` within the calling org's own internal
        fleet. Omitted fields

        are left unchanged; an explicit null
        ``unassigned_driver_timeout_minutes`` clears it.
    DriverGroupUpsertResponse:
      title: DriverGroupUpsertResponse
      required:
        - firstVersionContractId
        - displayName
        - isActive
        - providerId
        - drivers
        - created
      type: object
      properties:
        firstVersionContractId:
          title: Firstversioncontractid
          type: string
          description: Stable id of the driver group across versions.
        externalIdentifier:
          title: Externalidentifier
          anyOf:
            - type: string
            - type: 'null'
          default: null
        displayName:
          title: Displayname
          type: string
        isActive:
          title: Isactive
          type: boolean
        unassignedDriverTimeoutMinutes:
          title: Unassigneddrivertimeoutminutes
          anyOf:
            - type: integer
            - type: 'null'
          default: null
        providerId:
          title: Providerid
          type: string
        drivers:
          title: Drivers
          type: array
          items:
            $ref: '#/components/schemas/DriverGroupMember'
          description: Drivers of your organization in this group.
        created:
          title: Created
          type: boolean
    NashValidationError:
      title: NashValidationError
      required:
        - error
        - response_status
        - RequestID
      type: object
      properties:
        error:
          $ref: '#/components/schemas/NashErrorDetails'
        response_status:
          title: Response Status
          type: string
        RequestID:
          title: Requestid
          type: string
    DriverGroupMember:
      title: DriverGroupMember
      required:
        - id
        - enabled
        - isShiftActive
      type: object
      properties:
        id:
          title: Id
          type: string
        externalIdentifier:
          title: Externalidentifier
          anyOf:
            - type: string
            - type: 'null'
          default: null
        firstName:
          title: Firstname
          anyOf:
            - type: string
            - type: 'null'
          default: null
        lastName:
          title: Lastname
          anyOf:
            - type: string
            - type: 'null'
          default: null
        enabled:
          title: Enabled
          type: boolean
        isShiftActive:
          title: Isshiftactive
          type: boolean
    NashErrorDetails:
      title: NashErrorDetails
      required:
        - code
        - message
      type: object
      properties:
        code:
          title: Code
          type: string
        message:
          title: Message
          type: string
        details:
          title: Details
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Structured error context; shape depends on `code`. For
            `VALIDATION_ERRORS` (HTTP 422) it is `{"fields": [{"loc": [...],
            "msg": "...", "type": "..."}]}` — one entry per invalid field, where
            `loc` is the field path, `msg` the human-readable message, and
            `type` the machine-readable error type (e.g. `string_type`,
            `missing`).
          default: null

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.