Exports
Export Templates
This endpoint allows you to export templates by making an HTTP POST request. This endpoint will also create a new design with the requested element changes.
Request
Method: POST
Endpoint:
https://api.creatopy.com/v1/export-with-changes
Body:
templateHash
(string, required): The hash of the creative.type
(string, required): The type of export.exportSettings
(object, optional): Settings for the exportquality
(integer, optional): HTML specific param. (Accepted values are in the range from 1 to 100).gifPreset
(string, optional): GIF specific param. Available values: ('highQuality', 'optimized', 'static').networkId
(integer, optional): HTML specific param.pdfPreset
(enum, optional): PDF specific param (PDF_STANDARD and PDF_PRINT)slide
(array of integer, optional): PDF specific param (the slide number to export, starts from 0 (for the first slide))scale
: (float, optional): JPG, WEBP, PNG specific param.targetFPS
: (integer, optional): frame rate - MP4 specific paramretina
(boolean, optional): save retina-specific images - HTML specific paramretinaOnly
(boolean, optional): exclude non-retina images from downloaded zip - HTML specific paramconvertCustomFonts
(boolean, optional): convert custom fonts to SVG - HTML specific paramminifyHtml
(boolean, optional): minify HTML size - HTML specific paramurlTarget
(enum, optional): HTML specific param (_blank, _self, _top, _parent )useAsClickTag
(boolean, optional): HTML specific paramclickTagUrl
(string, optional): HTML specific paramincludeFallbackImage
(boolean, optional): include a .jpg format fallback image into downloaded zip HTML specific param
webhookUrl
(string, optional): Webhook URL that will be called when the export completes (succeed or fails)elementsChanges
(array, required):elementName
(string, required): The name of the element.changes
(array of objects, required):attribute
(string, required): The attribute to be changed. (Available attributes are: "LABEL", "SOURCE", "CODE", "VISIBILITY", "FONTVARIANT" and "TEXTMARKDOWN")value
(string, required): The new value for the attribute.
generalChanges
(object, optional):backgroundColor
(string, optional): Any valid hexadecimal color code. The valid hexadecimal color code must satisfy the following conditions. It should start from '#' symbol. It should be followed by the letters from a-f, A-F and/or digits from 0-9. The length of the hexadecimal color code should be either 6 or 3, excluding '#' symbol
Valid values for elementChanges are (depending on attribute):
LABEL: any valid string
SOURCE: any valid public media file link
CODE: valid embed code
VISIBILITY: 'true' or 'false' (as string)
FONTVARIANT: any existing font weight value from the result of the endpoint
templates/fontVariants
for ex: '300italic' , '400', '700italic', etc.TEXTMARKDOWN: 4 markdowns could be added to text elements
Link - [This is the text](This will be the link)
Italic text - text between one star - (* will be transformed as italic text *)
Bold text - text between two pair of stars - (** will be transformed as bold text **)
Bold italic text - text between two group of three stars - (*** will be bold and italic text ***)
IMPORTANT!!
If you use a request in which the input is exactly the same as another input used earlier and the request status was 'complete', the response will be the cached result of the other's request.
Response
The response to this request is a JSON schema:
With the export ID we will check the status of the export
Export existing design
This endpoint allows you to export existing designs by making an HTTP POST request. This endpoint will not create a new design.
Request
Method: POST
Endpoint:
https://api.creatopy.com/v1/export
Body:
creativeHash
(string, required): The hash of the creative.type
(string, required): The type of export.exportSettings
(object, optional): Settings for the exportquality
(integer, optional): HTML specific param.gifPreset
(enum, optional): GIF specific param.networkId
(integer, optional): HTML specific param.pdfPreset
(enum, optional): Pdf specific param (PDF_STANDARD and PDF_PRINT)slide
(array of integer, optional): PDF specific param (the slide number to export, starts from 0 (for the first slide)retinaOnly
(boolean, optional): exclude non-retina images from downloaded zip - HTML specific paramconvertCustomFonts
(boolean, optional): convert custom fonts to SVG - HTML specific paramminifyHtml
(boolean, optional): minify HTML size - HTML specific paramurlTarget
(enum, optional): HTML specific param (_blank, _self, _top, _parent )useAsClickTag
(boolean, optional): HTML specific paramclickTagUrl
(string, optional): HTML specific paramincludeFallbackImage
(boolean, optional): include a .jpg format fallback image into downloaded zip HTML specific param
webhookUrl
(string, optional): Webhook URL that will be called when the export completes (succeed or fails)
Response
The response to this request is a JSON schema:
With the export ID, we will check the status of the export
Check Export Status
This endpoint retrieves the export data with the specified ID.
Request
Method: GET
URL:
https://api.creatopy.com/v1/export/b46adaed-39df-41a2-89e5-beb870282414
Response
Status: 200
Content-Type: application/json
Last updated