Skip to main content
POST

Authorizations

x-api-key
string
header
required

API key with sm_ prefix. Get your key at https://sudomock.com/dashboard/api-keys

Body

application/json

What to render: which mockup, what goes into it, and how to export it.

mockup_uuid
string
required

UUID of the mockup to render. Must be a valid UUID, for example c315f78f-d2c7-4541-b240-a9372842de94. Obtained from the POST /api/v1/psd/upload or GET /api/v1/psd-mockups response.

Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"c315f78f-d2c7-4541-b240-a9372842de94"

smart_objects
SmartObjectInput · object[]

List of smart objects with their assets. Required unless text_layers, group_layers or hidden_layers is provided.

text_layers
TextLayerInput · object[] | null

Up to 50 text-layer overrides. Each entry targets a text-layer UUID and provides exactly one of text for a single-style layer or segments for a mixed-style layer. Omitted layers and styling fields keep their authored values.

Maximum array length: 50
group_layers
GroupLayerInput · object[] | null

Group outline overrides. Each entry addresses a listed group by its own UUID; the change affects everything inside that group.

Maximum array length: 50
hidden_layers
string[] | null

Up to 50 layers to leave out of this render, each by the UUID that GET /api/v1/psd-mockups/{uuid}/layers lists for it, including the layers inside a smart object's contents. Hiding a group hides every layer inside it, and a layer clipped to a hidden layer is hidden with it, as in Photoshop. A layer hidden inside a smart object's contents is hidden in every copy of that smart object. A layer cannot be hidden and edited in the same request, and a smart object that receives an image cannot have layers inside it hidden. Omit to draw every layer the template shows.

Maximum array length: 50
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:
export_options
ExportOptions · object

Export configuration for format, size and quality. Every field has a default, so the whole object is optional.

Example:
export_label
string | null

Optional label for export file naming (max 100 chars, alphanumeric + hyphen/underscore)

Maximum string length: 100
Example:

"summer-tee-front"

is_async
boolean
default:false

If true, the render is QUEUED and the call returns 202 immediately with a job_id (poll GET /api/v1/jobs/{job_id}, or receive a webhook if one is configured). If false (default), the render runs synchronously and returns the result.

Response

Successful Response

The finished render and where to fetch it.

data
RenderResponseData · object
required

Response data

success
boolean
default:true

Success status

warnings
RenderWarning · object[] | null

Non-fatal advisories about this render (e.g. requested size above the mockup's native resolution). Omitted when none.

Example: