List Mockups
Retrieve all your uploaded mockup templates with pagination, filtering, and sorting options.
/api/v1/mockupsRequest
Headers
x-api-keystringYour SudoMock API key starting with sm_. Required if not using Bearer token.
AuthorizationstringBearer token (a JWT from your dashboard login). Format: "Bearer <token>". Required if not using x-api-key.
Authentication
x-api-key or Authorization: Bearer <token>. One of the two is required.Query Parameters
limitintegerNumber of mockups to return. Min: 1, Max: 100, Default: 20
offsetintegerNumber of mockups to skip for pagination. Default: 0
namestringFilter mockups by name (case-insensitive, partial match).
created_afterstringFilter mockups created on or after this date (ISO 8601 format, inclusive).
created_beforestringFilter mockups created on or before this date (ISO 8601 format, inclusive).
sortstringField to sort by: name, created_at, or updated_at. Default: created_at
orderstringSort order: asc or desc. Default: desc
Pagination
limit and offset to paginate through results. The response includes total to help calculate total pages.Code Examples
1# Basic list - first 20 mockups2curl -X GET "https://api.sudomock.com/api/v1/mockups" \3 -H "x-api-key: sm_your_api_key"45# With pagination6curl -X GET "https://api.sudomock.com/api/v1/mockups?limit=50&offset=20" \7 -H "x-api-key: sm_your_api_key"89# With filters and sorting10curl -X GET "https://api.sudomock.com/api/v1/mockups?sort=name&order=asc&created_after=2025-01-01T00:00:00Z" \11 -H "x-api-key: sm_your_api_key"
Response
Success Response
1{2 "success": true,3 "data": {4 "mockups": [5 {6 "uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",7 "name": "Product Mockup",8 "thumbnail": "https://cdn.sudomock.com/7c9e6679/thumbnails/thumb_720.jpg",9 "width": 3000,10 "height": 2000,11 "smart_objects": [12 {13 "uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",14 "name": "Product Image",15 "layer_name": "Product Image",16 "size": { "width": 3000, "height": 3000 },17 "position": { "x": 100, "y": 100, "width": 800, "height": 600 },18 "quad": null,19 "blend_mode": "normal",20 "print_area_presets": [21 {22 "uuid": "9b2e4d6a-3c1f-4e8b-bd5a-7f6c2a1e0d34",23 "name": "Default",24 "thumbnails": [],25 "size": { "width": 3000, "height": 3000 },26 "position": { "x": 0, "y": 0, "width": 3000, "height": 3000 }27 }28 ]29 }30 ],31 "text_layers": [32 {33 "uuid": "b7f2c1a0-9e34-4d21-8f0a-1c2b3d4e5f60",34 "name": "Headline",35 "text_content": "YOUR BRAND",36 "font_postscript_name": "Poppins-Bold",37 "font_size": 96,38 "color": "#1A1A1A",39 "font_available": true,40 "is_editable": true41 }42 ],43 "collections": [],44 "thumbnails": [45 { "width": 720, "url": "https://cdn.sudomock.com/7c9e6679/thumbnails/thumb_720.jpg" },46 { "width": 480, "url": "https://cdn.sudomock.com/7c9e6679/thumbnails/thumb_480.jpg" },47 { "width": 240, "url": "https://cdn.sudomock.com/7c9e6679/thumbnails/thumb_240.jpg" }48 ]49 }50 ],51 "total": 156,52 "limit": 20,53 "offset": 054 }55}
Response Fields
successbooleanRequiredWhether the request was successful. Always true for 200 responses.
data.mockupsarrayRequiredArray of mockup objects.
data.totalintegerRequiredTotal number of mockups matching the query (before pagination).
data.limitintegerRequiredThe limit that was applied.
data.offsetintegerRequiredThe offset that was applied.
Mockup Object
uuidstringRequiredUnique identifier for the mockup.
namestringRequiredName of the mockup template.
thumbnailstringRequiredURL to the mockup preview image (720px width). Empty string if no thumbnails are available.
widthinteger | nullOriginal PSD canvas width in pixels. Null if not yet processed.
heightinteger | nullOriginal PSD canvas height in pixels. Null if not yet processed.
smart_objectsarrayRequiredList of smart object layers in the mockup. See Smart Object fields below.
text_layersarrayRequiredEditable text layers in the mockup (uuid, name, text_content, font_postscript_name, font_size, color, font_available, is_editable). Empty when the PSD has none. See the Text Layers guide.
collectionsarrayRequiredReserved for future use. Currently always an empty array.
thumbnailsarrayRequiredArray of thumbnail objects at different sizes (720px, 480px, 240px). Each object has width (integer) and url (string) fields.
Smart Object Fields
uuidstringRequiredUnique identifier for the smart object. Use this when rendering.
namestringRequiredDisplay name of the smart object.
layer_namestring | nullSame as the name field. Included for backward compatibility.
sizeobjectRequiredEmbedded (source) dimensions of the smart object content. Contains width and height in pixels. Upload your artwork at this resolution for best quality.
positionobjectRequiredBounding box of the smart object on the mockup canvas. Contains x, y, width, and height in pixels. Use for client-side preview overlays.
quadarray | nullFour [x, y] coordinate pairs (floats) for the perspective-transformed corners of the smart object. Included on Scale plans; null on lower plans.
blend_modestringLayer blend mode (e.g. normal, multiply).
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.
Geometry Data
quad field (corner coordinates) is included on Scale plans; lower plans will see quad: null in the response.Error Responses
1{2 "detail": "Invalid or missing API key",3 "success": false4}
Returned when the API rate limit or concurrent request limit is exceeded. Check the Retry-After response header for how long to wait.
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}
1{2 "detail": "Internal error while listing mockups"3}
Pagination Example
Here's how to paginate through all your mockups:
1async function getAllMockups(apiKey) {2 const allMockups = [];3 const limit = 100;4 let offset = 0;5 let total = null;67 do {8 const response = await fetch(9 `https://api.sudomock.com/api/v1/mockups?limit=${limit}&offset=${offset}`,10 { headers: { "x-api-key": apiKey } }11 );1213 const data = await response.json();14 allMockups.push(...data.data.mockups);1516 total = data.data.total;17 offset += limit;1819 } while (offset < total);2021 return allMockups;22}
Try It Live
/api/v1/mockups?limit=20&offset=0List all your mockups with pagination.
Get your API key from the Dashboard
Best Practices
Performance Tips
- Use
limit=100(max) for bulk operations to minimize API calls - Cache the
totalvalue and only refetch when adding/removing mockups - Store mockup UUIDs locally after initial sync to avoid repeated list calls
- Use date filters (
created_after) for incremental syncs
Common Issues
- Empty results: Check if your API key has any uploaded mockups
- Missing mockups: Ensure offset + limit doesn't exceed total
- Slow response: Reduce limit or add filters for large collections