---
title: "Set up destination schema"
method: POST
path: "/pipeline_setup"
tags: ["Stateless Sync API"]
---

# Set up destination schema

`POST /pipeline_setup`

Creates destination tables and applies migrations. Streams NDJSON messages (control, log, trace) tagged with _emitted_by. Pass ?only=destination to run destination setup alone (e.g. optimistic table creation) or ?only=source to isolate the source.

## Query parameters

- `only` 'source' | 'destination' — Run only the source or destination side. Useful for optimistic destination setup (e.g. creating tables early in a UI) or isolating a connector when debugging.

## Response `200`

NDJSON stream of setup messages

## Other responses

- `400` — Invalid params

## Changes

- **2026-04-21** `c19b0d0a0631` — 1 warning
  - removed the optional property `oneOf[#/components/schemas/ControlMessage]/control/oneOf[subschema #1]/source_config/max_concurrent_streams` from the response with the `200` status
- **2026-04-20** `98cef0c30f36` — 1 breaking
  - the `header` request parameter `x-pipeline` became required
- **2026-04-20** `1e719ad9a31f` — 1 breaking
  - removed the request body
- **2026-04-20** `8bea86f53f8e` — 1 info
  - added the optional property `oneOf[#/components/schemas/LogMessage]/log/data` to the response with the `200` status
- **2026-04-20** `cef36747fb38` — 4 breaking, 8 warning, 8 info
  - added the new required request property `pipeline/destination/oneOf[subschema #1]/postgres/aws/database`
  - added the new required request property `pipeline/destination/oneOf[subschema #1]/postgres/aws/host`
  - added the new required request property `pipeline/destination/oneOf[subschema #1]/postgres/aws/user`
  - the response property `oneOf[#/components/schemas/ControlMessage]/control/oneOf[subschema #2]/destination_config/oneOf[#/components/schemas/DestinationPostgresConfig]/schema` became optional for the status `200`
  - …16 more

[Full history](https://skmtc.dev/stripe/apis/stripe-sync-engine/changes/pipeline_setup/post.md)

---

[API](https://skmtc.dev/stripe/apis/stripe-sync-engine.md) · [All operations](https://skmtc.dev/stripe/apis/stripe-sync-engine/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/stripe/stripe-sync-engine/revisions/c19b0d0a0631/schema)
