> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://next.developer.frame.io/platform/v4-experimental/api-reference/version-stacks/reorder/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://next.developer.frame.io/_mcp/server. # Reorder version stack children PATCH https://api.frame.io/v4/accounts/{account_id}/version_stacks/{version_stack_id}/versions Content-Type: application/json Reorder version stack children. Rate Limits: 10 calls per 1.00 minute(s) per account\_user Reference: https://next.developer.frame.io/platform/v4-experimental/api-reference/version-stacks/reorder ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `account_id` (string, required) - `version_stack_id` (string, required) ### Headers - `api-version` (enum, required) - Allowed values: `experimental` ### Body (application/json) This endpoint expects a VersionStackReorderParams. - `data` (VersionStackReorderParamsData, optional) ## Response ### 200 OK - `data` (list of Asset, required) — Assets ## Errors ### 400 Bad Request Error Bad request - `errors` (list of BadRequestErrorsItems, required) ### 401 Unauthorized Error Unauthorized - `errors` (list of UnauthorizedErrorsItems, required) ### 403 Forbidden Error Forbidden - `errors` (list of ForbiddenErrorsItems, required) ### 404 Not Found Error Not found - `errors` (list of NotFoundErrorsItems, required) ### 409 Conflict Error Conflict - `errors` (list of ConflictErrorsItems, required) ### 422 Unprocessable Entity Error Unprocessable content - `errors` (list of UnprocessableContentErrorsItems, required) ### 429 Too Many Requests Error Too many requests - `errors` (list of TooManyRequestsErrorsItems, required) ## Types ### VersionStackReorderParamsData - `target_file_id` (string, required) — ID of the file to move - `move_above_file_id` (string, optional) — ID of the file to move the target file above - `move_below_file_id` (string, optional) — ID of the file to move the target file below - `move_to` (enum, optional) — Move the target file to the top or bottom of the version stack - Allowed values: `top`, `bottom` ### Asset - `type`: `file` (File) - `created_at` (string, required) — Creation timestamp - `file_size` (integer, required) — File size in bytes - `id` (string, required) — File, Folder, or Version Stack ID - `media_type` (string, required, nullable) — File media type. Null until the file has finished uploading and its type is determined. - `name` (string, required) — File or folder Name - `parent_id` (string, required, nullable) — Parent Folder or Version Stack ID - `project_id` (string, required) — Project ID - `status` (enum, required) - Allowed values: `created`, `transcoded`, `uploaded` - `updated_at` (string, required) — Update timestamp - `view_url` (string, required) — URL to view the asset in the Frame.io web application - `adobe_id` (string, optional, nullable) — Adobe cloud storage asset identifier, when available. - `adobe_version_id` (string, optional, nullable) — Version identifier of the Adobe cloud storage asset associated with this file, when available. A version identifier is a string that often resembles an integer but should be treated as an opaque string. - `type`: `folder` (Folder) - `cover_file_id` (string, required, nullable) — Cover asset ID - `created_at` (string, required) — Creation timestamp - `id` (string, required) — File, Folder, or Version Stack ID - `name` (string, required) — File or folder Name - `parent_id` (string, required, nullable) — Parent Folder or Version Stack ID - `project_id` (string, required) — Project ID - `restricted` (boolean, required) — Folder is restricted or not - `updated_at` (string, required) — Update timestamp - `view_url` (string, required) — URL to view the asset in the Frame.io web application - `adobe_id` (string, optional, nullable) — Adobe cloud storage asset identifier, when available. - `type`: `version_stack` (VersionStack) - `created_at` (string, required) — Creation timestamp - `head_version` (File, required) - `id` (string, required) — File, Folder, or Version Stack ID - `name` (string, required) — File or folder Name - `parent_id` (string, required, nullable) — Parent Folder or Version Stack ID - `project_id` (string, required) — Project ID - `updated_at` (string, required) — Update timestamp - `view_url` (string, required) — URL to view the asset in the Frame.io web application - `adobe_id` (string, optional, nullable) — Adobe cloud storage asset identifier, when available. ### BadRequestErrorsItems - `detail` (string, required) - `source` (BadRequestErrorsItemsSource, optional) - `title` (string, optional) ### UnauthorizedErrorsItems - `detail` (string, required) - `source` (UnauthorizedErrorsItemsSource, optional) - `title` (string, optional) ### ForbiddenErrorsItems - `detail` (string, required) - `source` (ForbiddenErrorsItemsSource, optional) - `title` (string, optional) ### NotFoundErrorsItems - `detail` (string, required) - `source` (NotFoundErrorsItemsSource, optional) - `title` (string, optional) ### ConflictErrorsItems - `detail` (string, required) - `source` (ConflictErrorsItemsSource, optional) - `title` (string, optional) ### UnprocessableContentErrorsItems - `detail` (string, required) - `source` (UnprocessableContentErrorsItemsSource, optional) - `title` (string, optional) ### TooManyRequestsErrorsItems - `detail` (string, required) - `source` (TooManyRequestsErrorsItemsSource, optional) - `title` (string, optional) ### File - `id` (string, required) — File, Folder, or Version Stack ID - `name` (string, required) — File or folder Name - `created_at` (string, required) — Creation timestamp - `parent_id` (string, required, nullable) — Parent Folder or Version Stack ID - `project_id` (string, required) — Project ID - `type` (enum, required) - Allowed values: `file`, `folder`, `version_stack` - `updated_at` (string, required) — Update timestamp - `view_url` (string, required) — URL to view the asset in the Frame.io web application - `file_size` (integer, required) — File size in bytes - `media_type` (string, required, nullable) — File media type. Null until the file has finished uploading and its type is determined. - `status` (enum, required) - Allowed values: `created`, `transcoded`, `uploaded` - `adobe_id` (string, optional, nullable) — Adobe cloud storage asset identifier, when available. - `adobe_version_id` (string, optional, nullable) — Version identifier of the Adobe cloud storage asset associated with this file, when available. A version identifier is a string that often resembles an integer but should be treated as an opaque string. ### BadRequestErrorsItemsSource - `pointer` (string, optional) ### UnauthorizedErrorsItemsSource - `pointer` (string, optional) ### ForbiddenErrorsItemsSource - `pointer` (string, optional) ### NotFoundErrorsItemsSource - `pointer` (string, optional) ### ConflictErrorsItemsSource - `pointer` (string, optional) ### UnprocessableContentErrorsItemsSource - `pointer` (string, optional) ### TooManyRequestsErrorsItemsSource - `pointer` (string, optional) ## Examples **Request** ```json { "data": { "target_file_id": "2e426fe0-f965-4594-8b2b-b4dff1dc00ec", "move_to": "top" } } ``` **Response** ```json { "data": [ { "type": "file", "created_at": "2023-09-25T19:18:29.614189Z", "file_size": 1137444, "id": "2e426fe0-f965-4594-8b2b-b4dff1dc00ec", "media_type": "image/png", "name": "asset.png", "parent_id": "0432fd43-58ac-4488-9e93-668dc5500615", "project_id": "376f481a-21de-4887-935c-94d234d91431", "status": "created", "updated_at": "2024-02-07T16:44:41.986478Z", "view_url": "https://next.frame.io/project/d5e6011c-2bc9-4596-be05-77d562627112/view/5a89a9fb-0900-4b23-826b-127b90e4db4c", "adobe_id": "urn:aaid:sc:US:a1b2c3d4-e5f6-7890-abcd-ef1234567890", "adobe_version_id": "2" }, { "type": "file", "created_at": "2023-09-25T19:18:29.614189Z", "file_size": 1137444, "id": "666f17d0-6678-44fc-b355-fc8dbd0780bc", "media_type": "image/png", "name": "asset.png", "parent_id": "0432fd43-58ac-4488-9e93-668dc5500615", "project_id": "376f481a-21de-4887-935c-94d234d91431", "status": "created", "updated_at": "2024-02-07T16:44:41.986478Z", "view_url": "https://next.frame.io/project/d5e6011c-2bc9-4596-be05-77d562627112/view/5a89a9fb-0900-4b23-826b-127b90e4db4c", "adobe_id": "urn:aaid:sc:US:a1b2c3d4-e5f6-7890-abcd-ef1234567890", "adobe_version_id": "2" } ] } ``` **SDK Code** ```python import requests url = "https://api.frame.io/v4/accounts/0abb1c8e-06b6-44c2-ad4c-bc9629e1ea1d/version_stacks/503f2ae6-2a3f-4abe-a42f-500045d5ac53/versions" payload = { "data": { "target_file_id": "2e426fe0-f965-4594-8b2b-b4dff1dc00ec", "move_to": "top" } } headers = { "api-version": "experimental", "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.patch(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.frame.io/v4/accounts/0abb1c8e-06b6-44c2-ad4c-bc9629e1ea1d/version_stacks/503f2ae6-2a3f-4abe-a42f-500045d5ac53/versions'; const options = { method: 'PATCH', headers: { 'api-version': 'experimental', Authorization: 'Bearer ', 'Content-Type': 'application/json' }, body: '{"data":{"target_file_id":"2e426fe0-f965-4594-8b2b-b4dff1dc00ec","move_to":"top"}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.frame.io/v4/accounts/0abb1c8e-06b6-44c2-ad4c-bc9629e1ea1d/version_stacks/503f2ae6-2a3f-4abe-a42f-500045d5ac53/versions" payload := strings.NewReader("{\n \"data\": {\n \"target_file_id\": \"2e426fe0-f965-4594-8b2b-b4dff1dc00ec\",\n \"move_to\": \"top\"\n }\n}") req, _ := http.NewRequest("PATCH", url, payload) req.Header.Add("api-version", "experimental") req.Header.Add("Authorization", "Bearer ") 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 require 'uri' require 'net/http' url = URI("https://api.frame.io/v4/accounts/0abb1c8e-06b6-44c2-ad4c-bc9629e1ea1d/version_stacks/503f2ae6-2a3f-4abe-a42f-500045d5ac53/versions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Patch.new(url) request["api-version"] = 'experimental' request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"data\": {\n \"target_file_id\": \"2e426fe0-f965-4594-8b2b-b4dff1dc00ec\",\n \"move_to\": \"top\"\n }\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.patch("https://api.frame.io/v4/accounts/0abb1c8e-06b6-44c2-ad4c-bc9629e1ea1d/version_stacks/503f2ae6-2a3f-4abe-a42f-500045d5ac53/versions") .header("api-version", "experimental") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"data\": {\n \"target_file_id\": \"2e426fe0-f965-4594-8b2b-b4dff1dc00ec\",\n \"move_to\": \"top\"\n }\n}") .asString(); ``` ```php request('PATCH', 'https://api.frame.io/v4/accounts/0abb1c8e-06b6-44c2-ad4c-bc9629e1ea1d/version_stacks/503f2ae6-2a3f-4abe-a42f-500045d5ac53/versions', [ 'body' => '{ "data": { "target_file_id": "2e426fe0-f965-4594-8b2b-b4dff1dc00ec", "move_to": "top" } }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', 'api-version' => 'experimental', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.frame.io/v4/accounts/0abb1c8e-06b6-44c2-ad4c-bc9629e1ea1d/version_stacks/503f2ae6-2a3f-4abe-a42f-500045d5ac53/versions"); var request = new RestRequest(Method.PATCH); request.AddHeader("api-version", "experimental"); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"data\": {\n \"target_file_id\": \"2e426fe0-f965-4594-8b2b-b4dff1dc00ec\",\n \"move_to\": \"top\"\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "api-version": "experimental", "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = ["data": [ "target_file_id": "2e426fe0-f965-4594-8b2b-b4dff1dc00ec", "move_to": "top" ]] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v4/accounts/0abb1c8e-06b6-44c2-ad4c-bc9629e1ea1d/version_stacks/503f2ae6-2a3f-4abe-a42f-500045d5ac53/versions")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PATCH" 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() ```