TofuPilotTofuPilot
API Reference (v2)Stations

Update station

Update station name and/or image. The station ID is specified in the URL path. To remove an image, pass an empty string for image_id.

Access

API KeyAccess LevelDescription
UserFullUsers can update stations
StationUnauthorizedStations cannot update stations

Endpoint

PATCH/v2/stations/{id}
AuthorizationBearer <token>

API key for authentication. Use format: Bearer YOUR_API_KEY

In: header

Path Parameters

idstring

Unique identifier of the station to update

name?string

New name for the station

Length1 <= length <= 60
image_id?string

Upload ID for the station image, or empty string to remove image

team_id?string | null

Team ID to assign this station to, or null to unassign

Response Body

from tofupilot.v2 import TofuPilot

# Initialize the TofuPilot client
client = TofuPilot()

# Execute the operation
result = client.stations.update(
    id="string"
)

# Handle response
print(result)
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Assembly Station 2"
}
{
  "message": "Unauthorized",
  "code": "UNAUTHORIZED",
  "issues": []
}
{
  "message": "Not found",
  "code": "NOT_FOUND",
  "issues": []
}
{
  "message": "Conflict",
  "code": "CONFLICT",
  "issues": []
}
{
  "message": "Internal server error",
  "code": "INTERNAL_SERVER_ERROR",
  "issues": []
}

How is this guide?