> This page is for Piattaforma, version Versione precedente.
> For other versions, use one of these documentation indexes:
> - V4 (default): https://next.developer.frame.io/platform/v4/llms.txt
> - V4 sperimentale: https://next.developer.frame.io/platform/v4-experimental/llms.txt
> - Versione precedente: https://next.developer.frame.io/platform/v2/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://next.developer.frame.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://next.developer.frame.io/_mcp/server.

# Copia in blocco le risorse

POST https://api.frame.io/v2/batch/assets/{destination_id}/copy
Content-Type: application/json

Copia un batch di ID risorsa in una nuova cartella. Puoi anche scegliere se copiare tutti i commenti (o nessuno) dall’originale alla risorsa copiata.

Reference: https://next.developer.frame.io/platform/v2/api-reference/assets/batch-copy-asset

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `destination_id` (string, required) — Destination folder `id` - must be in the same folder

### Body (application/json)

This endpoint expects an object.

- `batch` (list of V2BatchAssetsDestinationIdCopyPostRequestBodyContentApplicationJsonSchemaBatchItems, optional)
- `copy_comments` (enum, optional)
  - Allowed values: `all`, `none`

## Response

### 200

Batch copy success response

- `error` (V2BatchAssetsDestinationIdCopyPostResponsesContentApplicationJsonSchemaError, optional) — Assets that were not copied, and why they weren't copied
- `success` (V2BatchAssetsDestinationIdCopyPostResponsesContentApplicationJsonSchemaSuccess, optional) — The assets that were succesfully copied
- `succes_test` (V2BatchAssetsDestinationIdCopyPostResponsesContentApplicationJsonSchemaSuccesTest, optional)
- `` (string, optional)

## Errors

### 401 Unauthorized Error

Unauthorized response

- `code` (integer, optional)
- `errors` (list of HttpErrorErrorsItems, optional)
- `message` (string, optional)

### 404 Not Found Error

Not Found response

- `code` (integer, optional)
- `errors` (list of HttpErrorErrorsItems, optional)
- `message` (string, optional)

## Types

### V2BatchAssetsDestinationIdCopyPostRequestBodyContentApplicationJsonSchemaBatchItems

- `id` (integer, required) — Identifier of an asset to be copied

### V2BatchAssetsDestinationIdCopyPostResponsesContentApplicationJsonSchemaError

Assets that were not copied, and why they weren't copied

### V2BatchAssetsDestinationIdCopyPostResponsesContentApplicationJsonSchemaSuccess

The assets that were succesfully copied

- `id` (Asset, optional) — Accetta coppie chiave/valore arbitrarie per archiviare le informazioni su una risorsa

### V2BatchAssetsDestinationIdCopyPostResponsesContentApplicationJsonSchemaSuccesTest

- `` (V2BatchAssetsDestinationIdCopyPostResponsesContentApplicationJsonSchemaSuccesTest, optional)

### HttpErrorErrorsItems

- `code` (integer, optional)
- `detail` (string, optional)
- `status` (integer, optional)
- `title` (string, optional)

### Asset

Accetta coppie chiave/valore arbitrarie per archiviare le informazioni su una risorsa

### Asset0

- `` (string, optional)

## Examples

### response

**Response**

```json
{
  "error": {
    "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa": "Something went wrong!"
  }
}
```

**SDK Code**

```python response
import requests

url = "https://api.frame.io/v2/batch/assets/eefb57e0-79f2-4bc7-9b70-99fbc175175c/copy"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript response
const url = 'https://api.frame.io/v2/batch/assets/eefb57e0-79f2-4bc7-9b70-99fbc175175c/copy';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go response
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.frame.io/v2/batch/assets/eefb57e0-79f2-4bc7-9b70-99fbc175175c/copy"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby response
require 'uri'
require 'net/http'

url = URI("https://api.frame.io/v2/batch/assets/eefb57e0-79f2-4bc7-9b70-99fbc175175c/copy")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.frame.io/v2/batch/assets/eefb57e0-79f2-4bc7-9b70-99fbc175175c/copy")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.frame.io/v2/batch/assets/eefb57e0-79f2-4bc7-9b70-99fbc175175c/copy', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp response
using RestSharp;

var client = new RestClient("https://api.frame.io/v2/batch/assets/eefb57e0-79f2-4bc7-9b70-99fbc175175c/copy");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift response
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v2/batch/assets/eefb57e0-79f2-4bc7-9b70-99fbc175175c/copy")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### batch_copy_asset_example

**Request**

```json
{
  "batch": [
    {
      "id": 1
    },
    {
      "id": 2
    }
  ],
  "copy_comments": "none"
}
```

**Response**

```json
{
  "error": {
    "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa": "Something went wrong!"
  }
}
```

**SDK Code**

```python batch_copy_asset_example
import requests

url = "https://api.frame.io/v2/batch/assets/eefb57e0-79f2-4bc7-9b70-99fbc175175c/copy"

payload = {
    "batch": [{ "id": 1 }, { "id": 2 }],
    "copy_comments": "none"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript batch_copy_asset_example
const url = 'https://api.frame.io/v2/batch/assets/eefb57e0-79f2-4bc7-9b70-99fbc175175c/copy';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"batch":[{"id":1},{"id":2}],"copy_comments":"none"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go batch_copy_asset_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.frame.io/v2/batch/assets/eefb57e0-79f2-4bc7-9b70-99fbc175175c/copy"

	payload := strings.NewReader("{\n  \"batch\": [\n    {\n      \"id\": 1\n    },\n    {\n      \"id\": 2\n    }\n  ],\n  \"copy_comments\": \"none\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby batch_copy_asset_example
require 'uri'
require 'net/http'

url = URI("https://api.frame.io/v2/batch/assets/eefb57e0-79f2-4bc7-9b70-99fbc175175c/copy")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"batch\": [\n    {\n      \"id\": 1\n    },\n    {\n      \"id\": 2\n    }\n  ],\n  \"copy_comments\": \"none\"\n}"

response = http.request(request)
puts response.read_body
```

```java batch_copy_asset_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.frame.io/v2/batch/assets/eefb57e0-79f2-4bc7-9b70-99fbc175175c/copy")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"batch\": [\n    {\n      \"id\": 1\n    },\n    {\n      \"id\": 2\n    }\n  ],\n  \"copy_comments\": \"none\"\n}")
  .asString();
```

```php batch_copy_asset_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.frame.io/v2/batch/assets/eefb57e0-79f2-4bc7-9b70-99fbc175175c/copy', [
  'body' => '{
  "batch": [
    {
      "id": 1
    },
    {
      "id": 2
    }
  ],
  "copy_comments": "none"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp batch_copy_asset_example
using RestSharp;

var client = new RestClient("https://api.frame.io/v2/batch/assets/eefb57e0-79f2-4bc7-9b70-99fbc175175c/copy");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"batch\": [\n    {\n      \"id\": 1\n    },\n    {\n      \"id\": 2\n    }\n  ],\n  \"copy_comments\": \"none\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift batch_copy_asset_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "batch": [["id": 1], ["id": 2]],
  "copy_comments": "none"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v2/batch/assets/eefb57e0-79f2-4bc7-9b70-99fbc175175c/copy")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```