SudoMock
GET

Get Mockup Detail

Retrieve detailed information about a specific mockup template including all smart objects and metadata.

GET/api/v1/mockups/{uuid}

Request

Headers

x-api-keystringRequired

Your SudoMock API key starting with sm_

Path Parameters

uuidstringRequired

The unique identifier of the mockup. Returned from upload or list endpoints.

Code Examples

Get Mockup Detail
bash
1curl -X GET "https://api.sudomock.com/api/v1/mockups/abc123-def456-ghi789" \
2 -H "x-api-key: sm_your_api_key"

Response

Success Response

200OK
Response 200 OK
1{
2 "success": true,
3 "data": {
4 "uuid": "abc123-def456-ghi789",
5 "name": "Product Mockup",
6 "thumbnail": "https://cdn.sudomock.com/abc123/thumbnails/thumb_720.png",
7 "width": 3000,
8 "height": 2000,
9 "smart_objects": [
10 {
11 "uuid": "so-uuid-001",
12 "name": "Product Image",
13 "layer_name": "Product Image",
14 "size": { "width": 3000, "height": 3000 },
15 "position": { "x": 100, "y": 100, "width": 800, "height": 600 },
16 "quad": null,
17 "blend_mode": "normal",
18 "print_area_presets": [
19 {
20 "uuid": "preset-uuid-001",
21 "name": "Default",
22 "thumbnails": [],
23 "size": { "width": 3000, "height": 3000 },
24 "position": { "x": 0, "y": 0, "width": 3000, "height": 3000 }
25 }
26 ]
27 }
28 ],
29 "text_layers": [],
30 "collections": [],
31 "thumbnails": [
32 { "width": 720, "url": "https://cdn.sudomock.com/abc123/thumbnails/thumb_720.png" },
33 { "width": 480, "url": "https://cdn.sudomock.com/abc123/thumbnails/thumb_480.png" },
34 { "width": 240, "url": "https://cdn.sudomock.com/abc123/thumbnails/thumb_240.png" }
35 ]
36 },
37 "message": ""
38}

Response Fields

successbooleanRequired

Always true for successful responses.

messagestringRequired

Operation message. Empty string on success.

dataobjectRequired

Mockup data payload.

data.uuidstringRequired

Unique identifier for the mockup.

data.namestringRequired

Name of the mockup template.

data.thumbnailstring

URL to the mockup preview image (720px width). Empty string if generation failed.

data.widthinteger | null

Original PSD width in pixels.

data.heightinteger | null

Original PSD height in pixels.

data.smart_objectsarrayRequired

List of editable smart object layers.

data.smart_objects[].uuidstringRequired

UUID of the smart object. Use this when rendering.

data.smart_objects[].namestringRequired

Display name of the smart object.

data.smart_objects[].layer_namestring | null

Always the same value as name. Kept for backward compatibility.

data.smart_objects[].sizeobjectRequired

Original dimensions of the smart object content (width, height).

data.smart_objects[].positionobjectRequired

Position and size of the smart object on the canvas (x, y, width, height).

data.smart_objects[].quadarray | null

Four [x, y] coordinate pairs for perspective transform corners. Scale tier only; null on Free, Starter, and Pro tiers.

data.smart_objects[].blend_modestring | null

Currently always "normal". Reserved for future blend mode support.

data.smart_objects[].print_area_presetsarray

Predefined print area configurations for the smart object.

data.text_layersarray

Reserved for future use. Currently always an empty array.

data.collectionsarray

Reserved for future use. Currently always an empty array.

data.thumbnailsarray

Array of thumbnail URLs at different sizes (720px, 480px, 240px). Each entry has width (integer) and url (string).

Quad Data (Scale Tier Only)

The quad field contains four [x, y] coordinate pairs representing the perspective-transformed corners of the smart object. This is only available on the Scale plan. Free, Starter, and Pro users will always see null.

Error Responses

401Unauthorized
json
1{
2 "success": false,
3 "detail": "Invalid or missing API key"
4}
404Not Found
json
1{
2 "success": false,
3 "detail": "Mockup not found"
4}

This error occurs when the mockup doesn't exist or belongs to a different account.

429Too Many Requests
json
1{
2 "detail": "Rate limit exceeded. Try again in 30 seconds.",
3 "error": {
4 "type": "rate_limit_exceeded",
5 "code": "RATE_LIMIT_EXCEEDED",
6 "limit": 1000,
7 "remaining": 0,
8 "reset_seconds": 30,
9 "retry_after": 30,
10 "resource": "api"
11 }
12}

Includes Retry-After and RateLimit-* response headers.

500Internal Server Error
json
1{
2 "success": false,
3 "detail": "Internal error while getting mockup detail"
4}

Common Use Case

Use this endpoint to fetch mockup metadata before rendering. You'll need the smart object UUIDs to specify which layers to update:

Fetch Mockup then Render
1// 1. Get mockup details
2const mockup = await fetch(
3 "https://api.sudomock.com/api/v1/mockups/abc123",
4 { headers: { "x-api-key": apiKey } }
5).then(r => r.json());
6
7// 2. Extract smart object UUID
8const designArea = mockup.data.smart_objects.find(
9 so => so.name === "Design Area"
10);
11
12// 3. Render with your design
13const render = await fetch(
14 "https://api.sudomock.com/api/v1/renders",
15 {
16 method: "POST",
17 headers: {
18 "x-api-key": apiKey,
19 "Content-Type": "application/json"
20 },
21 body: JSON.stringify({
22 mockup_uuid: mockup.data.uuid,
23 smart_objects: [{
24 uuid: designArea.uuid,
25 asset: { url: "https://your-cdn.com/design.png" }
26 }]
27 })
28 }
29);

Try It Live

GET/api/v1/mockups/your-mockup-uuid-here

Get detailed information about a specific mockup.

Get your API key from the Dashboard

Best Practices

Performance Tips

  • Cache mockup details locally to avoid repeated API calls
  • Store smart object UUIDs after first fetch for rendering workflows
  • Use list-mockups for bulk fetching, this endpoint for single mockup details
  • The response includes all data needed for rendering—no additional calls required

Common Issues

  • 404 Not Found: Double-check the UUID format and ownership
  • Missing quad data: Scale tier only. Free, Starter, and Pro users see null
  • Empty smart_objects: The PSD may not have any smart object layers
  • 429 Too Many Requests: Check the Retry-After header and wait before retrying
Get Mockup Detail Endpoint | SudoMock Docs