---
title: "publish a script to a hub project"
method: POST
path: "/w/{workspace}/hub/scripts"
tags: ["hubPublish"]
---

# publish a script to a hub project

`POST /w/{workspace}/hub/scripts`

Requires the caller to be a workspace admin. Forwards the request to the
configured Hub scoped to the `{workspace}:{folder}` source and returns
the Hub's status code and raw response body.

## Path parameters

- `workspace` string, required

## Query parameters

- `folder` string, required

## Request body

- PublishScriptBody
  - `summary` string, required
  - `app` string, required
  - `description` string
  - `kind` string
  - `content` string, required
  - `language` string, required
  - `schema` object
  - `lockfile` string
  - `path` string
  - `source_path` string
  - `project_slug` string, required — hub project slug (3-50 chars, lowercase alphanumeric and hyphens, no leading/trailing hyphen)

## Response `200`

raw Hub response body (status code is passed through from the Hub)

---

[API](https://skmtc.net/windmill/apis/windmill-api.md) · [All operations](https://skmtc.net/windmill/apis/windmill-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/windmill/windmill-api/versions/155a35b3caff/schema)
