Learn how to use each API method for seamless integration
Table of contents
- Overview
- Request and response parameters
- API Method: collection.create
- API Method: collection.getCollection
- API Method: collection.update
- API Method: collection.deleteCollection
- API Method: collection.getEmbed
- API Method: collection.getStats
- API Method: collection.getList
- API Method: collection.downloadHTML
- API Method: user.getStats
- API Method: zapier.getZapierLeadFormSample
- Next steps
Overview
The Flipsnack API (Application Programming Interface) enables businesses and developers to integrate Flipsnack seamlessly into their existing workflows. With this API, users can automate flipbook creation, update collections, access analytics, and dynamically embed content, streamlining content management and enhancing efficiency.
Key benefits
- Automation and efficiency: Streamline content creation by automating file uploads, settings updates, and data retrievals.
- Scalable content management: Manage multiple flipbooks programmatically.
- Data-driven insights: Retrieve user or flipbook data to track engagement and performance.
Requirements
- Plan: API access is available on demand as part of the Enterprise plan.
- Target audience: Developers, IT professionals, automation engineers, and business teams looking to integrate Flipsnack into their existing workflows.
Request and response parameters
The Flipsnack API uses RESTful requests and returns JSON responses.
API Method: collection.create
Creates a new collection with a flipbook item. This means that a new flipbook will be created in your account.
Required Parameters
- apiKey: Your API key.
- signature: MD5 hash signature. For more details on creating a signature, refer to this page.
- action: collection.create.
- file: PDF / JPG / PNG file to upload (only one file can be uploaded).
Example Request
curl -X POST "https://upload.flipsnack.com/v1/" \
-F 'file=@"document.pdf";filename="document.pdf"' \
-F "action=collection.create" \
-F "apiKey=<YOUR-API-KEY>" \
-F "signature=<YOUR-REQUEST-SIGNATURE>"
Response
Returns a JSON object with flipbook details, including title, description, thumbnail URL, status, and settings. Converting and publishing might take a few seconds, during that time the status of the flipbook will be “processing”. Use collection.getColection to check the status of your flipbook.
For comprehensive details, visit the Flipsnack API Reference for collection.create.
API Method: collection.getCollection
Retrieves details of a flipbook.
Required Parameters
- apiKey: Your API key.
- signature: MD5 hash signature.
- action: collection.getCollection.
- collectionHash: Unique identifier for the collection.
Example Request
curl -X GET "https://api.flipsnack.com/v1/" \
-G \
-d action=collection.getCollection \
-d apiKey=<YOUR-API-KEY> \
-d collectionHash=<COLLECTION-HASH> \
-d signature=<YOUR-REQUEST-SIGNATURE>
Response
Returns flipbook details, including title, description, thumbnail URL, status, and settings.
For more details, visit the Flipsnack API Reference for collection.getCollection.
API Method: collection.update
Updates the settings of an existing flipbook. Because the flipbook will be republished, it might also take a few seconds before your changes go live. To confirm your updates are active, we recommend checking the flipbook’s status with collection.getColection. Refer to the full documentation for a full list of parameters that can be modified.
Example Request
curl -X GET "https://api.flipsnack.com/v1/" \
-G \
-d action=collection.update \
-d apiKey=<YOUR-API-KEY> \
-d collectionHash=<COLLECTION-HASH> \
-d title="New Title" \
-d signature=<YOUR-REQUEST-SIGNATURE>
Response
Returns a JSON object with updated details, including title, description, thumbnail URL, status, and settings
Warning: This method is not available while the collection is in the processing state
For full details, visit the Flipsnack API Reference for collection.update.
API Method: collection.deleteCollection
Delete a collection in Flipsnack.
Example Request
curl -X GET "https://api.flipsnack.com/v1/" \
-G \
-d action=collection.deleteCollection \
-d apiKey=<YOUR-API-KEY> \
-d collectionHash=<COLLECTION-HASH> \
-d signature=<YOUR-REQUEST-SIGNATURE>
Response
Returns status code 20 - OK if successful.
For detailed instructions, visit the Flipsnack API Reference for collection.deleteCollection.
API Method: collection.getEmbed
Retrieves embed code for a flipbook.
Required request parameters:
- apiKey: Your API key.
- signature: MD5 hash signature.
- action: Must be collection.getEmbed.
- collectionHash: The hash of the collection to get the embed code.
Optional parameters:
- https: Deprecated. Default: true.
- responsive: If true, the embed will take the full container size. Default: false.
- startPage: Page number where the flipbook will open. Default: 1.
- width: Width of the embed.
- height: Height of the embed.
Example request:
curl -X GET "https://api.flipsnack.com/v1/" \
-G \
-d action=collection.getEmbed \
-d apiKey=<YOUR-API-KEY> \
-d collectionHash=<COLLECTION-HASH> \
-d signature=<YOUR-REQUEST-SIGNATURE>
Response:
Returns a JSON object with the embed code.
For detailed instructions, visit the Flipsnack API Reference for collection.getEmbed.
API Method: collection.getStats
Retrieves statistics for a specified collection in Flipsnack.
Required request parameters:
- apiKey: Your API key.
- signature: MD5 hash signature.
- action: Must be user.getStats.
Optional Parameters:
- startDate: Start date for the statistics interval (YYYY-MM-DD).
- endDate: End date for the statistics interval (YYYY-MM-DD).
- includePageStats: If true, returns statistics for each page.
Example request:
curl -X GET "https://api.flipsnack.com/v1/" \
-G \
-d action=user.getStats \
-d apiKey=<YOUR-API-KEY> \
-d signature=<YOUR-REQUEST-SIGNATURE>
Response:
Returns a JSON object with statistics such as:
- impressions: Total player loads.
- views: User interactions with the player.
- time_spent: Total viewing time in seconds.
- downloads: Number of document downloads.
- api_uploads_left: Remaining uploads via API.
For detailed instructions, visit the Flipsnack API Reference for user.getStats.
API Method: collection.getList
Returns a list of flipbooks belonging to the user, from a folder or the whole account.
Required request parameters:
- apiKey: Your API key.
- signature: MD5 hash signature.
- action: Must be collection.getList.
Optional parameters:
- collectionStatus: Type of collection (public, editable, unlisted).
- query: Search query for titles and descriptions.
- from: Starting record index. Default: 0.
- to: Ending record index. Default: 50.
- orderBy: Field to order by (date_published, date_created, name). Default: date_published.
- orderMode: Order direction (asc, desc). Default: desc.
- folder: Folder path where collections are stored.
Example request:
curl -X GET "https://api.flipsnack.com/v1/" \
-G \
-d action=collection.getList \
-d apiKey=<YOUR-API-KEY> \
-d collectionStatus=public \
-d from=0 \
-d to=2 \
-d signature=<YOUR-REQUEST-SIGNATURE>
Response:
Returns a JSON object with the total number of matching collections and a list of collections.
For detailed instructions, visit the Flipsnack API Reference for the collection.getList.
API Method: collection.downloadHTML
Generates and lets you download an HTML package for a flipbook. As this process might also take a few seconds or more, we recommend using the collection.getCollection method to retrieve the status of your publication.
Required request parameters:
- apiKey: Your API key.
- signature: MD5 hash signature.
- action: Must be collection.downloadHTML.
- collectionHash: The hash of the collection to download.
Example request:
curl -X GET "https://api.flipsnack.com/v1/" \
-G \
-d action=collection.downloadHTML \
-d apiKey=<YOUR-API-KEY> \
-d collectionHash=<COLLECTION-HASH> \
-d signature=<YOUR-REQUEST-SIGNATURE>
Response:
Returns a JSON object with the status of the request and a URL to download the HTML package once the generation is complete.
Process:
- Request HTML Package: Send the request with the necessary parameters.
- Check Status: The response will include a status code and, if successful, a URL to download the package.
- Download Package: Use the provided URL to download the HTML package.
For more details, visit the Flipsnack API Reference for collection.downloadHTML.
API Method: user.getStats
Retrieves global statistics for all flipbooks under the user account.
Required request parameters:
- apiKey: Your API key.
- signature: MD5 hash signature.
- action: Must be user.getStats.
Example request:
curl -X GET "https://api.flipsnack.com/v1/" \
-G \
-d action=user.getStats \
-d apiKey=<YOUR-API-KEY> \
-d signature=<YOUR-REQUEST-SIGNATURE>
Response:
Returns a JSON object with statistics such as:
- impressions: Total player loads.
- views: User interactions with the player.
- time_spent: Total viewing time in seconds.
- downloads: Number of document downloads.
- api_uploads_left: Remaining uploads via API.
For detailed instructions, visit the Flipsnack API Reference for user.getStats.
API Method: zapier.getZapierLeadFormSample
Provides sample data from lead forms, for Zapier integration.
Required request parameters:
- apiKey: Your API key.
- action: Must be zapier.getZapierLeadFormSample.
- collectionHash: The hash of the collection to retrieve sample data.
Example request:
curl -X GET "https://api.flipsnack.com/v1/" \
-G \
-d action=zapier.getZapierLeadFormSample \
-d apiKey=<YOUR-API-KEY> \
-d collectionHash=<YOUR-COLLECTION-HASH>
Response:
Returns a JSON object with sample data, including fields such as "Email address", "Full name", "Phone number", and more.
For detailed instructions, visit the Flipsnack API Reference for zapier.getZapierLeadFormSample.
Next steps
Explore detailed API documentation
For developers needing in-depth technical details, you can visit the Flipsnack API Documentation.
Need expert support?
Our team is here to help. Connect with our team experts or message us via the in-app chat for a personalized demo.