Rename an organization asset or change its default status
curl --request PATCH \
--url https://api.trycarhub.com/v1/assets/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"is_default": true,
"supports_360": true,
"interior_background_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.trycarhub.com/v1/assets/{id}"
payload = {
"name": "<string>",
"is_default": True,
"supports_360": True,
"interior_background_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
is_default: true,
supports_360: true,
interior_background_asset_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.trycarhub.com/v1/assets/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.trycarhub.com/v1/assets/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'is_default' => true,
'supports_360' => true,
'interior_background_asset_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.trycarhub.com/v1/assets/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"is_default\": true,\n \"supports_360\": true,\n \"interior_background_asset_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("PATCH", 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(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.trycarhub.com/v1/assets/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"is_default\": true,\n \"supports_360\": true,\n \"interior_background_asset_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trycarhub.com/v1/assets/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"is_default\": true,\n \"supports_360\": true,\n \"interior_background_asset_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object": "asset",
"category": "background",
"kind": "background",
"name": "<string>",
"content_type": "<string>",
"size_bytes": 1,
"total_size_bytes": 1,
"state": "available",
"created": 1755300000,
"public_asset": true,
"is_default": true,
"banner_placement": "top",
"supports_360": true,
"interior_background_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"link": "<string>",
"download_url": "<string>",
"files": [
{
"path": "<string>",
"size_bytes": 1,
"download_url": "<string>"
}
]
}Assets
Rename an organization asset or change its default status
Requires assets:write. Public CarHub assets are read-only. Setting a default replaces the previous default of the same category for your organization. Published files cannot be replaced; upload a new asset instead.
PATCH
/
v1
/
assets
/
{id}
Rename an organization asset or change its default status
curl --request PATCH \
--url https://api.trycarhub.com/v1/assets/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"is_default": true,
"supports_360": true,
"interior_background_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.trycarhub.com/v1/assets/{id}"
payload = {
"name": "<string>",
"is_default": True,
"supports_360": True,
"interior_background_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
is_default: true,
supports_360: true,
interior_background_asset_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.trycarhub.com/v1/assets/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.trycarhub.com/v1/assets/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'is_default' => true,
'supports_360' => true,
'interior_background_asset_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.trycarhub.com/v1/assets/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"is_default\": true,\n \"supports_360\": true,\n \"interior_background_asset_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("PATCH", 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(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.trycarhub.com/v1/assets/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"is_default\": true,\n \"supports_360\": true,\n \"interior_background_asset_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trycarhub.com/v1/assets/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"is_default\": true,\n \"supports_360\": true,\n \"interior_background_asset_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object": "asset",
"category": "background",
"kind": "background",
"name": "<string>",
"content_type": "<string>",
"size_bytes": 1,
"total_size_bytes": 1,
"state": "available",
"created": 1755300000,
"public_asset": true,
"is_default": true,
"banner_placement": "top",
"supports_360": true,
"interior_background_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"link": "<string>",
"download_url": "<string>",
"files": [
{
"path": "<string>",
"size_bytes": 1,
"download_url": "<string>"
}
]
}Authorizations
Body
application/json
Response
Updated asset.
Permanent organization or public CarHub asset. Scene size includes all layers and YAML. Only available assets have signed links and support new jobs.