Design authoring

Add a layer

Adds a text, image, AI image, rectangle or circle layer to a design.

post/designs/{uid}/layers

Request

  • Base URL
    https://api.dynapictures.com
  • URL
    https://api.dynapictures.com/designs/{uid}/layers
  • Auth
    HTTP bearer

Path parameters

uidstring required

The ID of the template, shown in the editor and returned by GET /templates.

Request body

type'text' | 'image' | 'ai_image' | 'rectangle' | 'circle' required

The kind of layer to add.

pageIndexinteger

The page of a multipage design. Defaults to the first page.

textstring

The text of a text layer.

imageUrlstring uri

The image of an image layer.

promptstring

The prompt of an AI Image layer.

colorstring

The text color.

backgroundColorstring

The background color.

fontSizeinteger

The font size in pixels.

textAlignstring

The text alignment.

fontFamilystring

The font family.

fontWeightstring

The font weight.

aiModelstring

The model of an AI Image layer.

aiAspectRatiostring

The aspect ratio of an AI Image layer.

xnumber

Left position in pixels.

ynumber

Top position in pixels.

widthnumber

Width in pixels.

heightnumber

Height in pixels.

zIndexinteger

The stacking order.

Response

The new layer.

designUidstring required

The ID of the design.

layerobject required

The layer as stored in the design.

Changes

No recorded changes to this operation across all 1 revision of this API.