# Publish a bundle

> Validate a staged bundle and promote it to the live version. For apps, kick off the build.

Source: https://docs.generalinput.com/api/workflows/publish



<Endpoint method="POST" path="/v1/workflows/:id/publish" />

<Access scope="workflows:manage" />

Runs the same checks as [validate](/api/workflows/validate); on success the staged bundle becomes the live version and a version snapshot is taken. Tests and handler runs use the live version, so publish before testing.

## Body [#body]

| Field           | Type   | Required | Notes                                                                              |
| --------------- | ------ | -------- | ---------------------------------------------------------------------------------- |
| `bundleKey`     | string | yes      | From [bundle upload URL](/api/workflows/bundle-upload-url).                        |
| `changeSummary` | string | yes      | 1 to 2000 characters. One plain sentence shown to the user in the version history. |

## Response [#response]

```json
{
  "ok": true,
  "filesPersisted": 4,
  "webhookUrls": ["https://cloud.generalinput.com/webhooks/wf_01HX…/inbound"],
  "build": { "status": "building" }
}
```

| Field         | Type      | Notes                                                                                                                          |
| ------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `webhookUrls` | string\[] | The inbound URL of each webhook trigger. Assigned at publish; not exposed at runtime.                                          |
| `build`       | object    | Apps only. `status` is `ready`, `building`, or `error` with a `message`. Poll [build status](/api/workflows/app-build-status). |

Validation failures return `200` with `{ "ok": false, "errors": [...] }` and nothing is published. They are a domain outcome to fix and retry, not a request error.
