Heyzine API
Application programming interface for developers or NoCode tools to integrate flipbooks in applications or workflows.
Getting started
Heyzine provides a comprehensive and flexible API to manage flipbooks in your account. It allows you to create, list and delete flipbooks, manage the access list with password, get embed codes and receive leads via webhooks. The API uses either a Client ID or an API key for authentication. When the API Key is required, you must provide it in a header this way:
Authorization: Bearer API_KEY
PDF to Flipbook Conversion
Link Conversion
Create a link with parameters pointing to your pdf file and use it in anchors, iframes, dialogs, or anywhere else. The link will redirect to the final flipbook url. The conversion process starts with the first access, so it can take some time to load the first time you open it. To convert server-side and avoid revealing the original url, you can use the /rest endpoint and get a json response.
Link format
https://heyzine.com/api1?pdf={pdf url}&k={client id}
Basic example
https://heyzine.com/api1?pdf=https://codingfocus.com/sample.pdf&k=d3m0
Titles and controls
https://heyzine.com/api1?pdf=https%3A%2F%2Fcodingfocus.com%2Fsample.pdf%3Fexample2&t=Test%20title&s=Test%20subtitle&d=1&k=d3m0
Copy design from template
https://heyzine.com/api1?pdf=https%3A%2F%2Fcodingfocus.com%2Fsample.pdf%3Fexample3&k=d3m0&tpl=02d4d12c08593f3d10a5f61338758eaa0bf67abd.pdf
REST API Conversion
Call the Sync REST endpoint client or server-side, to convert the PDF and get a JSON response with the links to the flipbook, thumbnail, and PDF. The endpoint will send the response right after the conversion ends. You have to make sure the client has a long enough time out for the largest documents.
Call the Async REST endpoint to get the JSON response immediately in case you don't want to wait for the conversion process. Subsequent calls to the endpoint with the same parameters will return the current state of the conversion. (started, processed, or failed). During the conversion time, flipbook links will show a not-found page.
Sync Endpoint
POST https://heyzine.com/api1/rest
Request example
{
"pdf": "https://codingfocus.com/sample.pdf",
"client_id": "d3m0",
"prev_next": true,
"rtl": true
}
Response example
{
"id": "e8264ee61f7f5a9fd4291590480762b998574610.pdf",
"url": "https://heyzine.com/flip-book/e8264ee61f.html",
"thumbnail": "https://cdn.heyzine.com/flip-book/cover/e8264ee61f.jpg",
"pdf": "https://cdn.heyzine.com/flip-book/pdf/e8264ee61f7f5a9fd4291590480762b998574610.pdf",
"meta": {
"num_pages": 6,
"aspect_ratio": 0.7078
}
}
Async Endpoint
POST https://heyzine.com/api1/async
Request example
{
"pdf": "https://codingfocus.com/sample.pdf",
"client_id": "d3m0",
"show_info": true,
"background_color": "ffffff",
"rtl": true
}
Response example
{
"id": "e8264ee61f7f5a9fd4291590480762b998574610.pdf",
"url": "https://heyzine.com/flip-book/e8264ee61f.html",
"thumbnail": "https://cdn.heyzine.com/flip-book/cover/e8264ee61f.jpg",
"pdf": "https://cdn.heyzine.com/flip-book/pdf/e8264ee61f7f5a9fd4291590480762b998574610.pdf",
"meta": {
"num_pages": 6,
"aspect_ratio": 0.7078
},
"state": "processed"
}
Flipbook Management
Get flipbook info
Get all available information about a specific flipbook by its identifier.
Endpoint
GET https://heyzine.com/api1/flipbook-details
Authorization: Bearer API_KEY
Request example
{
"id": "c16430e4c0cd91123474d0621b01b8f1f944f48ff85b1.pdf"
}
Response example
{
"id": "c16430e4c0cd91123474d0621b01b8f1f944f48ff85b1.pdf",
"date": "2024-11-05T13:58:48Z",
"title": "My awesome test",
"subtitle": "Flipbook conversion using the API",
"description": "The description of the flipbook",
"private": "Internal management note",
"pages": 67,
"tags": "catalogs,summer,promotions",
"links": {
"custom": "https://mycustomdomain.aflip.in/my-flipbook",
"base": "https://heyzine.com/flip-book/c16430e4c0.html",
"thumbnail": "https://cdn.heyzine.com/flip-book/cover/c16430e4c0.jpg",
"pdf": "https://cdn.heyzine.com/flip-book/pdf/c16430e4c0cd91123474d0621b01b8f1f944f48ff85b1.pdf"
},
"oembed": { oEmbed object},
}
List flipbooks
Get a list of all the flipbooks in the account.
Endpoint
GET https://heyzine.com/api1/flipbook-list
Authorization: Bearer API_KEY
Response example
[
{
"id": "c16430e4c0cd91123474d0621b01b8f1f944f48ff85b1.pdf",
"date": "2024-11-05T13:58:48Z",
"title": "My awesome test",
"subtitle": "Flipbook conversion using the API",
"description": "The description of the flipbook",
"private": "Internal management note",
"pages": 67,
"size": 143135,
"links": {
"custom": "https://mycustomdomain.aflip.in/my-flipbook",
"base": "https://heyzine.com/flip-book/c16430e4c0.html",
"thumbnail": "https://cdn.heyzine.com/flip-book/cover/c16430e4c0.jpg",
"pdf": "https://cdn.heyzine.com/flip-book/pdf/c16430e4c0cd91123474d0621b01b8f1f944f48ff85b1.pdf"
}
}
]
Update flipbook design
Change the look and options of an existing flipbook. Optional template copies styles from another flipbook in your account. Specific fields overwrite the template fields.
Endpoint
PATCH https://heyzine.com/api1/flipbook-design
Authorization: Bearer API_KEY
Request example
{
"id": "c16430e4c0cd91123474d0621b01b8f1f944f48ff85b1.pdf",
"template": "02d4d12c08593f3d10a5f61338758eaa0bf67abd.pdf",
"page_effect": "fade",
"url_path": "my-flipbook",
"url_domain": "docs.example.com",
"rtl": true
}
Response example
{
"success": true,
"code": 200,
"msg": "Flipbook updated"
}
Delete flipbook
Delete an specific flipbook by its identifier.
Endpoint
POST https://heyzine.com/api1/flipbook-delete
Authorization: Bearer API_KEY
Request example
{
"id": "c16430e4c0cd91123474d0621b01b8f1f944f48ff85b1.pdf"
}
Response example
{
"success": true,
"code": 200,
"msg": "Flipbook deleted"
}
Bookshelf Management
List bookshelves
Get a list of all the bookshelves in the account.
Endpoint
GET https://heyzine.com/api1/bookshelf-list
Authorization: Bearer API_KEY
Response example
[
{
"id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
"date": "2025-03-15T10:30:00Z",
"title": "Product Catalogs",
"subtitle": "All product flipbooks",
"description": "Collection of product catalogs",
"flipbook_count": 5,
"links": {
"url": "https://heyzine.com/shelf/a1b2c3d4e5.html",
"thumbnail": "https://heyzine.com/shelf/cover/a1b2c3d4e5.html"
}
}
]
List flipbooks in a bookshelf
Get a list of all the flipbooks in a specific bookshelf, ordered by position.
Endpoint
GET https://heyzine.com/api1/bookshelf-flipbooks
Authorization: Bearer API_KEY
Request example
{
"id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2"
}
Response example
[
{
"id": "c16430e4c0cd91123474d0621b01b8f1f944f48ff85b1.pdf",
"date": "2024-11-05T13:58:48Z",
"title": "My awesome test",
"subtitle": "Flipbook conversion using the API",
"description": "The description of the flipbook",
"pages": 67,
"position": 0,
"links": {
"custom": "https://mycustomdomain.aflip.in/my-flipbook",
"base": "https://heyzine.com/flip-book/c16430e4c0.html",
"thumbnail": "https://cdn.heyzine.com/flip-book/cover/c16430e4c0.jpg",
"pdf": "https://cdn.heyzine.com/flip-book/pdf/c16430e4c0cd91123474d0621b01b8f1f944f48ff85b1.pdf"
}
}
]
Add flipbook to bookshelf
Add a flipbook to a bookshelf. Optionally specify a position to control the order.
Endpoint
POST https://heyzine.com/api1/bookshelf-add
Authorization: Bearer API_KEY
Request example
{
"id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
"flipbook_id": "c16430e4c0cd91123474d0621b01b8f1f944f48ff85b1.pdf",
"position": 2
}
Response example
{
"success": true,
"code": 200,
"msg": "Flipbook added to bookshelf"
}
Remove flipbook from bookshelf
Remove a flipbook from a bookshelf.
Endpoint
POST https://heyzine.com/api1/bookshelf-remove
Authorization: Bearer API_KEY
Request example
{
"id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
"flipbook_id": "c16430e4c0cd91123474d0621b01b8f1f944f48ff85b1.pdf"
}
Response example
{
"success": true,
"code": 200,
"msg": "Flipbook removed from bookshelf"
}
Password Protection
Configure the password protection
Configure the password-protection mode, and the text that will be used to ask for the user name and password on the flipbook´s login page.
Endpoint
POST https://heyzine.com/api1/access-setup
Authorization: Bearer API_KEY
Request example
{
"name": "1f1aa4115833b3ee73a562ca27a422119ee22dc.pdf",
"mode": "users",
"text_user": "Please, type your email:",
"text_password": "Please, type your password:"
}
Response example
{
"success": true,
"code": 200,
"msg": "Access configuration set"
}
Add user access
Grant user access to a flipbook.
email_link, email_code and send_code are only available on Premium Plans
Endpoint
POST https://heyzine.com/api1/access-add
Authorization: Bearer API_KEY
Request example
{
"name": "1f1aa4115833b3ee73a562ca27a422119ee22dc.pdf",
"access_type": "user_pass",
"user": "[email protected]",
"password": "mYp4ssW0rd"
}
Response example
{
"success": true,
"code": 200,
"msg": "Added to the access list"
}
Remove user access
Revoke user access to a flipbook.
Endpoint
POST https://heyzine.com/api1/access-remove
Authorization: Bearer API_KEY
Request example
{
"name": "1f1aa4115833b3ee73a562ca27a422119ee22dc.pdf",
"user": "[email protected]",
}
Response example
{
"success": true,
"code": 200,
"msg": "Removed from the access list"
}
Find the ID of a flipbook on your account
jQuery PDF to flipbook
jQuery plugin to convert all the PDF links on your site to flipbooks.
Usage steps:
1.-Include jquery and the plugin through a CDN or download and include them in your project:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.heyzine.com/release/jquery.pdfflipbook.4.js"></script>
2.-Call the plugin with the Client Id to convert all the links:
$('a').pdfFlipbook({ key: 'd3m0' });
3.-Optionally, you can use DOM attributes to customize the resulting flipbook and presentation:
| Parameter | Required | Description | Example |
|---|---|---|---|
| flipbook | Optional | When the element has an href, this attribute will be ignored, otherwise defines the url of the pdf file and binds a click event for navigation. | <span flipbook="/link-to-pdf.pdf">This is a flipbook</span> |
| title | Optional | Title for the page | <a flipbook="/link-to-pdf.pdf" title="title">This is a flipbook</a> |
| subtitle | Optional | Subtitle for the page | <a flipbook="/link-to-pdf.pdf" subtitle="subtitle">This is a flipbook</a> |
| showdownload | Optional | Show the download button on the flipbook page | <a flipbook="/link-to-pdf.pdf" showdownload>This is a flipbook</a> |
| showmodal | Optional | Opens the flipbook in a simple modal over the page | <a flipbook="/link-to-pdf.pdf" showmodal>This is a flipbook</a> |
See the jquery demo here: Demo
oEmbed API
oEmbed is an API that allows third-party websites and apps to fetch an Html embed code to display Heyzine flipbooks.
Discovering oEmbed URIs
Most flipbooks support oEmbed. Your application can discover the corresponding oEmbed URI by searching the flipbook for a element with the type "application/json+oembed".
For example, the flipbook sample here, includes the following link tag:
<link rel="alternate" type="application/json+oembed" href="https://heyzine.com/api1/oembed?url=https%3A%2F%2Fheyzine.com%2Fflip-book%2Fdce36e099f.html&format=json" title="PDF to Flipbook | Heyzine" />
Using oEmbed data from Heyzine in your app or website
Send a GET request to /api1/oembed, with the url parameter set to a flipbook link to get his oEmbed data.
Heyzine supports the standard oEmbed 1.0 parameters (url, format, maxwidth, and maxheight).
Request
https://heyzine.com/api1/oembed?url=https%3A%2F%2Fheyzine.com%2Fflip-book%2Fdce36e099f.html&format=json
Response
{
"type": "rich",
"version": "1.0",
"title": "Venice guide",
"provider_name": "Heyzine",
"provider_url": "https:\/\/heyzine.com",
"html": "<iframe allowfullscreen=\"allowfullscreen\" allow=\"clipboard-write\" scrolling=\"no\" class=\"fp-iframe\" style=\"width: 100%; height: 600px;\" src=\"https:\/\/heyzine.com\/flip-book\/dce36e099f.html\"><\/iframe>",
"width": 1920,
"height": 2717,
"thumbnail_url": "https:\/\/heyzine.com\/files\/uploaded\/v2\/dce36e099f71f95449f722bfc227cb4bdd1b30f0.pdf-thumb.jpg",
"thumbnail_width": 400,
"thumbnail_height": 566
}
Webhooks
Heyzine supports webhooks to notify events to an external endpoint URL with a predefined frequency.
Access your account webhooks section to define the endpoints and frequency.
Leads Webhook
The webhook will be called each time new leads are collected on any lead generation form in the account.
Request body reference:
data: {
"id_webhook": Identifier of the event,
"date": Date an time (UTC) of the event request,
"leads": [
0: {
date: Date and time (UTC) when the lead was collected,
first_value: Answer to the first field on the form,
second_value: Answer to the second field on the form,
flipbook: {
id: Identifier of the flipbook containing the form,
title: Title set on the publish settings of the flipbook
},
answer: [
0: {
label: Question on the form,
value: Lead answer,
},...
]
},...
]
}
MCP Server
The Heyzine MCP server lets AI assistants such as Claude, ChatGPT, Cursor or any other Model Context Protocol client work with your account directly: convert PDFs and office documents, list and update flipbooks, manage bookshelves and password access, and search the text of your documents.
It is a single endpoint speaking MCP over Streamable HTTP. Every tool runs the same code as the REST API described above, so plan limits, permissions and validation are identical, and the assistant can never do anything you could not do with your own API key.
Server URL
https://heyzine.com/mcp
Connection
Option 1: with your API key
The quickest way, for any client that lets you add a request header. Use the server URL plus your API key as a bearer token. Get your API key.
Clients that can only launch local commands can reach the server through the mcp-remote bridge, shown in the second example.
Remote MCP client (Claude, Codex, Cursor, VS Code)
{
"mcpServers": {
"heyzine": {
"url": "https://heyzine.com/mcp",
"headers": {
"Authorization": "Bearer API_KEY"
}
}
}
}
Option 2: sign in with Heyzine
For connectors that only ask for a URL, such as the ChatGPT and Claude connector directories. Add the server URL and nothing else.
The client discovers the authorization server on its own, opens a Heyzine login and consent screen, and stores the resulting token. There is no key to copy, and the token only works on the MCP endpoint, never on the REST API.
To revoke access, reset your API keys. That disconnects every app authorized on the account, so any other integration will have to be authorized again too.
Connector URL
https://heyzine.com/mcp
Try it with the official inspector
npx @modelcontextprotocol/inspector
Available tools
Ask the assistant in plain language, and it picks the tool. The list is here so you know what it can reach.
| Tool | What it does | Required arguments |
|---|---|---|
| heyzine_convert_attached_pdf | Turn a document attached to the conversation into a flipbook and return the finished result in the same call. | |
| heyzine_convert_pdf_async | Start converting a document from a public URL and return immediately. Call again with the same URL to check progress. Preferred way to convert a URL. | |
| heyzine_convert_pdf | Convert a document from a public URL and wait for the finished flipbook. Large documents may exceed the client timeout. | |
| heyzine_list_flipbooks | List the flipbooks in the account, most recent first. | — |
| heyzine_flipbook_details | Full details of one flipbook: URLs, page count and design settings. | id |
| heyzine_update_flipbook_design | Change the design and publication settings of an existing flipbook. | id |
| heyzine_delete_flipbook | Permanently delete a flipbook. | id |
| heyzine_set_flipbook_social | Set the title, description and thumbnail used when a flipbook is shared on social networks. | id |
| heyzine_set_bookshelf_social | Same, for a bookshelf. | id |
| heyzine_list_bookshelves | List the bookshelves in the account. | — |
| heyzine_list_bookshelf_flipbooks | List the flipbooks placed on one bookshelf, in display order. | id |
| heyzine_add_to_bookshelf | Place an existing flipbook on a bookshelf. | id, flipbook_id |
| heyzine_remove_from_bookshelf | Remove a flipbook from a bookshelf. The flipbook itself is kept. | id, flipbook_id |
| heyzine_access_setup | Configure the password protection mode of a flipbook or bookshelf. | id, mode |
| heyzine_access_add | Add a user or password to an access list. | id, access_type, user or password |
| heyzine_access_remove | Remove a user or password from an access list. | id, user or password |
| heyzine_oembed | oEmbed data, including the embed HTML, for a public flipbook URL. | url |
Password protection tools use the same id argument as the other flipbook tools, the id returned when the flipbook was created; set type to bookshelf when the target is a bookshelf.
Wherever a tool takes a flipbook or bookshelf id, the assistant may also pass the public link of the publication, the short id that appears in that link, or its custom URL path. Heyzine looks the value up among the publications of the connected account and uses the full id, so a link pasted into the chat is enough to protect, edit or delete a flipbook.
Bookshelf tools require a plan that includes bookshelves, and custom URLs require a plan with that feature.
Converting a document
The conversion tools take PDF, Word (doc, docx), PowerPoint (ppt, pptx), OpenDocument (odt, odp) and RTF files. There are two ways to hand over the document, one tool for each, and the assistant picks the right one on its own.
Attach the file to the chat, and the assistant uses heyzine_convert_attached_pdf. In ChatGPT, and any other client that can pass attachments to a connector, drop the document into the conversation and ask for a flipbook. Heyzine downloads and converts it while the tool runs, then returns the finished flipbook, so the file never has to be published or polled later.
Give a public URL, and the assistant uses heyzine_convert_pdf_async. Any direct link to a supported document works, which is what clients without file support use.
Both are idempotent: converting the same URL twice returns the same flipbook, and so does converting the same attachment twice. Uploading a second copy of a document is a new attachment, though, so that does create a second flipbook.
For MCP client developers
The endpoint accepts POST only, always answers application/json, and does not use SSE or sessions. Protocol versions 2026-07-28, 2025-11-25, 2025-06-18 and 2025-03-26 are accepted through the MCP-Protocol-Version header. A request with no token, or an invalid one, answers 401 with a WWW-Authenticate header pointing at the protected resource metadata, which is what starts the OAuth discovery below. Authorization uses OAuth 2.1 with PKCE (S256 only) and the mcp scope.
The server advertises io.modelcontextprotocol/skills under capabilities.extensions. skills/list and skills/get expose four workflow skills with complete static resource manifests, and resources/read returns each listed file with a verifiable SHA-256 digest.
Discovery and OAuth endpoints
GET https://heyzine.com/.well-known/oauth-protected-resource/mcp
GET https://heyzine.com/.well-known/oauth-authorization-server
POST https://heyzine.com/mcp/register
GET https://heyzine.com/mcp/authorize
POST https://heyzine.com/mcp/token
Calling a tool directly
POST https://heyzine.com/mcp
Authorization: Bearer API_KEY
Content-Type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "heyzine_convert_pdf_async",
"arguments": {
"pdf": "https://codingfocus.com/sample.pdf",
"title": "My awesome test"
}
}
}
A failed tool is reported as a normal result with isError set to true, so the assistant can read the error message. Protocol errors, unknown methods and invalid tool requests produce JSON-RPC errors.
API limits
With the free plan, you have up to 5 free flipbooks, after the limit the oldest publications will be removed. With a subscription you have unlimited conversions. We assume fair use of the api. Please contact us for information on special use cases.
Social Metadata
Set social metadata for a flipbook
Set the title, description, and thumbnail for the social sharing metadata of a specific flipbook.
Endpoint
POST https://heyzine.com/api1/flipbook-social
Authorization: Bearer API_KEY
Request example
{
"id": "c16430e4c0cd91123474d0621b01b8f1f944f48ff85b1.pdf",
"title": "My Flipbook Title",
"description": "A description for social sharing.",
"thumbnail": "https://example.com/image.jpg"
}
Response example
{
"success": true
}
Set social metadata for a bookshelf
Set the title, description, and thumbnail for the social sharing metadata of a specific bookshelf (library).
Endpoint
POST https://heyzine.com/api1/bookshelf-social
Authorization: Bearer API_KEY
Request example
{
"id": "library1234567890abcdef",
"title": "My Bookshelf Title",
"description": "A description for social sharing.",
"thumbnail": "https://example.com/library-image.jpg"
}
Response example
{
"success": true
}