---
title: "Update model YAML"
method: POST
path: "/api/v1/models/{modelId}/yaml"
tags: ["Models"]
---

# Update model YAML

`POST /api/v1/models/{modelId}/yaml`

## Path parameters

- `modelId` string, uuid, required — Model UUID

## Request body

- ModelYamlCreateRequestBody
  - `branchId` string, uuid — Branch ID for branch-aware operations
  - `fileName` string, required — File name to create or update
  - `mode` 'combined' | 'extension' | 'staged' | 'merged' | 'fully-resolved' — IDE mode for YAML operations
  - `commitMessage` string — Commit message for git sync
  - `fetchedAtMillis` number — Timestamp when the file was fetched
  - `fullyResolved` boolean — Treat the posted YAML as fully resolved (with the extends chain expanded). Only valid with mode=combined.
  - `previousChecksum` string — Previous checksum for conflict detection
  - `yaml` string, required — YAML content for the file

## Response `200`

Model YAML updated

- ModelYamlResponse
  - `checksums` object — Checksums for each file
  - `files` object, required — YAML content for each file
  - `version` number, required — Model version number
  - `viewNames` object — Mapping of file name to view name

## Other responses

- `400` — Invalid YAML or file name
- `401` — Authentication required
- `403` — Permission denied
- `404` — Model not found
- `409` — Checksum mismatch (concurrent modification)

---

[API](https://skmtc.net/omniapp/apis/omni-api.md) · [All operations](https://skmtc.net/omniapp/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/omniapp/omni-api/versions/4701f292c621/schema)
