---
title: "Delete a YAML file"
method: DELETE
path: "/v1/models/{modelId}/yaml"
tags: ["Models"]
---

# Delete a YAML file

`DELETE /v1/models/{modelId}/yaml`

Delete a topic or view YAML file from a model. The file must be a YAML file ending in `.topic` or `.view`.

The following models cannot be edited using this endpoint:

- Schema models
- Models using git follower mode

## Path parameters

- `modelId` string, uuid, required

## Query parameters

- `fileName` string, required
- `branchId` string, uuid
- `mode` 'combined' | 'extension' | 'staged' | 'merged' | 'history'
- `commitMessage` string

## Response `200`

YAML file deleted successfully

- object
  - `fileName` string — The name of the file that was deleted.
  - `success` boolean — Indicates the request was successful.

## Other responses

- `400` — Bad Request Possible error messages: - `<parameter>: <parameter> is required` - `modelId: Invalid uuid` - `branchId: Invalid uuid` - `<parameter>: Invalid value <description>`
- `403` — Forbidden Possible error messages: - `Permission denied` - `Feature not enabled`
- `404` — Not Found Possible error messages: - `Model with id <modelId> does not exist` - `Branch does not exist` - `File does not exist`
- `405` — Method Not Allowed - Invalid HTTP method for this endpoint
- `429` — Too Many Requests - Rate limit exceeded (60 requests/minute)

---

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