> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.whizcozy.com/api-reference/whiz-board-api/account/update-account-api-v-1-firms-firm-slug-account-put/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.whizcozy.com/_mcp/server. # Update Account PUT https://prod-whizboard-be-680473615767.asia-southeast1.run.app/api/v1/firms/{firm_slug}/account Content-Type: multipart/form-data Update current user's account profile details for this workspace. Send as `multipart/form-data`. `email` and `role` are intentionally immutable through this endpoint. Reference: https://docs.whizcozy.com/api-reference/whiz-board-api/account/update-account-api-v-1-firms-firm-slug-account-put ## Authentication - `Authorization` header (required) — API Key authentication via header ## Request ### Path parameters - `firm_slug` (string, required) ### Body (multipart/form-data) This endpoint expects a multipart form containing an optional file. - `name` (string, optional) - `remove_photo` (boolean, optional) - `photo` (file, optional) ## Response ### 200 Successful Response - `data` (AccountResponse, required) - `status` (string, optional, default: success) ## Errors ### 422 Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ## Types ### AccountResponse - `id` (integer, required) - `name` (string, required, nullable) - `email` (string, required) - `role` (enum, required) — Role of a user within a Firm (tenant). - Allowed values: `owner`, `ca_staff`, `client` - `profile_photo_url` (string, optional, nullable) - `profile_photo_filename` (string, optional, nullable) - `profile_photo_mime_type` (string, optional, nullable) - `profile_photo_size` (integer, optional, nullable) ### ValidationError - `loc` (list of ValidationErrorLocItems, required) - `msg` (string, required) - `type` (string, required) - `input` (any, optional) - `ctx` (ValidationErrorCtx, optional) ### ValidationErrorLocItems ### ValidationErrorCtx ## Examples **Request** ```json { "name": { "type": "json" }, "photo": "", "remove_photo": { "type": "json" } } ``` **Response** ```json { "data": { "id": 1, "name": "string", "email": "string", "role": "owner", "profile_photo_url": "string", "profile_photo_filename": "string", "profile_photo_mime_type": "string", "profile_photo_size": 1 }, "status": "success" } ``` **SDK Code** ```python import requests url = "https://prod-whizboard-be-680473615767.asia-southeast1.run.app/api/v1/firms/firm_slug/account" files = { "photo": "open('[object Object]', 'rb')" } payload = { "name": "{ \"type\": \"json\" }", "remove_photo": "{ \"type\": \"json\" }" } headers = {"Authorization": ""} response = requests.put(url, data=payload, files=files, headers=headers) print(response.json()) ``` ```javascript const url = 'https://prod-whizboard-be-680473615767.asia-southeast1.run.app/api/v1/firms/firm_slug/account'; const form = new FormData(); form.append('name', '{ "type": "json" }'); form.append('photo', '[object Object]'); form.append('remove_photo', '{ "type": "json" }'); const options = {method: 'PUT', headers: {Authorization: ''}}; options.body = form; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://prod-whizboard-be-680473615767.asia-southeast1.run.app/api/v1/firms/firm_slug/account" payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n{\n \"type\": \"json\"\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photo\"; filename=\"[object Object]\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"remove_photo\"\r\n\r\n{\n \"type\": \"json\"\n}\r\n-----011000010111000001101001--\r\n") req, _ := http.NewRequest("PUT", url, payload) req.Header.Add("Authorization", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://prod-whizboard-be-680473615767.asia-southeast1.run.app/api/v1/firms/firm_slug/account") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Put.new(url) request["Authorization"] = '' request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n{\n \"type\": \"json\"\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photo\"; filename=\"[object Object]\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"remove_photo\"\r\n\r\n{\n \"type\": \"json\"\n}\r\n-----011000010111000001101001--\r\n" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.put("https://prod-whizboard-be-680473615767.asia-southeast1.run.app/api/v1/firms/firm_slug/account") .header("Authorization", "") .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n{\n \"type\": \"json\"\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photo\"; filename=\"[object Object]\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"remove_photo\"\r\n\r\n{\n \"type\": \"json\"\n}\r\n-----011000010111000001101001--\r\n") .asString(); ``` ```php request('PUT', 'https://prod-whizboard-be-680473615767.asia-southeast1.run.app/api/v1/firms/firm_slug/account', [ 'multipart' => [ [ 'name' => 'name', 'contents' => '{ "type": "json" }' ], [ 'name' => 'photo', 'filename' => '[object Object]', 'contents' => null ], [ 'name' => 'remove_photo', 'contents' => '{ "type": "json" }' ] ] 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://prod-whizboard-be-680473615767.asia-southeast1.run.app/api/v1/firms/firm_slug/account"); var request = new RestRequest(Method.PUT); request.AddHeader("Authorization", ""); request.AddParameter("undefined", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n{\n \"type\": \"json\"\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"photo\"; filename=\"[object Object]\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"remove_photo\"\r\n\r\n{\n \"type\": \"json\"\n}\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": ""] let parameters = [ [ "name": "name", "value": "{ \"type\": \"json\" }" ], [ "name": "photo", "fileName": "[object Object]" ], [ "name": "remove_photo", "value": "{ \"type\": \"json\" }" ] ] let boundary = "---011000010111000001101001" var body = "" var error: NSError? = nil for param in parameters { let paramName = param["name"]! body += "--\(boundary)\r\n" body += "Content-Disposition:form-data; name=\"\(paramName)\"" if let filename = param["fileName"] { let contentType = param["content-type"]! let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8) if (error != nil) { print(error as Any) } body += "; filename=\"\(filename)\"\r\n" body += "Content-Type: \(contentType)\r\n\r\n" body += fileContent } else if let paramValue = param["value"] { body += "\r\n\r\n\(paramValue)" } } let request = NSMutableURLRequest(url: NSURL(string: "https://prod-whizboard-be-680473615767.asia-southeast1.run.app/api/v1/firms/firm_slug/account")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PUT" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```