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

Create a reusable 2D mockup from one source image.

source_url
string | null

Public HTTPS URL of the source image.

Example:

"https://example.com/product-photo.jpg"

source_base64
string | null

Base64-encoded source image, with or without a data URL prefix.

name
string | null

Optional display name for the mockup.

Maximum string length: 255
Example:

"Front view"

is_async
boolean
default:false

If true, the mockup 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); result_url carries the new mockup_uuid on success. If false (default), the create runs synchronously and returns the mockup.

print_areas
PhotoMockupPrintAreaInput · object[] | null

Optional: 1-8 convex four-point printable areas in source-image pixels. When provided, these areas are used verbatim and automatic print-area detection is skipped.

Required array length: 1 - 8 elements

Response

Successful Response

data
PhotoMockupDetail · object
required
success
boolean
default:true