---
title: "Update the asset scripts."
method: PUT
path: "/api/apps/{app}/assets/scripts"
tags: ["Apps"]
---

# Update the asset scripts.

`PUT /api/apps/{app}/assets/scripts`

## Path parameters

- `app` string, required

## Request body

- UpdateAssetScriptsDto
  - `query` string, nullable — The script that is executed for each asset when querying assets.
  - `queryPre` string, nullable — The script that is executed for all assets when querying assets.
  - `create` string, nullable — The script that is executed when creating an asset.
  - `update` string, nullable — The script that is executed when updating a content.
  - `annotate` string, nullable — The script that is executed when annotating a content.
  - `move` string, nullable — The script that is executed when moving a content.
  - `delete` string, nullable — The script that is executed when deleting a content.

## Response `200`

Asset scripts updated.

- AssetScriptsDto
  - `_links` object, required — The links.
  - `query` string, nullable — The script that is executed for each asset when querying assets.
  - `queryPre` string, nullable — The script that is executed for all assets when querying assets.
  - `create` string, nullable — The script that is executed when creating an asset.
  - `update` string, nullable — The script that is executed when updating a content.
  - `annotate` string, nullable — The script that is executed when annotating a content.
  - `move` string, nullable — The script that is executed when moving a content.
  - `delete` string, nullable — The script that is executed when deleting a content.
  - `version` integer, required — The version of the app.

## Other responses

- `400` — Asset request not valid.
- `404` — App not found.
- `500` — Operation failed.

---

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