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

# Attach a vehicle

Attaches a vehicle to a driver or fleet. Provide either `driver` or `fleet` in the request body.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.chargeapi.co/v1/vehicles/veh_H2yOAymUZ942l5BBEIshajSko6Lz5tEk/attach \
    -H "Authorization: Bearer ch_sk_test_..." \
    --json '{
    "driver": "drv_LlwjMroRKFuUlRfN3zilThU30sP7FA17"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "id": "veh_H2yOAymUZ942l5BBEIshajSko6Lz5tEk",
      "object": "vehicle",
      "battery_capacity": 82000,
      "charging_standard": "CCS",
      "created": "2026-04-01T00:25:09.740Z",
      "drivers": ["drv_LlwjMroRKFuUlRfN3zilThU30sP7FA17"],
      "fleet": "flt_PtbLeKsckDpZhf9EFTiOPX7LxSZIU6Qn",
      "information": {
          "make": "Volvo",
          "model": "EX30",
          "year": "2025"
      },
      "metadata": {},
      "policy_ids": ["pol_ghOvrOBgehp3NBPHebbcIE0it10MsROU"],
      "registration_plate": "AB-123-CD",
      "status": "active",
      "telemetry": "vtel_VIwJFdJzHbCcIAtjChVK9PWRL7ulL52R",
      "updated": "2026-04-01T01:10:25.566Z",
      "vin": "YV1XZK5V0S1234567"
  }
  ```
</ResponseExample>

## Parameters

<ParamField body="driver" type="string">
  Driver to use for this request.
</ParamField>

<ParamField body="fleet" type="string">
  Fleet to use for this request.
</ParamField>

## Returns

Returns the vehicle.
