# Update User PATCH https://api.getzep.com/api/v2/users/{userId} Content-Type: application/json Updates a user. Reference: https://help.getzep.com/sdk-reference/user/update ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Update User version: endpoint_user.update paths: /users/{userId}: patch: operationId: update summary: Update User description: Updates a user. tags: - - subpackage_user parameters: - name: userId in: path description: User ID required: true schema: type: string responses: '200': description: The user that was updated. content: application/json: schema: $ref: '#/components/schemas/apidata.User' '400': description: Bad Request content: {} '404': description: Not Found content: {} '500': description: Internal Server Error content: {} requestBody: description: Update User Request content: application/json: schema: $ref: '#/components/schemas/apidata.UpdateUserRequest' components: schemas: apidata.FactRatingExamples: type: object properties: high: type: string low: type: string medium: type: string apidata.FactRatingInstruction: type: object properties: examples: $ref: '#/components/schemas/apidata.FactRatingExamples' description: >- Examples is a list of examples that demonstrate how facts might be rated based on your instruction. You should provide an example of a highly rated example, a low rated example, and a medium (or in between example). For example, if you are rating based on relevance to a trip planning application, your examples might be: High: "Joe's dream vacation is Bali" Medium: "Joe has a fear of flying", Low: "Joe's favorite food is Japanese", instruction: type: string description: >- A string describing how to rate facts as they apply to your application. A trip planning application may use something like "relevancy to planning a trip, the user's preferences when traveling, or the user's travel history." apidata.UpdateUserRequest: type: object properties: disable_default_ontology: type: boolean description: >- When true, disables the use of default/fallback ontology for the user's graph. email: type: string description: The email address of the user. fact_rating_instruction: $ref: '#/components/schemas/apidata.FactRatingInstruction' description: >- Deprecated: this field will be removed in a future release. Optional instruction to use for fact rating. first_name: type: string description: The first name of the user. last_name: type: string description: The last name of the user. metadata: type: object additionalProperties: description: Any type description: The metadata to update models.FactRatingExamples: type: object properties: high: type: string low: type: string medium: type: string models.FactRatingInstruction: type: object properties: examples: $ref: '#/components/schemas/models.FactRatingExamples' description: >- Examples is a list of examples that demonstrate how facts might be rated based on your instruction. You should provide an example of a highly rated example, a low rated example, and a medium (or in between example). For example, if you are rating based on relevance to a trip planning application, your examples might be: High: "Joe's dream vacation is Bali" Medium: "Joe has a fear of flying", Low: "Joe's favorite food is Japanese", instruction: type: string description: >- A string describing how to rate facts as they apply to your application. A trip planning application may use something like "relevancy to planning a trip, the user's preferences when traveling, or the user's travel history." apidata.User: type: object properties: created_at: type: string deleted_at: type: string disable_default_ontology: type: boolean email: type: string fact_rating_instruction: $ref: '#/components/schemas/models.FactRatingInstruction' first_name: type: string id: type: integer last_name: type: string metadata: type: object additionalProperties: description: Any type description: Deprecated project_uuid: type: string session_count: type: integer description: Deprecated updated_at: type: string description: Deprecated user_id: type: string uuid: type: string ``` ## SDK Code Examples ```python from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.user.update( user_id="userId", ) ``` ```typescript import { ZepClient } from "zep-cloud"; const client = new ZepClient({ apiKey: "YOUR_API_KEY" }); await client.user.update("userId"); ``` ```go import ( context "context" option "github.com/getzep/zep-go/v3/option" v3 "github.com/getzep/zep-go/v3" v3client "github.com/getzep/zep-go/v3/client" ) client := v3client.NewClient( option.WithAPIKey( "", ), ) response, err := client.User.Update( context.TODO(), "userId", &v3.UpdateUserRequest{}, ) ```