TofuPilotTofuPilot
v2 Reference (Preview)Units

Delete units

Permanently delete units by serial number. This action will remove all nested elements and relationships associated with the units.

API v2 Preview

The TofuPilot API v2.0 is currently in public preview and is subject to change as we stabilize until release (planned for Oct 2025).

Access

API KeyAccess LevelDescription
UserFullUsers have full access to units
StationUnauthorizedStations cannot delete units for data integrity purposes

Endpoint

DELETE/v2/units
AuthorizationBearer <token>

API key for authentication. Use format: Bearer YOUR_API_KEY

In: header

Query Parameters

serial_numbersarray<string>

Array of unit serial numbers to delete.

Response Body

from tofupilot.v2 import TofuPilot

# Initialize the TofuPilot client
client = TofuPilot()

# Execute the operation
result = client.units.delete(
    serial_numbers=["UNIT-001", "UNIT-002"]
)

# Handle response
print(result)
{
  "ids": [
    "550e8400-e29b-41d4-a716-446655440000",
    "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
  ]
}
{
  "message": "Not found",
  "code": "NOT_FOUND",
  "issues": []
}
{
  "message": "Internal server error",
  "code": "INTERNAL_SERVER_ERROR",
  "issues": []
}

How is this guide?