---
title: "Trigger a dbt metadata sync for a branch"
method: POST
path: "/api/v1/models/{modelId}/dbt-sync"
tags: ["Models"]
---

# Trigger a dbt metadata sync for a branch

`POST /api/v1/models/{modelId}/dbt-sync`

Trigger a dbt metadata sync ("dbt quick sync") for a branch. Recompiles the branch's dbt manifest and merges the regenerated dbt extension model, without a full database schema scan. The branch (via branch_id) supplies the dbt environment and dbt git branch. Runs as a background job.

## Path parameters

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

## Query parameters

- `branch_id` string, uuid, required — ID of the branch to sync dbt metadata for. The branch supplies the dbt environment and dbt git branch to compile against (set via POST /api/v1/models/{modelId}/branch/{branchName}/dbt).

## Response `200`

dbt sync job started

- JobCreatedResponse
  - `jobId` string, required — ID of the created job. Poll GET /api/v1/jobs/{jobId}/status for its status.

## Other responses

- `400` — Invalid request parameters
- `401` — Authentication required
- `403` — Permission denied
- `404` — Model or branch not found, or model deleted
- `405` — Method not allowed
- `422` — The model is not a shared model

---

[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/de7cac8b5983/schema)
