Skip to main content
Version: 1.0.0

Generate Single Render

POST
 https://app.dynamicmockups.com/api/v1/renders/

NOTE: The limit for requests per minute is set at 300. Feel free to reach out to us if you need more.

NOTE: Max size per asset file in each smart object is 20MB.

Security -> API Authentication

This API implementation uses API KEY as an authentication method.

  • Name: X-API-KEY
  • In: header

Request Parameters

NameLocated inDescriptionRequiredType
mockup_uuidURLPublic identifier of the mockupRequiredstring
export_labelBodyYour internal identifier that helps you to identify and link rendered imageOptionalstring
export_options[image_format]BodyRendered image formatOptionaljpg | png | webp
export_options[image_size]BodyRendered image size in pixelsOptionalint
smart_objects[0][uuid]BodyPublic identifier of smart objectRequiredstring
smart_objects[0][color]BodyHexadecimal color code that will be applied over entire smart objectOptionalstring
smart_objects[0][asset][url]BodyDesign asset file via URLOptionalstring
smart_objects[0][asset][file]BodyDesign asset file (max size 20MB)Optionalfile
smart_objects[0][asset][fit]BodyDesign asset 'fit' relative to print area set via Editor. Size and position of print area is controlled via Editor. [asset][size] and [asset][position] can't be used alogside 'fit'.Optionalcontain | cover | stretch
smart_objects[0][asset][size][width]BodyDesired asset widthOptionalint
smart_objects[0][asset][size][height]BodyDesired asset heightOptionalint
smart_objects[0][asset][position][top]BodyTop asset position relative to smart object's top-left cornerOptionalint
smart_objects[0][asset][position][left]BodyLeft asset position relative to smart object's top-left cornerOptionalint
smart_objects[0][asset][rotate]BodyRotation angle in degreesOptionalint

Request example with posman body data

mockup_uuid: "6308f2f7-80eb-42ab-a109-08a33e6dcc2d"
export_label: 1
export_options[image_format]: "webp"
export_options[image_size]: 512
smart_objects[0][uuid]: "22ec3dec-4df8-4643-8c68-01b72fa506f5"
smart_objects[0][asset][url]: "https://images.pexels.com/photos/3225517/pexels-photo-3225517.jpeg"
smart_objects[0][asset][fit]: "contain"
smart_objects[0][color]: "#ffd667"

Request example with FormData

const formData = new FormData();

formData.append("mockup_uuid", "6308f2f7-80eb-42ab-a109-08a33e6dcc2d");
formData.append("export_label", "1");
formData.append("export_options[image_format]", "webp");
formData.append("export_options[image_size]", "512");
formData.append(
"smart_objects[0][uuid]",
"22ec3dec-4df8-4643-8c68-01b72fa506f5"
);
formData.append("smart_objects[0][asset][file]", "MY FILE");
formData.append("smart_objects[0][asset][position][top]", "71");
formData.append("smart_objects[0][asset][position][left]", "198");
formData.append("smart_objects[0][asset][size][width]", "178");
formData.append("smart_objects[0][asset][size][height]", "198");
formData.append("smart_objects[0][color]", "#ffd667");

Request example with json structured data

{
"mockup_uuid": "6308f2f7-80eb-42ab-a109-08a33e6dcc2d",
"export_label": "1",
"export_options": {
"image_format": "webp",
"image_size": "512"
},
"smart_objects": [
{
"uuid": "22ec3dec-4df8-4643-8c68-01b72fa506f5",
"color": "#ffd667",
"asset": {
"url": "https://images.pexels.com/photos/3225517/pexels-photo-3225517.jpeg",
"position": {
"top": "71",
"left": "198"
},
"size": {
"width": "178",
"height": "198"
},
}
}
]
}

Response

CodeDescription
200Return single render
401Unauthorized.
404Not Found.

Example Usage

make-renders.js
var headers = new Headers();
headers.append("X-API-KEY", "API_KEY");
headers.append("Accept", "application/json");

var requestOptions = {
method: "GET",
headers: headers,
};

fetch("https://app.dynamicmockups.com/api/v1/renders/", requestOptions)
.then((response) => response.json())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));

Example Success Response

{
"data": {
"export_label": "1",
"export_path": "https://app-dynamicmockups-production.s3.eu-central-1.amazonaws.com/11038/mockup_variation_1979_export.png"
},
"success": true,
"message": "success"
}

Example Error Response

{
"message": "Unauthorized."
}

Example Not Found Response

{
"message": "Not found."
}