Skip to content
Mockly

Mockly API

Schema

Reference for the chat render request body. Every field, every type.

Request body

The body of POST /api/v1/render is a render payload, discriminated on mockupType. Six mockup types are supported, each with its own props shape:

mockupTypeprops shapeRender kinds
"chats"Chat propsimage + video
"ai"AI chat propsimage + video
"stories"Story propsimage + video
"posts"Post propsimage only
"comments"Comment propsimage only
"emails"Email propsimage only

Top-level fields, common to every type:

FieldTypeRequiredDescription
mockupType"chats" | "ai" | "stories" | "posts" | "comments" | "emails"yesSelects the mockup type and which props shape is required.
platformstringyesOne of the supported platforms for the chosen mockupType.
renderKind"image" | "video"yesOutput kind. "video" is only valid for chats, ai, and stories.
resolutionScale"1x" | "2x" | "4x"yesResolution multiplier — "2x" is the typical default.
rendererVersionstringyesUse "mockup-remotion-v1".
render3DbooleannoRender the mockup on a 3D phone in 3D space (chats and stories only). Default false.
cameraPosition[number, number, number]noCamera XYZ position for the 3D view (chats and stories only); omit for the default angle.
propsobjectyesThe mockup content and appearance — shape depends on mockupType (see the table above).

The schema validates strictly. Unknown top-level fields are rejected with 400 validation_failed. The top-level platform must equal props.platform.

Chat props

For mockupType: "chats", props describes the conversation itself and how it should look:

FieldTypeDefaultDescription
platformstringMust match the top-level platform.
senderUserThe user whose messages render on the right (sender side).
receiversUser[]Other participants. One for direct, multiple for group.
messagesMessage[]The conversation, in chronological order.
conversationType"direct-message" | "group-chat""direct-message"
groupChatSettings{ name: string, image?: string }Required when conversationType: "group-chat".
darkModebooleanfalseRender in dark mode (where the platform supports it).
mobileViewbooleantrueRender in mobile aspect ratio.
showDeviceFramebooleanfalseWrap the mockup in a phone-frame.
showDeviceStatusbooleantrueShow the iOS/Android status bar at the top.
showHeaderbooleantrueShow the platform's chat header.
showFooterbooleantrueShow the platform's input bar at the bottom.
showReceiverbooleanfalseForce-show the receiver's name above messages even in DMs.
showDatesbooleantrueShow date dividers between messages on different days.
batteryLevelnumber 0–100100Battery indicator in the status bar.
statusBarTimestring"9:41"Time displayed in the status bar.
timeNotation"12h" | "24h""24h"Format for message timestamps.
timezonestring (IANA, e.g. "Europe/Amsterdam")Timezone for displaying message timestamps.
transparentBackgroundbooleanfalseRender with a transparent background (PNG with alpha for images, WebM for video).
customThemeCustomThemeRequired when platform: "custom".
chatWallpaperstringCustom conversation wallpaper: an image URL/data URL, or a hex color (e.g. #0b141a) for a solid fill. Empty string removes the wallpaper; omit for the platform default. Applies to any platform.

Messages

messages is an array of ChatMessage:

FieldTypeRequiredDescription
idstringyesUnique within the array.
userIdstringyesMust match sender.id or one of receivers[].id.
type"text" | "image" | "mixed"yesContent discriminator.
timestampstring (ISO 8601, e.g. "2026-04-30T10:15:00Z")yesUTC instant.
textstringdependsRequired for "text" and "mixed".
imagesImage[]dependsRequired for "image" and "mixed".
status"sent" | "delivered" | "read"noDelivery state — only rendered on platforms that show one (e.g. WhatsApp ticks, iMessage "Read").

Examples:

{ "id": "m1", "type": "text", "userId": "u1", "text": "Hey!", "timestamp": "2026-04-30T10:15:00Z" }

{
  "id": "m2",
  "type": "image",
  "userId": "u1",
  "timestamp": "2026-04-30T10:16:00Z",
  "images": [
    {
      "id": "i1",
      "filename": "beach.jpg",
      "data": "https://cdn.example.com/beach.jpg",
      "mimeType": "image/jpeg",
      "size": 245760
    }
  ]
}

{
  "id": "m3",
  "type": "mixed",
  "userId": "u1",
  "text": "Look at this!",
  "timestamp": "2026-04-30T10:17:00Z",
  "images": [/* ... */],
  "status": "read"
}

Images

ChatMessageImage:

FieldTypeRequiredDescription
idstringyesUnique within the message.
filenamestringyesDisplay name; used as the download filename suffix.
datastringyesEither an https:// URL or a base64 data URL (data:image/jpeg;base64,...).
mimeTypestringyesMIME of the image (e.g. "image/jpeg", "image/png").
sizenumberyesSize in bytes (informational; not enforced).
captionstringnoCaption shown below the image, where the platform supports it (Telegram, Discord).
thumbnailstringnoSmaller preview, same encoding as data. Falls back to data if omitted.

Recommendation: prefer https:// URLs over data URLs. Data URLs balloon the request body and easily push past the 10 MB cap if you have multiple image messages.

Users

ChatUser:

FieldTypeRequiredDescription
idstringyesUnique within the conversation; referenced by messages[].userId.
namestringyesDisplay name.
imagestringnoAvatar URL or data URL.
usernamestringnoX only. The @handle on the X profile card. Omit to auto-derive from name (e.g. "Jane Doe" → @janedoe).
verifiedbooleannoX only. Shows the blue verified seal in the X header and profile card. Defaults to true; set false to hide it.
joinedDatestringnoX only. "Joined" month on the X profile card, as YYYY-MM (e.g. "2011-03" renders "Joined March 2011"). Omit to auto-derive.

Each conversation has exactly one sender and one or more receivers. The sender's messages render on the right side; receivers' messages render on the left.

The username, verified, and joinedDate fields are only rendered for platform: "x" (the X profile card and header) and are ignored by every other platform. On X they apply to the receivers[0] — the person whose profile the conversation shows.

"receivers": [
  {
    "id": "u2",
    "name": "Jane Doe",
    "username": "janedoe",
    "verified": true,
    "joinedDate": "2011-03"
  }
]

Custom theme

When platform: "custom", supply a customTheme so the renderer knows how to color bubbles and the background:

FieldTypeRequiredDescription
backgroundColorstring (hex / CSS)yesConversation background.
backgroundImagestring (URL / data URL)noOptional background image; layered above backgroundColor.
senderBubble{ background: string, foreground: string }yesColors for the sender's message bubbles.
receiverBubble{ background: string, foreground: string }yesColors for receivers' bubbles.
fontSize"small" | "medium" | "large"no (default "medium")Body text size.

customTheme is ignored for non-custom platforms — those use the platform's official colors.

Story props

For mockupType: "stories", props describes the story and how it should look:

FieldTypeDefaultDescription
platformstring"instagram" or "snapchat"; must match top-level platform.
authorStoryAuthorThe story's author.
slidesStorySlide[]The story slides, in order.
currentSlidenumber0Index of the slide to render.
timestampstring (ISO 8601)Story timestamp.
batteryLevelnumber 0–100100Status-bar battery indicator.
showDeviceFramebooleanfalseWrap in a phone frame.
showDeviceStatusbooleantrueShow the status bar.
statusBarTimestring"9:41"Status-bar time.
timeNotation"12h" | "24h""24h"Timestamp format.

Story author

StoryAuthor:

FieldTypeRequiredDescription
usernamestringyesThe author's username.
verifiedbooleanyesShow the verified badge.
avatarstringnoAvatar URL or data URL.

Story slides

slides is an array of StorySlide, rendered in order:

FieldTypeRequiredDescription
idstringyesUnique within the array.
imagestringnoThe slide's background image — a URL or data URL.

AI chat props

For mockupType: "ai", props describes an AI assistant conversation (ChatGPT, Claude, etc.):

FieldTypeDefaultDescription
platformstringOne of the AI platforms; must match top-level platform.
modelstringModel label shown in the header (e.g. "GPT-4o", "Claude Sonnet 4.5").
messagesAIChatMessage[]The conversation, in order.
inputstring""Placeholder text shown in the composer input at the bottom.
darkModebooleanfalseRender in dark mode.
batteryLevelnumber 0–100100Status-bar battery indicator.
showDeviceFramebooleanfalseWrap in a phone frame.
showDeviceStatusbooleantrueShow the status bar.
showHeaderbooleantrueShow the app header (with the model name).
showFooterbooleantrueShow the composer input bar.
statusBarTimestring"9:41"Status-bar time.
timeNotation"12h" | "24h""24h"Time format.
timezonestring (IANA)Timezone for any displayed times.

AI chat messages

messages is an array of AIChatMessage:

FieldTypeRequiredDescription
idstringyesUnique within the array.
role"user" | "assistant"yesWho sent it. User messages render on the right; assistant answers render as formatted markdown.
contentstringyesMessage text. Assistant content supports Markdown (headings, lists, code blocks, tables).
imagesImage[]noAttached images (same shape as chat images). Typically on "user" messages.

Video renders (renderKind: "video") animate the conversation: each user prompt appears, the assistant pauses, then its answer streams in like a typewriter. Streaming speed scales with answer length. Duration is derived from the messages automatically.

Post props

For mockupType: "posts", props describes a single social post:

FieldTypeDefaultDescription
platformstringOne of the post platforms; must match top-level.
postPostThe post content, author, and metrics.
darkModebooleanfalseRender in dark mode.
transparentBackgroundbooleanfalseRender with a transparent background (PNG with alpha).

Post object

FieldTypeRequiredDescription
idstringyesUnique id for the post.
authorPostAuthoryesWho posted it.
contentstringyesThe post body text.
titlestringnoTitle/headline, where the platform has one (e.g. Reddit).
imagestringnoAn attached image — URL or data URL.
timestampstring (ISO 8601)yesWhen the post was made.
metricsPostMetricsyesEngagement counts. Provide only the ones the platform shows.

Post author

FieldTypeRequiredDescription
namestringyesDisplay name.
usernamestringnoHandle, where the platform shows one.
subtitlestringnoSecondary line (e.g. a LinkedIn headline).
communitystringnoCommunity/subreddit name (e.g. Reddit r/...).
imagestringnoAvatar URL or data URL.
verifiedbooleannoShow a verified badge where supported.

Post metrics

All fields are optional numbers — include only what the target platform displays: likes, comments, reposts, shares, views, bookmarks, saves, reactions, upvotes, downvotes.

Comment props

For mockupType: "comments", props describes a post's comment thread:

FieldTypeDefaultDescription
platformstringOne of the comment platforms; must match top-level.
postAuthorCommentUserAuthor of the post the comments belong to.
currentUserCommentUserThe "you" user (used for the composer row).
usersCommentUser[]All users referenced by comments[].userId.
commentsComment[]The comment thread, in order.
commentCountnumberTotal count shown in the header (can exceed the rendered list).
videoImagestringYouTube only: video frame shown above the comments panel (URL or data URL, cropped to 16:9).
darkModebooleanfalseRender in dark mode.
batteryLevelnumber 0–100100Status-bar battery indicator.
showDeviceFramebooleanfalseWrap in a phone frame (pins to phone dimensions).
showDeviceStatusbooleantrueShow the status bar.
showHeaderbooleantrueYouTube only: show the YouTube app bar at the top.
statusBarTimestring"9:41"Status-bar time.
timeNotation"12h" | "24h""24h"Time format.

Comment user

FieldTypeRequiredDescription
idstringyesReferenced by comments[].userId.
namestringyesDisplay name.
usernamestringyesHandle.
avatarstringnoAvatar URL or data URL.
isCreatorbooleannoMark as the post creator (badge).

Comment

comments is an array of Comment, each of which can nest replies:

FieldTypeRequiredDescription
idstringyesUnique within the thread.
userIdstringyesMust match a users[], postAuthor, or currentUser id.
textstringyesThe comment body.
likesnumberyesLike count.
timestampstring (ISO 8601)yesWhen it was posted.
usernamestringnoOverride username for this comment.
avatarstringnoOverride avatar for this comment.
repliesComment[]noNested replies (same shape, recursive).

Email props

For mockupType: "emails", props describes an email thread:

FieldTypeDefaultDescription
platformstringOne of the email platforms; must match top-level.
conversationEmailConversationThe thread: subject, participants, and messages.
darkModebooleanfalseRender in dark mode.
batteryLevelnumber 0–100100Status-bar battery indicator.
showDeviceFramebooleanfalseWrap in a phone frame.
showDeviceStatusbooleantrueShow the status bar.
statusBarTimestring"9:41"Status-bar time.
timeNotation"12h" | "24h""24h"Time format.

Email conversation

FieldTypeRequiredDescription
subjectstringyesThe thread subject line.
participantsEmailParticipant[]yesEveryone in the thread.
emailsEmail[]yesThe messages, in order.
attachmentstringnoAn attachment image — URL or data URL.

Email participant

FieldTypeRequiredDescription
idstringyesReferenced by emails[].senderId.
namestringyesDisplay name.
emailstringyesEmail address.
avatarstringnoAvatar URL or data URL.
isNameRedactedbooleanyesBlur/redact the name (for "leaked" style mockups).
isEmailRedactedbooleanyesBlur/redact the email address.

Email message

FieldTypeRequiredDescription
idstringyesUnique within the thread.
senderIdstringyesMust match a participants[].id.
bodystringyesThe email body.
datestring (ISO 8601)yesWhen the email was sent.

Supported platforms

Chat mockups (mockupType: "chats") — 22 chat platforms. Use the slug (left column) as the value of platform and props.platform:

SlugApp
whatsappWhatsApp
imessageiMessage
instagramInstagram
discordDiscord
telegramTelegram
slackSlack
linkedinLinkedIn
microsoftTeamsMicrosoft Teams
messengerFacebook Messenger
snapchatSnapchat
xX (Twitter)
redditReddit
signalSignal
wechatWeChat
tinderTinder
bumbleBumble
blueskyBluesky
msnMSN Messenger
lineLINE
tiktokTikTok
onlyfansOnlyFans
customCustom — bring your own colors via customTheme

Both render kinds are supported for chats — set renderKind: "image" for a PNG or "video" for an MP4.

AI chat mockups (mockupType: "ai") — 5 platforms. Supports image and video:

SlugApp
chatgptChatGPT
claudeClaude
geminiGemini
grokGrok
perplexityPerplexity

Story mockups (mockupType: "stories") — 2 platforms. Supports image and video:

SlugApp
instagramInstagram
snapchatSnapchat

Post mockups (mockupType: "posts") — 8 platforms. Image only:

SlugApp
xX (Twitter)
instagramInstagram
facebookFacebook
linkedinLinkedIn
threadsThreads
blueskyBluesky
tiktokTikTok
pinterestPinterest

Comment mockups (mockupType: "comments") — 8 platforms. Image only:

SlugApp
youtubeYouTube
instagramInstagram
tiktokTikTok
xX (Twitter)
facebookFacebook
linkedinLinkedIn
redditReddit
threadsThreads

Email mockups (mockupType: "emails") — 4 platforms. Image only:

SlugApp
gmailGmail
apple-mailApple Mail
outlookOutlook
leakedLeaked-style