Skip to main content
curl -X POST https://api.chargeapi.co/v1/drivers/drv_pG7WUA9VqdyE5aecCMG52LHfe9GriKAS/attach \
  -H "Authorization: Bearer ch_sk_test_..." \
  --json '{
  "fleet": "flt_AIquEM0HEys6hfT24YqvYcfoAGnj3ZAI"
}'
{
    "id": "drv_pG7WUA9VqdyE5aecCMG52LHfe9GriKAS",
    "object": "driver",
    "created": "2026-04-01T00:13:30.836Z",
    "email": "example@example.com",
    "fleets": ["flt_AIquEM0HEys6hfT24YqvYcfoAGnj3ZAI"],
    "license_number": null,
    "metadata": {},
    "name": "Example Driver",
    "phone": null,
    "policy_ids": ["pol_xfyXXHSkulv2zRfNglV1hBe9wl4bY1Xy"],
    "preferences": {
        "charging_speed": "fast",
        "currency": "eur",
        "default_payment_method": null,
        "max_price_per_kwh": null,
        "notifications": true,
        "preferred_charging_stations": ["chst_OO72mx3zdAd5mswmTda2fpXHvLFYzAbm"],
        "preferred_cpos": ["example_operator"]
    },
    "status": "active",
    "updated": "2026-04-01T01:13:23.895Z",
    "vehicles": ["veh_GSNdIjaKyEAjtJRJOxTSecFn2eRshZwT"],
    "wallet_balance": 1875
}
Attaches a driver to a fleet. After the attach succeeds, the driver appears in fleet-scoped charging sessions and transactions.
curl -X POST https://api.chargeapi.co/v1/drivers/drv_pG7WUA9VqdyE5aecCMG52LHfe9GriKAS/attach \
  -H "Authorization: Bearer ch_sk_test_..." \
  --json '{
  "fleet": "flt_AIquEM0HEys6hfT24YqvYcfoAGnj3ZAI"
}'
{
    "id": "drv_pG7WUA9VqdyE5aecCMG52LHfe9GriKAS",
    "object": "driver",
    "created": "2026-04-01T00:13:30.836Z",
    "email": "example@example.com",
    "fleets": ["flt_AIquEM0HEys6hfT24YqvYcfoAGnj3ZAI"],
    "license_number": null,
    "metadata": {},
    "name": "Example Driver",
    "phone": null,
    "policy_ids": ["pol_xfyXXHSkulv2zRfNglV1hBe9wl4bY1Xy"],
    "preferences": {
        "charging_speed": "fast",
        "currency": "eur",
        "default_payment_method": null,
        "max_price_per_kwh": null,
        "notifications": true,
        "preferred_charging_stations": ["chst_OO72mx3zdAd5mswmTda2fpXHvLFYzAbm"],
        "preferred_cpos": ["example_operator"]
    },
    "status": "active",
    "updated": "2026-04-01T01:13:23.895Z",
    "vehicles": ["veh_GSNdIjaKyEAjtJRJOxTSecFn2eRshZwT"],
    "wallet_balance": 1875
}

Parameters

fleet
string
required
ID of the fleet to attach or detach.

Returns

Returns the driver.