const response = await fetch("https://api.sudomock.com/api/v1/fonts", {
method: "POST",
headers: {
"x-api-key": "sm_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}),
});
const data = await response.json();
console.log(data);
<?php
$payload = <<<'JSON'
{
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}
JSON;
$ch = curl_init("https://api.sudomock.com/api/v1/fonts");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"x-api-key: sm_your_api_key",
"Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests
payload = {
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}
response = requests.post(
"https://api.sudomock.com/api/v1/fonts",
headers={"x-api-key": "sm_your_api_key"},
json=payload,
)
response.raise_for_status()
print(response.json())
require "net/http"
require "uri"
uri = URI("https://api.sudomock.com/api/v1/fonts")
request = Net::HTTP::Post.new(uri)
request["x-api-key"] = "sm_your_api_key"
request["Content-Type"] = "application/json"
request.body = <<~JSON
{
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}
JSON
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.body
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}`)
req, err := http.NewRequest("POST", "https://api.sudomock.com/api/v1/fonts", bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
req.Header.Set("x-api-key", "sm_your_api_key")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String payload = """
{
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sudomock.com/api/v1/fonts"))
.header("x-api-key", "sm_your_api_key")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
using System.Net.Http;
using System.Text;
var payload = """
{
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}
""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.sudomock.com/api/v1/fonts");
request.Headers.Add("x-api-key", "sm_your_api_key");
request.Content = new StringContent(payload, Encoding.UTF8, "application/json");
var client = new HttpClient();
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
curl -X POST "https://api.sudomock.com/api/v1/fonts" \
-H "x-api-key: sm_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}'
{
"category": "sans-serif",
"created_at": "2026-07-13T00:00:00+00:00",
"family": "Open Sans",
"file_url": "https://cdn.sudomock.com/mockup-assets/fonts/web/9f1c2d3e-4a5b-6c7d-8e9f-0a1b2c3d4e5f.woff2",
"is_premium": false,
"is_system": true,
"license": "OFL",
"postscript_name": "OpenSans-Regular",
"subfamily": "Regular",
"uuid": "9f1c2d3e-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
"preview_url": null
}
Create a new font
Upload a custom TTF or OTF font (Pro plan and above). Send either a multipart ‘file’ or a JSON body with a public ‘url’. The font is validated and security-checked before it is stored.
const response = await fetch("https://api.sudomock.com/api/v1/fonts", {
method: "POST",
headers: {
"x-api-key": "sm_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}),
});
const data = await response.json();
console.log(data);
<?php
$payload = <<<'JSON'
{
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}
JSON;
$ch = curl_init("https://api.sudomock.com/api/v1/fonts");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"x-api-key: sm_your_api_key",
"Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests
payload = {
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}
response = requests.post(
"https://api.sudomock.com/api/v1/fonts",
headers={"x-api-key": "sm_your_api_key"},
json=payload,
)
response.raise_for_status()
print(response.json())
require "net/http"
require "uri"
uri = URI("https://api.sudomock.com/api/v1/fonts")
request = Net::HTTP::Post.new(uri)
request["x-api-key"] = "sm_your_api_key"
request["Content-Type"] = "application/json"
request.body = <<~JSON
{
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}
JSON
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.body
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}`)
req, err := http.NewRequest("POST", "https://api.sudomock.com/api/v1/fonts", bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
req.Header.Set("x-api-key", "sm_your_api_key")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String payload = """
{
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sudomock.com/api/v1/fonts"))
.header("x-api-key", "sm_your_api_key")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
using System.Net.Http;
using System.Text;
var payload = """
{
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}
""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.sudomock.com/api/v1/fonts");
request.Headers.Add("x-api-key", "sm_your_api_key");
request.Content = new StringContent(payload, Encoding.UTF8, "application/json");
var client = new HttpClient();
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
curl -X POST "https://api.sudomock.com/api/v1/fonts" \
-H "x-api-key: sm_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}'
{
"category": "sans-serif",
"created_at": "2026-07-13T00:00:00+00:00",
"family": "Open Sans",
"file_url": "https://cdn.sudomock.com/mockup-assets/fonts/web/9f1c2d3e-4a5b-6c7d-8e9f-0a1b2c3d4e5f.woff2",
"is_premium": false,
"is_system": true,
"license": "OFL",
"postscript_name": "OpenSans-Regular",
"subfamily": "Regular",
"uuid": "9f1c2d3e-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
"preview_url": null
}
const response = await fetch("https://api.sudomock.com/api/v1/fonts", {
method: "POST",
headers: {
"x-api-key": "sm_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}),
});
const data = await response.json();
console.log(data);
<?php
$payload = <<<'JSON'
{
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}
JSON;
$ch = curl_init("https://api.sudomock.com/api/v1/fonts");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"x-api-key: sm_your_api_key",
"Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests
payload = {
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}
response = requests.post(
"https://api.sudomock.com/api/v1/fonts",
headers={"x-api-key": "sm_your_api_key"},
json=payload,
)
response.raise_for_status()
print(response.json())
require "net/http"
require "uri"
uri = URI("https://api.sudomock.com/api/v1/fonts")
request = Net::HTTP::Post.new(uri)
request["x-api-key"] = "sm_your_api_key"
request["Content-Type"] = "application/json"
request.body = <<~JSON
{
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}
JSON
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.body
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}`)
req, err := http.NewRequest("POST", "https://api.sudomock.com/api/v1/fonts", bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
req.Header.Set("x-api-key", "sm_your_api_key")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String payload = """
{
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sudomock.com/api/v1/fonts"))
.header("x-api-key", "sm_your_api_key")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
using System.Net.Http;
using System.Text;
var payload = """
{
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}
""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.sudomock.com/api/v1/fonts");
request.Headers.Add("x-api-key", "sm_your_api_key");
request.Content = new StringContent(payload, Encoding.UTF8, "application/json");
var client = new HttpClient();
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
curl -X POST "https://api.sudomock.com/api/v1/fonts" \
-H "x-api-key: sm_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/fonts/MyBrand-Bold.ttf"
}'
{
"category": "sans-serif",
"created_at": "2026-07-13T00:00:00+00:00",
"family": "Open Sans",
"file_url": "https://cdn.sudomock.com/mockup-assets/fonts/web/9f1c2d3e-4a5b-6c7d-8e9f-0a1b2c3d4e5f.woff2",
"is_premium": false,
"is_system": true,
"license": "OFL",
"postscript_name": "OpenSans-Regular",
"subfamily": "Regular",
"uuid": "9f1c2d3e-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
"preview_url": null
}
Authorizations
API key with sm_ prefix. Get your key at https://sudomock.com/dashboard/api-keys
Response
Successful Response
A single font in the catalog: a shared system font, or one of the caller's own uploaded fonts.
Font id
"7f3a2b1c-9d4e-4a6f-b8c2-1e5d7a0c3f94"
Font family name, e.g. 'Open Sans'
"Open Sans"
PostScript name, the stable key used to reference this font when rendering text layers
"OpenSans-Regular"
True for the shared system catalog, False for a font you uploaded
true
Style within the family, e.g. 'Bold Italic'
"Regular"
Catalog category, e.g. 'sans-serif', 'serif', 'display'
"sans-serif"
License identifier (system fonts)
"OFL"
Whether this is a premium catalog font
Legacy rendered preview image, when available; new catalog entries no longer include one (use file_url for live previews)
URL of the web-optimized WOFF2 file for live @font-face preview: a public CDN URL for system fonts, a short-lived link for your own uploads. Null for premium fonts; the original TTF/OTF source is never exposed.
"https://cdn.sudomock.com/mockup-assets/fonts/web/7f3a2b1c-9d4e-4a6f-b8c2-1e5d7a0c3f94.woff2"
When the font was added
"2026-07-13T09:14:22+00:00"
Was this page helpful?