Projekty
APICars

Update my car

Updates an owned car. Missing fields stay untouched; empty strings clear nullable fields.

PUT
/api/cars/{id}

Updates an owned car. Missing fields stay untouched; empty strings clear nullable fields.

Authorization

sessionAuth
cookiebetter-auth.session_token<token>

Better Auth session cookie (on HTTPS: __Secure-better-auth.session_token), forwarded to the login server's /api/auth/get-session

Path Parameters

id*string

Request Body

application/json
  1. body
brand?string
Length1 <= length
model?string
Length1 <= length
year?integer
Range1950 <= value <= 9007199254740991
color?string|null
photoUrl?|unknown|null
doors?|null
seats?|null
bodyType?string|null
trunkCapacityLiters?|null

Response Body

OK

application/json
  1. response
success*boolean
Example Request
curl -X PUT 'https://example.com/api/cars/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "success": true}