---
title: "Save a successful Code Mode run as a reusable script"
method: POST
path: "/v1/codemode-scripts"
tags: ["Codemode Runs"]
---

# Save a successful Code Mode run as a reusable script

`POST /v1/codemode-scripts`

## Request body

- object
  - `name` string, required
  - `description` string
  - `code` string, required
  - `currentInput` unknown
  - `inputSchema` unknown
  - `outputSchema` unknown

## Response `201`

Script saved.

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

## Other responses

- `400` — Invalid request.

---

[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/0d4ebf20cbde/schema)
