---
title: "Re-parse a model's SQL"
method: POST
path: "/api/v1/models/{modelId}/reparse"
tags: ["Models"]
---

# Re-parse a model's SQL

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

## Request

- Base URL: `https://omniapp.co` (the document declares no server; this is the origin it was published from)
- URL: `https://omniapp.co/api/v1/models/{modelId}/reparse`
- Auth: HTTP bearer

Re-parse every SQL field and view in a shared model or shared extension and refresh their inferred column types, clearing errors whose cause was fixed elsewhere, such as a warehouse grant. The model is saved only if its YAML is unchanged; otherwise the request fails with 400 and nothing is saved. Runs synchronously; if the request times out, the re-parse still finishes and saves.

## Path parameters

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

## Query parameters

- `branch_id` string, uuid: ID of a branch to re-parse instead of the model itself: a branch of this model, or for a shared extension a branch of its base shared model (of the extension itself if it uses isolated branches). Unlike the model, a branch saves the re-parse even when it changes the branch's YAML, except on a git-follower model.

## Response `200`

Model re-parsed and saved

- SuccessResponse
  - `success` boolean, required: Whether the operation was successful

## Other responses

- `400`: Invalid request parameters, or the re-parse would change the YAML of the model or of a git follower's branch
- `401`: Authentication required
- `403`: Permission denied
- `404`: Model or branch not found, or model deleted
- `405`: Method not allowed
- `409`: The model was edited during the re-parse; retry
- `422`: The model is not a shared model or shared extension

## Changes

- **2026-10-21** `576d1bf4c442`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omniapp/apis/omni-api/changes/api/v1/models/:modelId/reparse/post.md)

---

[API](https://skmtc.dev/omniapp/apis/omni-api.md) - [All operations](https://skmtc.dev/omniapp/apis/omni-api/llms.txt) - [OpenAPI document](https://skmtc.dev/omniapp/apis/omni-api/revisions/76b40ebc2292?raw)
