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/abc123-def456-ghi789" \2 -H "x-api-key: sm_your_api_key"
Response
Success Response
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
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.widthinteger | nullOriginal PSD width in pixels.
data.heightinteger | nullOriginal PSD height in pixels.
data.smart_objectsarrayRequiredList of editable smart object layers.
data.smart_objects[].uuidstringRequiredUUID of the smart object. Use this when rendering.
data.smart_objects[].namestringRequiredDisplay name of the smart object.
data.smart_objects[].layer_namestring | nullAlways the same value as name. Kept for backward compatibility.
data.smart_objects[].sizeobjectRequiredOriginal dimensions of the smart object content (width, height).
data.smart_objects[].positionobjectRequiredPosition and size of the smart object on the canvas (x, y, width, height).
data.smart_objects[].quadarray | nullFour [x, y] coordinate pairs for perspective transform corners. Scale tier only; null on Free, Starter, and Pro tiers.
data.smart_objects[].blend_modestring | nullCurrently always "normal". Reserved for future blend mode support.
data.smart_objects[].print_area_presetsarrayPredefined print area configurations for the smart object.
data.text_layersarrayReserved for future use. Currently always an empty array.
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 (Scale Tier Only)
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
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/abc123",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: 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-Afterheader and wait before retrying