const response = await fetch("https://api.sudomock.com/api/v1/psd/upload", {
method: "POST",
headers: {
"x-api-key": "sm_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}),
});
const data = await response.json();
console.log(data);
<?php
$payload = <<<'JSON'
{
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}
JSON;
$ch = curl_init("https://api.sudomock.com/api/v1/psd/upload");
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 = {
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}
response = requests.post(
"https://api.sudomock.com/api/v1/psd/upload",
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/psd/upload")
request = Net::HTTP::Post.new(uri)
request["x-api-key"] = "sm_your_api_key"
request["Content-Type"] = "application/json"
request.body = <<~JSON
{
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}
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(`{
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}`)
req, err := http.NewRequest("POST", "https://api.sudomock.com/api/v1/psd/upload", 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 = """
{
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sudomock.com/api/v1/psd/upload"))
.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 = """
{
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}
""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.sudomock.com/api/v1/psd/upload");
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/psd/upload" \
-H "x-api-key: sm_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}'
{
"data": {
"collections": [],
"group_layers": [],
"height": 5000,
"name": "Heavyweight tee front",
"smart_objects": [
{
"blend_mode": "multiply",
"layer_name": "Front print",
"name": "Front print",
"position": {
"height": 3413,
"width": 3000,
"x": 512,
"y": 730
},
"print_area_presets": [
{
"name": "Default",
"position": {
"height": 3413,
"width": 3000,
"x": 0,
"y": 0
},
"size": {
"height": 3413,
"width": 3000
},
"thumbnails": [],
"uuid": "d07f5b18-2c94-4e83-a6b1-95f3c8e27a40"
}
],
"quad": [
[
512.0,
742.0
],
[
3512.0,
730.0
],
[
3499.0,
4143.0
],
[
524.0,
4131.0
]
],
"size": {
"height": 3413,
"width": 3000
},
"uuid": "b41a7e52-93c8-4d61-8f07-2ae5c9d04713"
}
],
"text_layers": [],
"thumbnail": "https://cdn.sudomock.com/thumbnails/8f2c1d90_720.webp",
"thumbnails": [
{
"url": "https://cdn.sudomock.com/thumbnails/8f2c1d90_720.webp",
"width": 720
},
{
"url": "https://cdn.sudomock.com/thumbnails/8f2c1d90_480.webp",
"width": 480
},
{
"url": "https://cdn.sudomock.com/thumbnails/8f2c1d90_240.webp",
"width": 240
}
],
"uuid": "8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8",
"width": 4000
},
"message": "",
"success": true
}
Create a mockup from a PSD
Ingests a PSD file from URL, extracts layers and smart objects, generates thumbnails.
const response = await fetch("https://api.sudomock.com/api/v1/psd/upload", {
method: "POST",
headers: {
"x-api-key": "sm_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}),
});
const data = await response.json();
console.log(data);
<?php
$payload = <<<'JSON'
{
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}
JSON;
$ch = curl_init("https://api.sudomock.com/api/v1/psd/upload");
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 = {
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}
response = requests.post(
"https://api.sudomock.com/api/v1/psd/upload",
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/psd/upload")
request = Net::HTTP::Post.new(uri)
request["x-api-key"] = "sm_your_api_key"
request["Content-Type"] = "application/json"
request.body = <<~JSON
{
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}
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(`{
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}`)
req, err := http.NewRequest("POST", "https://api.sudomock.com/api/v1/psd/upload", 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 = """
{
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sudomock.com/api/v1/psd/upload"))
.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 = """
{
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}
""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.sudomock.com/api/v1/psd/upload");
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/psd/upload" \
-H "x-api-key: sm_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}'
{
"data": {
"collections": [],
"group_layers": [],
"height": 5000,
"name": "Heavyweight tee front",
"smart_objects": [
{
"blend_mode": "multiply",
"layer_name": "Front print",
"name": "Front print",
"position": {
"height": 3413,
"width": 3000,
"x": 512,
"y": 730
},
"print_area_presets": [
{
"name": "Default",
"position": {
"height": 3413,
"width": 3000,
"x": 0,
"y": 0
},
"size": {
"height": 3413,
"width": 3000
},
"thumbnails": [],
"uuid": "d07f5b18-2c94-4e83-a6b1-95f3c8e27a40"
}
],
"quad": [
[
512.0,
742.0
],
[
3512.0,
730.0
],
[
3499.0,
4143.0
],
[
524.0,
4131.0
]
],
"size": {
"height": 3413,
"width": 3000
},
"uuid": "b41a7e52-93c8-4d61-8f07-2ae5c9d04713"
}
],
"text_layers": [],
"thumbnail": "https://cdn.sudomock.com/thumbnails/8f2c1d90_720.webp",
"thumbnails": [
{
"url": "https://cdn.sudomock.com/thumbnails/8f2c1d90_720.webp",
"width": 720
},
{
"url": "https://cdn.sudomock.com/thumbnails/8f2c1d90_480.webp",
"width": 480
},
{
"url": "https://cdn.sudomock.com/thumbnails/8f2c1d90_240.webp",
"width": 240
}
],
"uuid": "8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8",
"width": 4000
},
"message": "",
"success": true
}
const response = await fetch("https://api.sudomock.com/api/v1/psd/upload", {
method: "POST",
headers: {
"x-api-key": "sm_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}),
});
const data = await response.json();
console.log(data);
<?php
$payload = <<<'JSON'
{
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}
JSON;
$ch = curl_init("https://api.sudomock.com/api/v1/psd/upload");
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 = {
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}
response = requests.post(
"https://api.sudomock.com/api/v1/psd/upload",
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/psd/upload")
request = Net::HTTP::Post.new(uri)
request["x-api-key"] = "sm_your_api_key"
request["Content-Type"] = "application/json"
request.body = <<~JSON
{
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}
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(`{
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}`)
req, err := http.NewRequest("POST", "https://api.sudomock.com/api/v1/psd/upload", 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 = """
{
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sudomock.com/api/v1/psd/upload"))
.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 = """
{
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}
""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.sudomock.com/api/v1/psd/upload");
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/psd/upload" \
-H "x-api-key: sm_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"psd_file_url": "https://example.com/heavyweight-tee.psd",
"psd_name": "Heavyweight tee front"
}'
{
"data": {
"collections": [],
"group_layers": [],
"height": 5000,
"name": "Heavyweight tee front",
"smart_objects": [
{
"blend_mode": "multiply",
"layer_name": "Front print",
"name": "Front print",
"position": {
"height": 3413,
"width": 3000,
"x": 512,
"y": 730
},
"print_area_presets": [
{
"name": "Default",
"position": {
"height": 3413,
"width": 3000,
"x": 0,
"y": 0
},
"size": {
"height": 3413,
"width": 3000
},
"thumbnails": [],
"uuid": "d07f5b18-2c94-4e83-a6b1-95f3c8e27a40"
}
],
"quad": [
[
512.0,
742.0
],
[
3512.0,
730.0
],
[
3499.0,
4143.0
],
[
524.0,
4131.0
]
],
"size": {
"height": 3413,
"width": 3000
},
"uuid": "b41a7e52-93c8-4d61-8f07-2ae5c9d04713"
}
],
"text_layers": [],
"thumbnail": "https://cdn.sudomock.com/thumbnails/8f2c1d90_720.webp",
"thumbnails": [
{
"url": "https://cdn.sudomock.com/thumbnails/8f2c1d90_720.webp",
"width": 720
},
{
"url": "https://cdn.sudomock.com/thumbnails/8f2c1d90_480.webp",
"width": 480
},
{
"url": "https://cdn.sudomock.com/thumbnails/8f2c1d90_240.webp",
"width": 240
}
],
"uuid": "8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8",
"width": 4000
},
"message": "",
"success": true
}
Authorizations
API key with sm_ prefix. Get your key at https://sudomock.com/dashboard/api-keys
Body
The PSD to ingest and what to call it.
URL to the PSD file to upload. HTTP/HTTPS URLs only. Supports up to Adobe's official PSD file size limit, 300s download timeout.
1"https://example.com/heavyweight-tee.psd"
Name for the mockup template (auto-generated if not provided)
255"Heavyweight tee front"
If true, the upload is QUEUED and the call returns 202 immediately with a job_id (poll GET /api/v1/jobs/{job_id}, or receive a webhook if one is configured); result_url carries the new mockup_uuid on success. If false (default), the upload runs synchronously and returns the mockup.
Response
Successful Response
The ingested mockup with every layer you can address in a render. specification
Response data
Hide child attributes
Hide child attributes
Unique identifier for the mockup
"8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8"
Name of the mockup
"Heavyweight tee front"
List of smart objects in the PSD
Hide child attributes
Hide child attributes
Unique identifier for the smart object
"b41a7e52-93c8-4d61-8f07-2ae5c9d04713"
Display name of the smart object
"Front print"
Position coordinates (x, y, width, height)
Hide child attributes
Hide child attributes
Position on PSD canvas in pixels (top-left origin).
Position on PSD canvas in pixels (top-left origin).
Width in pixels
Height in pixels
Print area preset configurations
Hide child attributes
Hide child attributes
Unique identifier for the preset
"d07f5b18-2c94-4e83-a6b1-95f3c8e27a40"
Name of the preset (e.g., 'Default')
"Default"
Position relative to smart object (x, y, width, height)
Hide child attributes
Hide child attributes
Position on PSD canvas in pixels (top-left origin).
Position on PSD canvas in pixels (top-left origin).
Width in pixels
Height in pixels
Original PSD layer name
"Front print"
Four display coordinates for the editable area. Only available on Scale tier plans (null on Free/Starter/Pro).
[ [512, 742], [3512, 730], [3499, 4143], [524, 4131] ]
The blend mode this smart object layer carries in the PSD, lowercase (e.g. 'normal', 'multiply', 'soft_light'). Null in the mockup list; request a single mockup to read it.
"multiply"
Number of PSD layers this input drives (smart object instancing); null/1 = single layer
3
Main thumbnail URL (720px width). Empty string if generation failed.
"https://cdn.sudomock.com/mockup-assets/8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8/thumbnails/thumb_720.webp"
Always populated after successful upload. Represents original PSD canvas width in pixels.
4000
Always populated after successful upload. Represents original PSD canvas height in pixels.
5000
Text layers detected in the PSD. Editable layers accept text replacement at render time.
Hide child attributes
Hide child attributes
Unique identifier for the text layer
"c7d41f6a-2b58-4e93-9a10-6f83b2c5d417"
Name of the text layer
"Brand name"
Current text content of the layer
"SUMMER CLUB"
PostScript name of the font used by this layer
"Montserrat-Bold"
Effective font size in pixels at the PSD's native resolution
120
Text color as hex (e.g. #FFFFFF)
"#FFFFFF"
Whether the layer's font is available for editable rendering. When false, edits render with a default font unless a font is supplied.
Whether this layer's text can be replaced at render time
Number of styled segments in this layer. 1 = single-style (edit with 'text'); 2+ = styled segments (edit with 'segments', each segment keeps its own styling)
The layer's styled segments, present when segment_count > 1. Override any subset by index at render time; omitted segments keep their original text.
Hide child attributes
Hide child attributes
Stable segment position within the layer (0-based)
The segment's current text
PostScript name of the segment's font
Segment font size in pixels at the PSD's native resolution
Segment text color as hex (e.g. #FFFFFF)
Whether the layer is shown by default in the source file. A hidden layer can still be targeted; its text then renders. Null when unknown (older mockups).
Whether this text layer has at least one outline of its own.
Number of outlines owned by this text layer, in front-to-back stroke_color order.
Whether the layer's visible color comes from a color effect. When true, a color override changes that effect's color.
Whether some content in the design is clipped to this layer's letters. When true, replacing this text also re-shapes that clipped content to the new letters. Null when it could not be determined for this mockup.
UUIDs of other text layers that carry the same text stacked with this one, such as a fill plus an outline copy. Sending the same replacement text to all of them keeps the design consistent. Advisory only: each layer is still edited on its own by UUID, never linked automatically. Null when it could not be determined.
["a2f9c481-30d7-4b6e-8c52-1d9e7f34ab60"]
UUIDs of enclosing group layers whose outlines also affect this text layer, nearest first. Advisory only: each group is edited separately through group_layers. Null when it could not be determined.
["5e8b0c72-9a41-4d36-b7f8-2c60d1e94537"]
Group layers whose outlines can be recolored. Changing a group outline affects everything inside that group; groups not listed keep their authored effects.
Hide child attributes
Hide child attributes
Unique identifier for the group layer
"5e8b0c72-9a41-4d36-b7f8-2c60d1e94537"
Name of the group layer
"Outlined logo"
Number of outlines owned by this group, in front-to-back stroke_color order
x >= 12
Whether the group has at least one outline of its own
Reserved for future use. Currently always empty.
Success status
Optional message about the operation
Non-fatal advisories about this upload (e.g. hidden smart object layers that are not exposed for personalization). Omitted when none.
Was this page helpful?