Unarchive Model
Page Outline
/api/v1/models/{model_id}/unarchiveThe Unarchive Model endpoint restores a model from archived status back to ready (or its previous non-archived status). Unarchiving a model makes it visible again in default list views across the organizational workspace and renders it eligible for further training, hyperparameter tuning, and active deployment in the inference layer.
[!TIP] Unarchiving is non-destructive. All historical configurations, version history, training metrics, and audit logs are fully retained during the archival and unarchival phases. For broad metadata retrieval, refer to the Get Model Details documentation.
Authentication Requirements
This endpoint requires robust authorization. You must include a valid Bearer token in the Authorization header.
- Header:
Authorization: Bearer <Your-JWT-Token> - Permissions Required: The user must belong to the organization that owns the model, and their Role-Based Access Control (RBAC) profile must include either
organization:adminormodel:writeprivileges.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model_id | string | Yes | The unique identifier (mdl-xxx) of the archived model instance you are attempting to restore. |
Operational Behavior
When invoked, the unarchive operation executes a sequence of validation and state transition tasks:
- State Validation: The backend system verifies that the target model is currently in
status: "archived". Attempting to unarchive a model that is alreadyready,draft, ortrainingwill trigger anHTTP 409 Conflicterror. - Status Restoration:
- If the model has previously completed a successful training run, it is restored to
readystatus. - If no prior training versions exist, it is restored to
draftstatus.
- If the model has previously completed a successful training run, it is restored to
- Audit Trailing: A mandatory Audit Log entry is automatically generated, capturing the actor, timestamp, and action
model.unarchivedfor compliance tracking. - Ownership Check: If the
model_idis invalid or belongs to a different organizational tenant, the API safely aborts and returns anHTTP 404 Not Foundto prevent data leakage.
Response
Upon successful restoration, the API responds with an HTTP 200 OK status and returns the fully updated Model object JSON payload reflecting its restored state.
Example JSON Response
{
"id": "mdl-7f3a19bc92",
"name": "Customer Churn Predictor",
"status": "ready",
"organization_id": "org-29da8f11",
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-03-14T10:15:30Z",
"unarchived_at": "2026-03-14T10:15:30Z",
"metadata": {
"framework": "xgboost",
"target_variable": "churn_probability"
}
}
Error Codes
Developers should gracefully handle the following error scenarios:
| Code | Reason | Resolution |
|---|---|---|
401 | Unauthorized | Verify your JWT token format and ensure it has not expired. |
403 | Forbidden | Ensure the authenticated user has model:write permissions. |
404 | Not Found | Check the model_id for typos and verify organization access. |
409 | Conflict | The model is not currently archived. Check its status using Get Model. |
429 | Too Many Requests | Rate limit exceeded. Standard backoff procedures apply. |