Update a user
PATCH/users/:user_id
Update a Nabla Core API user. Please be aware that this operation supports partial updates of the user's fields. However partial updates are not supported within the metadata dictionary. Therefore, to update a field within metadata, you must resend the entire dictionary each time.
Request
Responses
- 200
User.
Operation spec
{
"method": "patch",
"path": "/users/{user_id}",
"operationId": "update-user",
"parameters": [
{
"name": "user_id",
"description": "The unique identifier of the user.",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"description": "A unique identifier.",
"example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
"title": "uuid"
},
"example": "23A9981B-9E46-4ADB-BB0B-8E406C624540"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"external_id": {
"type": "string",
"description": "A unique identifier for the user from another system which is given to Nabla.",
"nullable": true,
"maxLength": 256
},
"metadata": {
"type": "object",
"description": "You can use this parameter to attach key-value data to the object. You can specify up to 50 keys, with key names up to 40 characters long, all values must be of type string and up to 500 characters long.\n\nYou should **not** use this to store Protected Health Information (PHI) or any patient-related data.",
"nullable": true,
"additionalProperties": {
"type": "string",
"maxLength": 500
},
"maxProperties": 50,
"title": "metadata"
}
},
"x-patch-properties": [
"external_id",
"metadata"
]
}
}
}
},
"responses": {
"200": {
"description": "User.",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "The user object.",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "A unique identifier.",
"example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
"title": "uuid"
},
"activated": {
"type": "boolean",
"description": "Always true unless you explicitly [deactivate](/2025-01-07/server/deactivate-copilot-user) the user."
},
"external_id": {
"type": "string",
"description": "A unique identifier for the user from another system which is given to Nabla.",
"nullable": true,
"maxLength": 256
},
"metadata": {
"type": "object",
"description": "You can use this parameter to attach key-value data to the object. You can specify up to 50 keys, with key names up to 40 characters long, all values must be of type string and up to 500 characters long.\n\nYou should **not** use this to store Protected Health Information (PHI) or any patient-related data.",
"nullable": true,
"additionalProperties": {
"type": "string",
"maxLength": 500
},
"maxProperties": 50,
"title": "metadata"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "The creation date of this object, in ISO 8601 format.",
"example": "2022-03-10T19:16:23.456Z",
"title": "created_at"
}
},
"required": [
"id",
"activated",
"created_at"
],
"title": "user"
}
}
}
}
}
}