Update Model
Page Outline
Partially updates the metadata or configuration of an existing model. Only fields included in the request body are modified; all other fields remain unchanged.
Base Path: /api/v1/models
Method: PATCH
Path: /{model_id}
Auth: Requires a valid Bearer token (Authorization: Bearer <JWT>)
Path Parameters
| Parameter | Type | Description |
|---|---|---|
model_id | string | Unique identifier of the model to update |
Request Body
All fields are optional. Only provided fields will be updated.
{
"name": "Churn Predictor v2",
"description": "Updated description with improved feature set.",
"tags": ["churn", "production", "v2"],
"config": {
"algorithm": "lightgbm",
"target_column": "churned"
}
}
| Field | Type | Description |
|---|---|---|
name | string | New model name (must remain unique within org) |
description | string | Updated description |
tags | string[] | Replaces the entire tags array |
config | object | Shallow merge applied over existing config |
Behavior
- Uses partial update (PATCH) semantics — unspecified fields are not cleared.
configis shallow-merged: top-level keys in the request body overwrite existing keys; nested objects are replaced, not merged.model_typeandtask_typeare immutable after creation; supplying them returnsHTTP 422 Unprocessable Entity.- Updates are blocked while the model is in
trainingstatus; returnsHTTP 409 Conflict. - An audit log entry is written with action
model.updated, recording which fields changed and their previous values.
Response
Returns the updated Model object with the same structure as Get Model.