---
title: "POST /v1/code/syncs"
method: POST
path: "/v1/code/syncs"
tags: ["code"]
---

# POST /v1/code/syncs

`POST /v1/code/syncs`

## Request

- Base URL: `https://help.steep.app` (the document declares no server; this is the origin it was published from)
- URL: `https://help.steep.app/v1/code/syncs`
- Auth: none declared

Sync your semantic models (Steep YAML, dbt or Cube) into Steep. Enqueues the sync and returns immediately with a `queued` result; poll `get sync by id` until the `outcome` is terminal (`completed` or `failed`). With `dryRun`, previews the sync instead: returns what it would create, update and remove, without changing anything.

## Request body

- object
  - `datasourceId` string, required: Unique resource ID (opaque). The datasource whose semantic models to sync.
  - `dryRun` boolean: When `true`, previews the sync: returns what it would create, update and remove, without changing anything. Nothing is queued, so there is no sync to poll.
  - `files` object[]: Only with `dryRun`. Steep YAML files to preview instead of the linked GitHub repository. Send the complete set: objects defined in code but missing from these files are reported as `removed`. Each `path` is relative to the repository root, uses forward slashes, ends in `.yml` or `.yaml`, and appears once. The request may be up to 10 MB.
    - `path` string, required
    - `content` string, required

## Response `200`

Response for status 200

- object
  - `datasourceId` string, required: Unique resource ID (opaque).
  - `method` string, required: How the sync was triggered.
  - `outcome` 'completed' | 'failed', required: `completed` when the sync would succeed, `failed` when it would fail, with the reason in `error`.
  - `created` string[], required: `identifier`s of entities the sync would create. Null when the preview failed.
  - `updated` string[], required: `identifier`s of entities the sync would update. Null when the preview failed.
  - `removed` string[], required: `identifier`s of entities the sync would remove. Null when the preview failed.
  - `unchanged` string[], required: `identifier`s of entities the sync would leave unchanged. Null when the preview failed.
  - `error` unknown, required
  - `type` string, required: Source of the semantic models that were synced.
  - `errors` string[], required: Errors the sync reported. Null until terminal.
  - `warnings` string[], required: Warnings the sync reported. Null until terminal.
  - `dryRun` boolean, required: Always `true`: this is a preview, and nothing was changed.
  - `accessPolicies` object, required: The row-level access policies in code, by what the sync would do to each. A changed attribute is one policy removed and another created. Null when the preview failed.
    - `created` object[], required: Access policies the sync would create.
      - `module` string, required: `identifier` of the module the policy is on.
      - `policy` string, required: What the policy filters, as `table.column = user.<attribute>`.
    - `updated` object[], required: Access policies the sync would update.
      - `module` string, required: `identifier` of the module the policy is on.
      - `policy` string, required: What the policy filters, as `table.column = user.<attribute>`.
    - `removed` object[], required: Access policies the sync would remove.
      - `module` string, required: `identifier` of the module the policy is on.
      - `policy` string, required: What the policy filters, as `table.column = user.<attribute>`.
    - `unchanged` object[], required: Access policies the sync would leave unchanged.
      - `module` string, required: `identifier` of the module the policy is on.
      - `policy` string, required: What the policy filters, as `table.column = user.<attribute>`.

## Other responses

- `202`: Response for status 202
- `401`: Response for status 401
- `403`: Response for status 403
- `422`: Response for status 422
- `429`: Response for status 429
- `500`: Response for status 500
- `504`: Response for status 504

---

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