Models

Update Model

PATCH/v1/models/{id}

Update a model's status. Currently supports archiving a model or reactivating an archived model. Archiving a model that is the active champion on a deployment will fail — you must first promote a different model or deactivate the deployment.

Authentication: JWT token. Requires role: owner or admin.

Path Parameters

idstringrequired

The model ID (e.g. mod_r4Kw9xPm).

Body Parameters

statusstringrequired

The new status for the model. One of "archived" or "active".

Error Responses

401unauthorized

JWT is missing or expired.

403insufficient_role

Your role does not have permission to update models.

404model_not_found

No model exists with the provided ID.

409model_is_champion

Cannot archive a model that is the active champion on a deployment. Promote a different model first.

Update Model
curl -X PATCH https://api.cali-br.com/v1/models/mod_r4Kw9xPm \
  -H #a5d6ff">"Authorization: Bearer eyJhbGciOiJSUzI1NiIs..." \
  -H #a5d6ff">"Content-Type: application/json" \
  -d '{ #a5d6ff">"status": "archived" }'
Response200
{
  "id": "mod_r4Kw9xPm",
  "name": "retail_unsecured_v3",
  "version": "1.2.0",
  "status": "archived",
  "updated_at": "2026-03-26T15: 00: 00Z"
}