> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.finput.com.au/api/endpoints/users/patch-user/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.finput.com.au/_mcp/server. # Update user (partial) PATCH https://api.finput.com.au/api/v1/users/{id} Content-Type: application/json Reference: https://docs.finput.com.au/api/endpoints/users/patch-user ## Authentication - `Authorization` header (bearer token, required) — JWT access token obtained from `POST /api/v1/auth/login`, or a `finput_sk_...` API token ## Request ### Path parameters - `id` (integer, required) ### Body (application/json) This endpoint expects an UserUpdateRequest. - `first_name` (string, optional) - `last_name` (string, optional) - `organisation_id` (integer, optional, nullable) - `is_admin` (boolean, optional) - `is_active` (boolean, optional) — Setting `true` on a deactivated user gives them a seat back, and is refused with `409` when their organisation is at its user limit. ## Response ### 200 User updated - `id` (integer, optional) - `email` (string, optional) - `first_name` (string, optional) - `last_name` (string, optional) - `organisation_id` (integer, optional, nullable) - `is_admin` (boolean, optional) - `is_active` (boolean, optional) - `is_email_verified` (boolean, optional) - `created` (datetime, optional) - `groups` (list of UserGroup, optional) ## Errors ### 409 Conflict Error Reactivating this user would take a seat in an organisation already at its user limit. - `error` (string, required) — A sentence a broker can read, worded for the client named in `X-Finput-Client`. A store client's sentence never mentions a plan or a way to pay. - `reason` (enum, required) - Allowed values: `seat_limit_reached` - `seats` (Seats, required) — An organisation against its user limit. ## Types ### UserGroup - `name` (string, optional) - `permissions` (list of UserGroupPermissionsItems, optional) ### Seats An organisation against its user limit. - `used` (integer, required) — Active users plus invites not yet accepted. Deactivated users are not counted. - `limit` (integer, required, nullable) — `null` means unlimited. `used` may exceed it: the limit only refuses adding a user, so an organisation that went over it after a downgrade or trial end keeps everyone. ### UserGroupPermissionsItems - `id` (integer, optional) - `codename` (string, optional) ## Examples **Request** ```json {} ``` **Response** ```json { "id": 1, "email": "string", "first_name": "string", "last_name": "string", "organisation_id": 1, "is_admin": true, "is_active": true, "is_email_verified": true, "created": "2024-01-15T09:30:00Z", "groups": [ { "name": "string", "permissions": [ { "id": 1, "codename": "string" } ] } ] } ``` **SDK Code** ```python import requests url = "https://api.finput.com.au/api/v1/users/1" payload = {} headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.patch(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.finput.com.au/api/v1/users/1'; const options = { method: 'PATCH', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{}' }; 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://api.finput.com.au/api/v1/users/1" payload := strings.NewReader("{}") req, _ := http.NewRequest("PATCH", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") 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://api.finput.com.au/api/v1/users/1") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Patch.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.patch("https://api.finput.com.au/api/v1/users/1") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('PATCH', 'https://api.finput.com.au/api/v1/users/1', [ 'body' => '{}', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.finput.com.au/api/v1/users/1"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.finput.com.au/api/v1/users/1")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PATCH" 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() ```