---
title: "Move a script to another logical namespace"
method: PATCH
path: "/api/assets/script/{id}/key"
tags: ["Assets"]
---

# Move a script to another logical namespace

`PATCH /api/assets/script/{id}/key`

## Path parameters

- `id` string, required

## Request body

- object
  - `key` string, required — Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form.

## Response `200`

Asset namespace updated

- object
  - `entityType` 'task' | 'workflow' | 'schedule' | 'page' | 'app' | 'script' | 'file', required
  - `id` string, required
  - `key` string, required — Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form.

## Other responses

- `400` — Invalid namespace
- `403` — Move not authorized
- `404` — Asset not found
- `409` — Moves blocked until audit warnings are repaired

---

[API](https://skmtc.net/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.net/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/desplega-ai/agent-swarm-api/versions/ef761849166b/schema)
