---
title: "Moves a file between public and private storage."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sherpo.io/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sherpo merchant API › file

`POST /v1/stores/{store}/assets/{asset}/move`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `file:write`

## Path parameters

- `store` (`moveAsset.path.store`; string, required) — The store's id.
- `asset` (`moveAsset.path.asset`; string, required)
  - minLength 1

## Request body

_Optional._

- `enforcement` (`moveAsset.enforcement`; string, optional) — How the moved file is served, which every move names: `public` to anyone with its link, `signed` only through links that expire.
  - one of `"public"`, `"signed"`

## Example request

```json
{
  "enforcement": "public"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/assets/<asset>/move' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "enforcement": "public"
}
'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/assets/<asset>/move';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({enforcement: 'public'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/merchant/v1/stores/<store>/assets/<asset>/move"

payload = { "enforcement": "public" }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Moves a file between public and private storage.

#### Example

```json
{
  "transforms": [
    {
      "stage": "string",
      "params": {
        "level": "string",
        "property1": true,
        "property2": true
      },
      "position": 0
    }
  ],
  "deliveries": {
    "items": [
      {
        "id": "string",
        "asset_id": "string",
        "customer_id": "string",
        "member_id": "string",
        "intent": "string",
        "channel": "string",
        "issued_at": "string",
        "expires_at": "string",
        "revoked_at": "string",
        "max_uses": 0,
        "used_count": 0,
        "used_at": "string",
        "state": "string"
      }
    ],
    "total": 0
  },
  "uses": {
    "items": [
      {
        "attachment_id": "string",
        "asset_id": "string",
        "role": "string",
        "delivery": "string",
        "target": {
          "kind": "string",
          "id": "string"
        },
        "from_body": true,
        "detachable": true,
        "release": {
          "id": "string",
          "version": "string",
          "current": true,
          "after": {
            "id": "string",
            "version": "string"
          }
        }
      }
    ],
    "total": 0,
    "detachable": 0
  },
  "children": {
    "items": [
      "string"
    ],
    "total": 0
  },
  "id": "string",
  "locator": "string",
  "origin": "string",
  "custodian": "string",
  "enforcement": "string",
  "mime": "string",
  "bytes": 0,
  "quota_bytes": 0,
  "name": "string",
  "title": "string",
  "ext": "string",
  "status": "string",
  "optimized": true,
  "parent_id": "string",
  "redacted": true,
  "security": "string",
  "description": "string",
  "processed_at": "string",
  "metadata": {
    "width": 0,
    "height": 0,
    "duration": 0,
    "pages": 0,
    "waveform": "string",
    "transcript": {
      "language": "string",
      "confidence": 0
    },
    "arguments": [
      {
        "name": "string",
        "description": "string",
        "required": true,
        "default": "string",
        "match": "string",
        "flags": "string",
        "message": "string",
        "lenient": true
      }
    ],
    "property1": true,
    "property2": true
  },
  "created_at": "string"
}
```

- `transforms` (`moveAsset.response.200.transforms`; array<object>, required)
  - `stage` (`moveAsset.response.200.transforms.stage`; string, required)
  - `params` (`moveAsset.response.200.transforms.params`; object, required)
    - `level` (`moveAsset.response.200.transforms.params.level`; string, optional)
  - `position` (`moveAsset.response.200.transforms.position`; number, required)
- `deliveries` (`moveAsset.response.200.deliveries`; object, required)
  - `items` (`moveAsset.response.200.deliveries.items`; array<object>, required)
    - `id` (`moveAsset.response.200.deliveries.items.id`; string, required)
    - `asset_id` (`moveAsset.response.200.deliveries.items.asset_id`; string, required)
    - `customer_id` (`moveAsset.response.200.deliveries.items.customer_id`; any of, required)
      - any of: `string`, `null`
    - `member_id` (`moveAsset.response.200.deliveries.items.member_id`; any of, required)
      - any of: `string`, `null`
    - `intent` (`moveAsset.response.200.deliveries.items.intent`; string, required)
    - `channel` (`moveAsset.response.200.deliveries.items.channel`; string, required)
    - `issued_at` (`moveAsset.response.200.deliveries.items.issued_at`; any of, required)
      - any of: `string`, `null`
    - `expires_at` (`moveAsset.response.200.deliveries.items.expires_at`; any of, required)
      - any of: `string`, `null`
    - `revoked_at` (`moveAsset.response.200.deliveries.items.revoked_at`; any of, required)
      - any of: `string`, `null`
    - `max_uses` (`moveAsset.response.200.deliveries.items.max_uses`; any of, required)
      - any of: `number`, `null`
    - `used_count` (`moveAsset.response.200.deliveries.items.used_count`; number, required)
    - `used_at` (`moveAsset.response.200.deliveries.items.used_at`; any of, required)
      - any of: `string`, `null`
    - `state` (`moveAsset.response.200.deliveries.items.state`; string, required)
  - `total` (`moveAsset.response.200.deliveries.total`; number, required)
- `uses` (`moveAsset.response.200.uses`; object, required)
  - `items` (`moveAsset.response.200.uses.items`; array<object>, required)
    - `attachment_id` (`moveAsset.response.200.uses.items.attachment_id`; string, required)
    - `asset_id` (`moveAsset.response.200.uses.items.asset_id`; string, required)
    - `role` (`moveAsset.response.200.uses.items.role`; string, required)
    - `delivery` (`moveAsset.response.200.uses.items.delivery`; string, required)
    - `target` (`moveAsset.response.200.uses.items.target`; object, required)
      - `kind` (`moveAsset.response.200.uses.items.target.kind`; string, required)
      - `id` (`moveAsset.response.200.uses.items.target.id`; string, required)
    - `from_body` (`moveAsset.response.200.uses.items.from_body`; boolean, required)
    - `detachable` (`moveAsset.response.200.uses.items.detachable`; boolean, required)
    - `release` (`moveAsset.response.200.uses.items.release`; any of, required) — The software release shipping it, whether it is the current download, and the release holders download once it goes; null for a file no release ships.
      - any of: `object`, `null`
  - `total` (`moveAsset.response.200.uses.total`; number, required)
  - `detachable` (`moveAsset.response.200.uses.detachable`; number, required)
- `children` (`moveAsset.response.200.children`; object, required)
  - `items` (`moveAsset.response.200.children.items`; array<string>, required)
  - `total` (`moveAsset.response.200.children.total`; number, required)
- `id` (`moveAsset.response.200.id`; string, required)
- `locator` (`moveAsset.response.200.locator`; any of, required)
  - any of: `string`, `null`
- `origin` (`moveAsset.response.200.origin`; string, required)
- `custodian` (`moveAsset.response.200.custodian`; string, required)
- `enforcement` (`moveAsset.response.200.enforcement`; string, required)
- `mime` (`moveAsset.response.200.mime`; any of, required)
  - any of: `string`, `null`
- `bytes` (`moveAsset.response.200.bytes`; any of, required) — The file's size in bytes; null when it is charged nothing.
  - any of: `number`, `null`
- `quota_bytes` (`moveAsset.response.200.quota_bytes`; number, required) — The file's size in bytes; zero when it is charged nothing.
- `name` (`moveAsset.response.200.name`; string, required)
- `title` (`moveAsset.response.200.title`; any of, required)
  - any of: `string`, `null`
- `ext` (`moveAsset.response.200.ext`; any of, required)
  - any of: `string`, `null`
- `status` (`moveAsset.response.200.status`; string, required)
- `optimized` (`moveAsset.response.200.optimized`; boolean, required)
- `parent_id` (`moveAsset.response.200.parent_id`; any of, required)
  - any of: `string`, `null`
- `redacted` (`moveAsset.response.200.redacted`; boolean, required)
- `security` (`moveAsset.response.200.security`; any of, required)
  - any of: `string`, `null`
- `description` (`moveAsset.response.200.description`; any of, required)
  - any of: `string`, `null`
- `processed_at` (`moveAsset.response.200.processed_at`; any of, required)
  - any of: `string`, `null`
- `metadata` (`moveAsset.response.200.metadata`; object, required)
  - `width` (`moveAsset.response.200.metadata.width`; integer, optional)
    - min 0
  - `height` (`moveAsset.response.200.metadata.height`; integer, optional)
    - min 0
  - `duration` (`moveAsset.response.200.metadata.duration`; number, optional) — Seconds, measured, so rarely whole.
  - `pages` (`moveAsset.response.200.metadata.pages`; integer, optional)
    - min 0
  - `waveform` (`moveAsset.response.200.metadata.waveform`; any of, optional) — An audio file's waveform: 256 levels from 0 to 255, base64; null when it can't be drawn.
    - any of: `string`, `null`
  - `transcript` (`moveAsset.response.200.metadata.transcript`; object, optional)
    - `language` (`moveAsset.response.200.metadata.transcript.language`; string, optional)
    - `confidence` (`moveAsset.response.200.metadata.transcript.confidence`; number, optional)
  - `arguments` (`moveAsset.response.200.metadata.arguments`; array<object>, optional) — What an MCP prompt asks for; only an authored prompt carries it.
    - `name` (`moveAsset.response.200.metadata.arguments.name`; string, required)
    - `description` (`moveAsset.response.200.metadata.arguments.description`; any of, required)
      - any of: `string`, `null`
    - `required` (`moveAsset.response.200.metadata.arguments.required`; boolean, required)
    - `default` (`moveAsset.response.200.metadata.arguments.default`; any of, required)
      - any of: `string`, `null`
    - `match` (`moveAsset.response.200.metadata.arguments.match`; any of, required) — Pattern the whole value must match, diacritic-insensitive.
      - any of: `string`, `null`
    - `flags` (`moveAsset.response.200.metadata.arguments.flags`; any of, required) — Flags among `i`, `s` and `u` the pattern runs with; null for `i` alone.
      - any of: `string`, `null`
    - `message` (`moveAsset.response.200.metadata.arguments.message`; any of, required) — What a refused value is told instead of the default reason.
      - any of: `string`, `null`
    - `lenient` (`moveAsset.response.200.metadata.arguments.lenient`; boolean, required)
- `created_at` (`moveAsset.response.200.created_at`; any of, required)
  - any of: `string`, `null`

### default

A problem; see https://api.sherpo.io/merchant/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`moveAsset.response.default.type`; string, required)
  - format `uri`
- `title` (`moveAsset.response.default.title`; string, required)
- `status` (`moveAsset.response.default.status`; integer, required)
- `detail` (`moveAsset.response.default.detail`; string, required)
- `code` (`moveAsset.response.default.code`; string, optional)
- `context` (`moveAsset.response.default.context`; object, optional)
- `reached_core` (`moveAsset.response.default.reached_core`; boolean, optional)
- `core_answer` (`moveAsset.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/move-asset/index.md
