> For the complete documentation index, see [llms.txt](https://docs.samesystem.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.samesystem.dev/api-v1-reference/users/update-user-by-id.md).

# Update user by id

*We recommmend using our API v2 for all user related tasks. Please avoid using this endpoint for future integrations. It might be deprecated in the future.*

Update users' information in the system. Update only specified fields from the date of "change\_date". If another change on that date exists, it will patch with the information specified. Specify extra fields in the same way as SameSystem returns for information retrieval above.

Update of user with user\_custom\_id instead of user\_id, the URL will have to be: \[/{clientToken}/users/update/{user\_custom\_id}?use\_custom\_id=1]

```json
{"openapi":"3.0.0","info":{"title":"SameSystem API V1","version":"1.1.3"},"servers":[{"url":"https://api.samesystem.com/api/v1/","description":""}],"paths":{"/{clientToken}/users/update/{id}":{"post":{"tags":["Users"],"summary":"Update user by id","description":"*We recommmend using our API v2 for all user related tasks. Please avoid using this endpoint for future integrations. It might be deprecated in the future.*\n\nUpdate users' information in the system. Update only specified fields from the date of \"change_date\". If another change on that date exists, it will patch with the information specified. Specify extra fields in the same way as SameSystem returns for information retrieval above.\n\nUpdate of user with user_custom_id instead of user_id, the URL will have to be: [/{clientToken}/users/update/{user_custom_id}?use_custom_id=1]","operationId":"post-clientToken-users-update-id","parameters":[{"name":"clientToken","in":"path","description":"Token in a form of \"c\\<clientId\\>\".","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"id of the user. Can be an external id (custom id) if query parameter &use_custom_id=1","required":true,"schema":{"type":"string"}},{"name":"use_custom_id","in":"query","description":"Set to 1 if you need to update the user by an external id/custom id","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdateInput"}}}},"responses":{"200":{"description":"Successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","default":"ok"},"description":{"type":"string","default":"User #<id> has been successfully updated."}}}}}}}}}},"components":{"schemas":{"UserUpdateInput":{"required":["change_date"],"type":"object","properties":{"role":{"type":"string"},"civil_no":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_line1":{"type":"string"},"postal_code":{"type":"string"},"city":{"type":"string"},"mobile":{"type":"string"},"email":{"type":"string"},"kon_1":{"type":"string"},"start_date":{"type":"string","format":"date"},"shop_name":{"type":"string"},"hours_week":{"type":"number"},"wage_earner_no":{"type":"string"},"change_date":{"type":"string","format":"date"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.samesystem.dev/api-v1-reference/users/update-user-by-id.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
