Update Mockup
Update mockup metadata such as the name. Returns the full updated mockup object.
/api/v1/mockups/{uuid}Request
Headers
x-api-keystringRequiredYour SudoMock API key starting with sm_
Content-TypestringRequiredMust be application/json
Path Parameters
uuidstringRequiredThe unique identifier of the mockup to update.
Request Body
namestringRequiredNew name for the mockup. Must be 1-255 characters.
1{2 "name": "Updated Product Mockup"3}
Only Name Updates
name field can be updated. Other fields like smart objects cannot be modified after upload.Code Examples
1curl -X PATCH "https://api.sudomock.com/api/v1/mockups/abc123-def456-ghi789" \2 -H "x-api-key: sm_your_api_key" \3 -H "Content-Type: application/json" \4 -d '{5 "name": "Updated Product Mockup"6 }'
Response
Success Response
Returns the full mockup object with the updated name. The response format is identical to theGet Mockupendpoint.
successbooleanAlways true for successful responses.
messagestringOptional status message. Empty string on success.
dataobjectThe full updated mockup object including uuid, name, thumbnail, smart_objects, thumbnails, and more.
1{2 "success": true,3 "data": {4 "uuid": "abc123-def456-ghi789",5 "name": "Updated Product Mockup",6 "thumbnail": "https://cdn.sudomock.com/abc123/thumbnails/thumb_720.webp",7 "width": 3000,8 "height": 2000,9 "smart_objects": [10 {11 "uuid": "so-uuid-001",12 "name": "Product Image",13 "layer_name": "Smart Object 1",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.webp" },33 { "width": 480, "url": "https://cdn.sudomock.com/abc123/thumbnails/thumb_480.webp" },34 { "width": 240, "url": "https://cdn.sudomock.com/abc123/thumbnails/thumb_240.webp" }35 ]36 },37 "message": ""38}
Error Responses
1{2 "detail": "Authentication required. Provide either 'x-api-key' header or 'Authorization: Bearer <token>'",3 "success": false4}
No valid API key or Bearer token was provided.
1{2 "detail": "Mockup not found",3 "success": false4}
The mockup UUID does not exist or belongs to a different account.
1{2 "detail": "Validation error",3 "errors": [4 {5 "field": "body -> name",6 "message": "Missing required field: body -> name"7 }8 ],9 "success": false10}
Request body failed validation. The name field is required and must be 1-255 characters.
1{2 "detail": "Rate limit exceeded. Please slow down and try again.",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}
Rate limit or concurrent request limit exceeded. Use the Retry-After header to determine when to retry.
1{2 "detail": "Internal error while updating mockup",3 "success": false4}
An unexpected error occurred. If this persists, contact support.
Validation Rules
| Field | Type | Constraints |
|---|---|---|
name | string | Required, 1-255 characters |
Try It Live
/api/v1/mockups/your-mockup-uuid-hereUpdate the name of an existing mockup.
Get your API key from the Dashboard
Best Practices
Naming Conventions
- Use descriptive names: "T-Shirt Front White" instead of "Mockup 1"
- Include variant info: size, color, angle (e.g., "iPhone 15 Pro - Black - 45°")
- Avoid special characters that may cause issues in file systems
- Keep names under 100 characters for better UI display
Common Issues
- 422 Validation Error: Name must be 1-255 characters. An empty body or missing name field will also return 422.
- 404 Not Found: Verify the UUID exists and belongs to your account
- 429 Too Many Requests: Check the
Retry-Afterresponse header for when to retry