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/chat/render is a ChatExportPayload:

FieldTypeRequiredDescription
mockupType"chats"yesOnly "chats" is supported in v1.
platformstringyesOne of the supported platforms below.
renderKind"image" | "video"yesOutput kind.
resolutionScale"1x" | "2x" | "4x"yesResolution multiplier — "2x" is the typical default.
rendererVersionstringyesUse "mockup-remotion-v1".
propsobjectyesThe conversation and appearance settings — see props.

The schema validates strictly. Unknown top-level fields are rejected with 400 validation_failed.

props

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".

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.

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.

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.

Supported platforms

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