> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://next.developer.frame.io/platform/v2/api-reference/assets/add-version-to-asset/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://next.developer.frame.io/_mcp/server. # Version an Asset POST https://api.frame.io/v2/assets/{asset_id}/version Content-Type: application/json Add an asset to a version stack, or create one if one doesn't already exist Reference: https://next.developer.frame.io/platform/v2/api-reference/assets/add-version-to-asset ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `asset_id` (string, required) ### Body (application/json) This endpoint expects an object. - `next_asset_id` (string, required) ## Response ### 200 Asset success response - `Asset` ## 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 ### Asset0 - `` (string, optional) ### HttpErrorErrorsItems - `code` (integer, optional) - `detail` (string, optional) - `status` (integer, optional) - `title` (string, optional) ## Examples **Request** ```json { "next_asset_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ``` **Response** ```json { "account_id": "7b9f1c2e-4d3a-4f8b-9a1e-2d5f6a7b8c9d", "archive_from": "2024-01-15T09:30:00Z", "archive_scheduled_at": "2024-01-15T09:30:00Z", "archive_status": "scheduled", "archived_at": "2024-01-15T09:30:00Z", "asset_type": "document", "bundle": true, "bundle_view": "detailed", "cover_asset_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d", "creator": { "_type": "user", "account_id": "7b9f1c2e-4d3a-4f8b-9a1e-2d5f6a7b8c9d", "avatar_color": "#4A90E2", "digest_frequency": "weekly", "email": "jane.doe@example.com", "first_login_at": "2022-05-15T09:00:00Z", "from_adobe": true, "from_google": true, "highest_account_role": "admin", "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "image_128": "https://cdn.frame.io/images/users/128/user123.png", "image_256": "https://cdn.frame.io/images/users/256/user123.png", "image_32": "https://cdn.frame.io/images/users/32/user123.png", "image_64": "https://cdn.frame.io/images/users/64/user123.png", "inserted_at": "2022-05-15T09:00:00Z", "integrations": [ "slack", "dropbox" ], "joined_via": "google_oauth", "last_seen": "2024-04-15T18:30:00Z", "mfa_enforced_at": "2023-12-01T08:00:00Z", "name": "Jane Doe", "next_digest_date": "2024-04-20T09:00:00Z", "profile_image": "https://cdn.frame.io/images/users/profile/user123.png", "roles": { "admin": true, "id": "role-1234", "sales": true, "service_desk": false, "support": true }, "timezone_value": "America/New_York", "updated_at": "2024-04-10T12:00:00Z", "upload_url": "https://upload.frame.io/user123", "user_default_color": "#FF5733", "user_hash": "abc123def456ghi789" }, "frames": 2400, "hard_deleted_at": "2024-02-14T09:30:00Z", "id": "9f8e7d6c-5b4a-3c2d-1e0f-9a8b7c6d5e4f", "index": 12.5, "is_bundle_child": false, "is_hls_required": true, "is_session_watermarked": true, "item_count": 5, "label": "approved", "metadata": {}, "metadata_flags": { "id": "4c3b2a19-8d7e-6f5a-4b3c-2d1e0f9a8b7c", "is_360": false, "is_hdr": true, "is_original_player_compatible": true }, "name": "Project Proposal Document.pdf", "original": "https://cdn.frame.io/assets/9f8e7d6c-5b4a-3c2d-1e0f-9a8b7c6d5e4f/original.pdf", "parent_asset_id": "2a3b4c5d-6e7f-8a9b-0c1d-2e3f4a5b6c7d", "project_id": "5d6e7f8a-9b0c-1d2e-3f4a-5b6c7d8e9f0a", "properties": { "": "Confidential" }, "required_transcodes": { "cover": true, "finalized": [ "thumb", "image_full", "h264_720" ], "h264_1080_best": true, "h264_2160": false, "h264_360": true, "h264_540": true, "h264_720": true, "image_full": true, "image_high": true, "page_proxy": true, "thumb": true, "thumb_540": false, "thumb_orig_ar_540": false, "thumb_scrub": true }, "team_id": "8a9b0c1d-2e3f-4a5b-6c7d-8e9f0a1b2c3d", "type": "file", "user_permissions": { "can_download": true, "can_modify_template": false, "can_public_share_presentation": true, "can_public_share_review_link": true, "can_share_downloadable_presentation": false, "can_share_downloadable_review_link": true, "can_share_unwatermarked_presentation": false, "can_share_unwatermarked_review_link": true }, "view_count": 152 } ``` **SDK Code** ```python import requests url = "https://api.frame.io/v2/assets/asset_id/version" payload = { "next_asset_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.frame.io/v2/assets/asset_id/version'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"next_asset_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}' }; 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/v2/assets/asset_id/version" payload := strings.NewReader("{\n \"next_asset_id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n}") req, _ := http.NewRequest("POST", url, payload) 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/v2/assets/asset_id/version") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"next_asset_id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\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.post("https://api.frame.io/v2/assets/asset_id/version") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"next_asset_id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n}") .asString(); ``` ```php request('POST', 'https://api.frame.io/v2/assets/asset_id/version', [ 'body' => '{ "next_asset_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.frame.io/v2/assets/asset_id/version"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"next_asset_id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = ["next_asset_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v2/assets/asset_id/version")! 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() ```