Mockly API
Overview
Render chat mockups via HTTP. This is the API reference for building against Mockly programmatically.
What it does
The Mockly API renders chat mockup screenshots and videos over HTTP. You send a JSON payload describing the conversation — sender, receivers, messages — and get back a PNG (synchronously) or an MP4 (asynchronously, with a status URL to poll).
It's the same render pipeline the editor uses, exposed as a paid HTTP API. Pixel-perfect across 22 chat apps including WhatsApp, iMessage, Instagram, Discord, Telegram, Slack, Microsoft Teams, and more.
Prerequisites
You need three things before you can call the API:
- A Mockly account. Free to create at getmockly.com.
- An active API subscription — $99/month, monthly billing, cancel anytime. Subscribe from your account page.
- An API key — once subscribed, mint a key under API keys. Keys are shown once at creation and start with
mk_live_.
Quick start
Render a WhatsApp chat as a PNG with one cURL:
curl -X POST https://www.getmockly.com/api/v1/chat/render \
-H "Authorization: Bearer mk_live_..." \
-H "Content-Type: application/json" \
-d '{
"mockupType": "chats",
"platform": "whatsapp",
"renderKind": "image",
"resolutionScale": "2x",
"rendererVersion": "mockup-remotion-v1",
"props": {
"platform": "whatsapp",
"sender": { "id": "u1", "name": "Alex" },
"receivers": [{ "id": "u2", "name": "Sam" }],
"messages": [
{ "id": "m1", "type": "text", "userId": "u1", "text": "Hey!", "timestamp": "2026-04-30T10:15:00Z" },
{ "id": "m2", "type": "text", "userId": "u2", "text": "What's up?", "timestamp": "2026-04-30T10:15:30Z" }
]
}
}'
The response (200):
{
"id": "abc-123-...",
"status": "completed",
"renderKind": "image",
"format": "png",
"downloadUrl": "https://...",
"sizeBytes": 482113
}
Fetch downloadUrl to download the PNG. The URL is short-lived; download promptly or call GET /api/v1/exports/:id to get a fresh one.
Next steps
- Authentication — how Bearer tokens work and how to manage keys.
- POST /chat/render — full reference for image and video renders.
- Exports — status polling and downloads.
- Schema — every field of the request body.
- Errors — codes, retry guidance.