When to use this endpoint

Use VehicleTracking_disconnect only after an administrator confirms that the tenant should stop using the current Webfleet connection.

Authentication and permissions

The request must authenticate with signed API-key fields or a logged-in CRM session, and the tenant’s features2.vehicle_tracking entitlement must currently equal 1. The entitlement is read from the global account row on every call.

The user needs the explicit pageSettingsVehicleTracking_delete role permission for Vehicle Tracking settings. Client administrators satisfy the role check.

The handler also requires client-administrator status; the page permission alone is insufficient for a non-administrator.

Parameters

ParameterTypeRequiredDescription
sureStringYesMust equal the exact case-sensitive phrase I am sure after surrounding whitespace is removed.

Example request

$result = FM_api('VehicleTracking_disconnect', [
	'sure' => 'I am sure',
]);

Example response

{"ok":true}

Errors and unusual responses

ResponseCondition
{"error":"not logged in"}No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs.
{"error":"Type I am sure to disconnect"}The confirmation phrase is absent or not exact.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • If no active connection exists, the call is idempotent and returns {"ok":true} without writes.
  • The global connection row is soft-deleted and marked disconnected so a later connect can reuse it.

Side effects

  • Deletes matching tenant api_syncs and vehicle_tracking_positions, clears encrypted credentials, remote objects, route cache, and refresh lease, then soft-deletes the global connection row.
  • Records a vehicle_tracking/disconnect Core audit event. It does not contact Webfleet.

See it in Fieldmotion

CRM1

No CRM1 production caller was found. Vehicle Tracking navigation and screens are implemented in CRM2.

CRM2

Open Settings → Vehicle Tracking, choose Disconnect, and type the confirmation phrase in the browser prompt.

Related endpoints