curl --request PATCH \
--url https://api.tastelabs.com/design/submissions/{id}/visibility \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"is_public": true
}
'import requests
url = "https://api.tastelabs.com/design/submissions/{id}/visibility"
payload = { "is_public": True }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({is_public: true})
};
fetch('https://api.tastelabs.com/design/submissions/{id}/visibility', 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.tastelabs.com/design/submissions/{id}/visibility",
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([
'is_public' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.tastelabs.com/design/submissions/{id}/visibility"
payload := strings.NewReader("{\n \"is_public\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.tastelabs.com/design/submissions/{id}/visibility")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"is_public\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tastelabs.com/design/submissions/{id}/visibility")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_public\": true\n}"
response = http.request(request)
puts response.read_body{
"submission_id": "<string>",
"status": "accepted",
"source_url": "<string>",
"is_public": true,
"current_step": "<string>",
"step_started_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"cache_hit": true,
"extraction_id": "<string>",
"accepted_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"credits_consumed": 123,
"credit_ref_id": "<string>",
"api_key_name": "<string>",
"batch_id": "<string>",
"batch_label": "<string>",
"sections": [
"colors",
"typography"
],
"kind": "website"
}{
"detail": {
"error": "UNAUTHORIZED",
"message": "Bearer token or X-API-Key required"
}
}{
"detail": {
"error": "FORBIDDEN",
"message": "This key is not allowed to call this endpoint."
}
}{
"detail": {
"error": "NOT_FOUND",
"message": "Submission not found"
}
}{
"detail": [
{
"loc": [
"body",
"url"
],
"msg": "Field required",
"type": "missing"
}
]
}Internal Server ErrorUpdate visibility
Toggles whether a submission’s result is public. Public results can be read from GET /submissions/{id}/result without authentication. Only the owner of the submission can change its visibility.
curl --request PATCH \
--url https://api.tastelabs.com/design/submissions/{id}/visibility \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"is_public": true
}
'import requests
url = "https://api.tastelabs.com/design/submissions/{id}/visibility"
payload = { "is_public": True }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({is_public: true})
};
fetch('https://api.tastelabs.com/design/submissions/{id}/visibility', 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.tastelabs.com/design/submissions/{id}/visibility",
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([
'is_public' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.tastelabs.com/design/submissions/{id}/visibility"
payload := strings.NewReader("{\n \"is_public\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.tastelabs.com/design/submissions/{id}/visibility")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"is_public\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tastelabs.com/design/submissions/{id}/visibility")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_public\": true\n}"
response = http.request(request)
puts response.read_body{
"submission_id": "<string>",
"status": "accepted",
"source_url": "<string>",
"is_public": true,
"current_step": "<string>",
"step_started_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"cache_hit": true,
"extraction_id": "<string>",
"accepted_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"credits_consumed": 123,
"credit_ref_id": "<string>",
"api_key_name": "<string>",
"batch_id": "<string>",
"batch_label": "<string>",
"sections": [
"colors",
"typography"
],
"kind": "website"
}{
"detail": {
"error": "UNAUTHORIZED",
"message": "Bearer token or X-API-Key required"
}
}{
"detail": {
"error": "FORBIDDEN",
"message": "This key is not allowed to call this endpoint."
}
}{
"detail": {
"error": "NOT_FOUND",
"message": "Submission not found"
}
}{
"detail": [
{
"loc": [
"body",
"url"
],
"msg": "Field required",
"type": "missing"
}
]
}Internal Server ErrorAuthorizations
API key issued by the Taste Engine. Create one in the dashboard at https://engine.tastelabs.com/app/api-keys.
Path Parameters
The submission_id returned when the submission was created.
Body
Set to true to make the result publicly readable, false to make it private.
Response
The updated submission status view.
Status view of a single submission.
Lifecycle status of a submission.
accepted, queued, crawling, extracting, completed, failed Whether the result is publicly readable.
Name of the step currently running.
Whether the result was served from cache. When true, completed_at reflects the original extraction, not this request.
When the extraction completed: the freshness of the result. On a cache hit (cache_hit is true) this is the original extraction, not the current request, so it may predate this request. null while the submission is still running.
Error message when status is failed.
Net credits this submission consumed. null when metering was off, and 0 once a failed submission has been refunded.
Reference to the credit charge for this submission.
Name of the API key that created the submission. null for dashboard submissions and when metering was off at submission time.
Identifier of the batch run this submission belongs to.
Human-readable label for the batch run.
The original extraction selection, with duplicates removed. Null identifies a full extraction. This value is unchanged by GET result filtering. Completed selective results contain only the requested sections and are never eligible cache sources.
A top-level section of result.design_system. Use in the submission body to select extraction work, or in the result query to filter an existing result. The value "sections" means descriptions of the page sections in order.
profile, layout, colors, typography, surfaces, elevation, interactions, actions, navigation, data_display, structure, icons, assets, sections, brand_assets ["colors", "typography"]
website for a URL extraction, brand_kit for a brand guidelines PDF.
website, brand_kit Was this page helpful?

