API Reference Get Brand Asset
Get Brand Asset
Serve an uploaded logo or favicon. Public, cached forever.
Serves a logo or favicon stored by Upload Brand Asset. These are the URLs your doc site and the dashboard load. No authentication required.
You don't build this URL yourself: use the url the upload returned.
Path Parameters
NameDescription
projectIdThe project ID.
fileThe stored file name: 12 hex characters of the content hash and the extension, such as
3f9a1c2b7d4e.svg. .svg, .png or .ico.Response
The image bytes, 200 OK, with these headers:
| Header | Value |
|---|---|
Content-Type | image/svg+xml, image/png or image/x-icon |
Cache-Control | public, max-age=31536000, immutable — the name is the content hash, so the file never changes |
X-Content-Type-Options | nosniff |
Content-Security-Policy | default-src 'none'; style-src 'unsafe-inline'; sandbox — an SVG opened directly can't run anything |
Error Responses
| Status | Code | When |
|---|---|---|
| 404 | not_found | No such file for this project, or the name isn't in the stored form |
Related
Was this page helpful? Yes No
Previous
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl -O https://api.syntext.dev/v1/brand-assets/b4c5d6e7-f8a9-4b0c-9d1e-2f3a4b5c6d7e/3f9a1c2b7d4e.svg
const response = await fetch('https://api.syntext.dev/v1/brand-assets/b4c5d6e7-f8a9-4b0c-9d1e-2f3a4b5c6d7e/3f9a1c2b7d4e.svg', {
method: 'GET',
});
const data = await response.json();
console.log(response.status, data);
import requests
url = "https://api.syntext.dev/v1/brand-assets/b4c5d6e7-f8a9-4b0c-9d1e-2f3a4b5c6d7e/3f9a1c2b7d4e.svg"
response = requests.get(url)
print(response.status_code)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.syntext.dev/v1/brand-assets/b4c5d6e7-f8a9-4b0c-9d1e-2f3a4b5c6d7e/3f9a1c2b7d4e.svg", nil)
if err != nil {
panic(err)
}
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println(res.Status)
fmt.Println(string(body))
}
require "net/http"
require "uri"
uri = URI("https://api.syntext.dev/v1/brand-assets/b4c5d6e7-f8a9-4b0c-9d1e-2f3a4b5c6d7e/3f9a1c2b7d4e.svg")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
request = Net::HTTP::Get.new(uri)
response = http.request(request)
puts response.code
puts response.body
<?php
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'https://api.syntext.dev/v1/brand-assets/b4c5d6e7-f8a9-4b0c-9d1e-2f3a4b5c6d7e/3f9a1c2b7d4e.svg',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
if ($response === false) {
throw new RuntimeException(curl_error($ch));
}
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
echo $status, PHP_EOL, $response, PHP_EOL;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.syntext.dev/v1/brand-assets/b4c5d6e7-f8a9-4b0c-9d1e-2f3a4b5c6d7e/3f9a1c2b7d4e.svg"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
using System.Net.Http;
using System.Text;
using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.syntext.dev/v1/brand-assets/b4c5d6e7-f8a9-4b0c-9d1e-2f3a4b5c6d7e/3f9a1c2b7d4e.svg");
using var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());