---
title: "Start a dbt sync for a deployment"
method: POST
path: "/api/v1/deployments/{deploymentId}/dbt-sync"
tags: ["dbt Sync"]
---

# Start a dbt sync for a deployment

`POST /api/v1/deployments/{deploymentId}/dbt-sync`

## Path parameters

- `deploymentId` integer, required

## Request body

- StartDbtSyncInput
  - `branchName` string, nullable
  - `ref` string, nullable — Git ref in the dbt repository to sync from — a branch or a tag, NOT a commit SHA. Overrides the branch saved on the deployment’s dbt git integration for this sync only, so CI can sync the ref under review (e.g. a pull request’s head branch) instead of the tracked branch. The generated Cube branch is named after it.

## Response `200`

- DbtSyncResponse
  - `branchName` string, required
  - `syncJobId` string, required
  - `workflowId` string, required

## Changes

> 9 revisions in range; 2 could not be searched.

- **2026-07-31** `a0c6b1d2ac96` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/cube-js/apis/cube-cloud-rest-api/changes/api/v1/deployments/:deploymentId/dbt-sync/post.md)

---

[API](https://skmtc.dev/cube-js/apis/cube-cloud-rest-api.md) · [All operations](https://skmtc.dev/cube-js/apis/cube-cloud-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cube-js/cube-cloud-rest-api/revisions/97e151460143/schema)
