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/mockup-assets/8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8/thumbnails/thumb_720.webp",
"thumbnails": [
{
"url": "https://cdn.sudomock.com/mockup-assets/8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8/thumbnails/thumb_720.webp",
"width": 720
},
{
"url": "https://cdn.sudomock.com/mockup-assets/8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8/thumbnails/thumb_480.webp",
"width": 480
},
{
"url": "https://cdn.sudomock.com/mockup-assets/8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8/thumbnails/thumb_240.webp",
"width": 240
}
],
"uuid": "8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8",
"width": 4000
},
"message": "",
"success": true
}
{
"job_id": "5f1c0b2a-7d43-4e9a-8c16-0b5d3f7a2e94",
"kind": "upload",
"status": "queued",
"status_url": "/api/v1/jobs/5f1c0b2a-7d43-4e9a-8c16-0b5d3f7a2e94"
}
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/mockup-assets/8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8/thumbnails/thumb_720.webp",
"thumbnails": [
{
"url": "https://cdn.sudomock.com/mockup-assets/8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8/thumbnails/thumb_720.webp",
"width": 720
},
{
"url": "https://cdn.sudomock.com/mockup-assets/8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8/thumbnails/thumb_480.webp",
"width": 480
},
{
"url": "https://cdn.sudomock.com/mockup-assets/8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8/thumbnails/thumb_240.webp",
"width": 240
}
],
"uuid": "8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8",
"width": 4000
},
"message": "",
"success": true
}
{
"job_id": "5f1c0b2a-7d43-4e9a-8c16-0b5d3f7a2e94",
"kind": "upload",
"status": "queued",
"status_url": "/api/v1/jobs/5f1c0b2a-7d43-4e9a-8c16-0b5d3f7a2e94"
}
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/mockup-assets/8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8/thumbnails/thumb_720.webp",
"thumbnails": [
{
"url": "https://cdn.sudomock.com/mockup-assets/8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8/thumbnails/thumb_720.webp",
"width": 720
},
{
"url": "https://cdn.sudomock.com/mockup-assets/8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8/thumbnails/thumb_480.webp",
"width": 480
},
{
"url": "https://cdn.sudomock.com/mockup-assets/8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8/thumbnails/thumb_240.webp",
"width": 240
}
],
"uuid": "8f2c1d90-6b4e-4a37-9e55-0d1c7a3f21b8",
"width": 4000
},
"message": "",
"success": true
}
{
"job_id": "5f1c0b2a-7d43-4e9a-8c16-0b5d3f7a2e94",
"kind": "upload",
"status": "queued",
"status_url": "/api/v1/jobs/5f1c0b2a-7d43-4e9a-8c16-0b5d3f7a2e94"
}
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.
Response data
Show child attributes
Show child attributes
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.
Show child attributes
Show child attributes
Was this page helpful?