---
title: "Save a successful Code Mode run as a Program inside an OpenWork Connect Plugin"
method: POST
path: "/v1/codemode-scripts"
tags: ["Codemode Runs"]
---

# Save a successful Code Mode run as a Program inside an OpenWork Connect Plugin

`POST /v1/codemode-scripts`

## Request body

- object
  - `pluginId` string — Existing OpenWork Connect Plugin that will contain and share this Program. Omit to use the member's private My Programs Plugin.
  - `name` string, required
  - `description` string
  - `code` string, required
  - `currentInput` unknown
  - `inputSchema` unknown
  - `outputSchema` unknown

## Response `201`

Program saved.

- object
  - `pluginId` string, required
  - `configObjectId` string, required
  - `configObjectVersionId` string, required

## Other responses

- `400` — Invalid request.
- `403` — The caller cannot add Programs to this Plugin.
- `404` — Plugin not found.

---

[API](https://skmtc.net/openworklabs/apis/den-api.md) · [All operations](https://skmtc.net/openworklabs/apis/den-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openworklabs/den-api/revisions/6915dfb03e5d/schema)
