Get Mockup Detail
Retrieve detailed information about a specific mockup template including all smart objects and metadata.
/api/v1/mockups/{uuid}Request
Headers
x-api-keystringRequiredYour SudoMock API key starting with sm_
Path Parameters
uuidstringRequiredThe unique identifier of the mockup. Returned from upload or list endpoints.
Code Examples
1curl -X GET "https://api.sudomock.com/api/v1/mockups/7c9e6679-7425-40de-944b-e07fc1f90ae7" \2 -H "x-api-key: sm_your_api_key"
Response
Success Response
1{2 "success": true,3 "data": {4 "uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",5 "name": "Product Mockup",6 "thumbnail": "https://cdn.sudomock.com/7c9e6679/thumbnails/thumb_720.png",7 "width": 3000,8 "height": 2000,9 "smart_objects": [10 {11 "uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",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": "9b2e4d6a-3c1f-4e8b-bd5a-7f6c2a1e0d34",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 {31 "uuid": "b7f2c1a0-9e34-4d21-8f0a-1c2b3d4e5f60",32 "name": "Headline",33 "text_content": "YOUR BRAND",34 "font_postscript_name": "Poppins-Bold",35 "font_size": 96,36 "color": "#1A1A1A",37 "font_available": true,38 "is_editable": true39 }40 ],41 "collections": [],42 "thumbnails": [43 { "width": 720, "url": "https://cdn.sudomock.com/7c9e6679/thumbnails/thumb_720.png" },44 { "width": 480, "url": "https://cdn.sudomock.com/7c9e6679/thumbnails/thumb_480.png" },45 { "width": 240, "url": "https://cdn.sudomock.com/7c9e6679/thumbnails/thumb_240.png" }46 ]47 },48 "message": ""49}
Response Fields
successbooleanRequiredAlways true for successful responses.
messagestringRequiredOperation message. Empty string on success.
dataobjectRequiredMockup data payload.
data.uuidstringRequiredUnique identifier for the mockup.
data.namestringRequiredName of the mockup template.
data.thumbnailstringURL to the mockup preview image (720px width). Empty string if generation failed.
data.widthintegerRequiredOriginal PSD width in pixels.
data.heightintegerRequiredOriginal PSD height in pixels.
data.smart_objectsarrayRequiredList of editable smart object layers.
data.smart_objects[].uuidstringRequiredUnique identifier for the smart object. Use this when rendering.
data.smart_objects[].namestringRequiredDisplay name of the smart object.
data.smart_objects[].layer_namestring | nullSame as the name field. Included for backward compatibility.
data.smart_objects[].sizeobjectRequiredEmbedded (source) dimensions of the smart object content. Contains width and height in pixels. Upload your artwork at this resolution for best quality.
data.smart_objects[].positionobjectRequiredBounding box of the smart object on the mockup canvas. Contains x, y, width, and height in pixels. Use for client-side preview overlays.
data.smart_objects[].quadarray | nullFour [x, y] coordinate pairs (floats) for the perspective-transformed corners of the smart object. Included on Scale plans; null on lower plans.
data.smart_objects[].blend_modestringLayer blend mode (e.g. normal, multiply).
data.smart_objects[].print_area_presetsarrayRequiredPrint area preset configurations. Always includes a 'Default' preset matching the full smart object area. Each preset has uuid, name, thumbnails, size, and position fields.
data.text_layersarrayEditable text layers in the mockup. Each entry has uuid, name, text_content, font_postscript_name, font_size (px), color (#RRGGBB), font_available, and is_editable. See the Text Layers guide.
data.collectionsarrayReserved for future use. Currently always an empty array.
data.thumbnailsarrayArray of thumbnail URLs at different sizes (720px, 480px, 240px). Each entry has width (integer) and url (string).
Quad Data
quad field contains four [x, y] coordinate pairs representing the perspective-transformed corners of the smart object. Included on Scale plans; null on lower plans.Error Responses
1{2 "success": false,3 "detail": "Invalid or missing API key"4}
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.
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.
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:
1// 1. Get mockup details2const mockup = await fetch(3 "https://api.sudomock.com/api/v1/mockups/7c9e6679-7425-40de-944b-e07fc1f90ae7",4 { headers: { "x-api-key": apiKey } }5).then(r => r.json());67// 2. Extract smart object UUID8const designArea = mockup.data.smart_objects.find(9 so => so.name === "Design Area"10);1112// 3. Render with your design13const 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
/api/v1/mockups/your-mockup-uuid-hereGet 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-mockupsfor 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: Included on Scale plans;
nullon lower plans - Empty smart_objects: The PSD may not have any smart object layers
- 429 Too Many Requests: Check the
Retry-Afterheader and wait before retrying