List Mockups
Retrieve all your uploaded mockup templates with pagination, filtering, and sorting options.
/api/v1/mockupsRequest
Headers
X-API-KEYstringRequiredYour SudoMock API key starting with sm_
Query Parameters
limitintegerNumber of mockups to return. Default: 20, Max: 100
offsetintegerNumber of mockups to skip for pagination. Default: 0
namestringFilter by exact mockup name.
created_afterstringFilter mockups created after this date (ISO 8601 format).
created_beforestringFilter mockups created before this date (ISO 8601 format).
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": "abc123-def456-ghi789",7 "name": "Product Mockup",8 "thumbnail": "https://cdn.sudomock.com/abc123/thumbnails/thumb_720.jpg",9 "width": 3000,10 "height": 2000,11 "smart_objects": [12 {13 "uuid": "so-uuid-001",14 "name": "Product Image",15 "layer_name": "Smart Object 1",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": "preset-uuid-001",23 "name": "Default",24 "size": { "width": 3000, "height": 3000 },25 "position": { "x": 0, "y": 0, "width": 3000, "height": 3000 }26 }27 ]28 }29 ],30 "text_layers": [],31 "collections": [],32 "thumbnails": [33 { "width": 720, "url": "https://cdn.sudomock.com/abc123/thumbnails/thumb_720.jpg" },34 { "width": 480, "url": "https://cdn.sudomock.com/abc123/thumbnails/thumb_480.jpg" },35 { "width": 240, "url": "https://cdn.sudomock.com/abc123/thumbnails/thumb_240.jpg" }36 ]37 }38 ],39 "total": 156,40 "limit": 20,41 "offset": 042 },43 "message": ""44}
Response Fields
mockupsarrayRequiredArray of mockup objects.
totalintegerRequiredTotal number of mockups matching the query.
limitintegerRequiredThe limit that was applied.
offsetintegerRequiredThe offset that was applied.
mockups[].uuidstringRequiredUnique identifier for the mockup.
mockups[].namestringRequiredName of the mockup template.
mockups[].thumbnailstringURL to the mockup preview image.
mockups[].smart_objectsarrayRequiredList of smart object layers in the mockup.
mockups[].thumbnailsarrayMultiple thumbnail sizes available.
Geometry Data
quad field (corner coordinates) is only included for Scale tier users. Free and Pro tier users will see quad: null in the response.Error Responses
1{2 "success": false,3 "detail": "Invalid or missing API key"4}
1{2 "success": false,3 "detail": "Internal error while listing mockups"4}
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