Getting Started with Flipsnack API

The Flipsnack API allows developers to integrate with Flipsnack from third-party systems.

With the API, you can:

  • Upload files to create new collections
  • Update collection settings
  • Delete collections
  • Retrieve collection data
  • Get a list of user collections
  • Access statistics for workspaces or individual collections
  • Get embed codes for collections
  • Generate and download HTML packages

API Key: Required for access, valid during the subscription period. Abuse leads to banning and key deactivation.

Get up and running with Flipsnack public API

1. Apply for an API Key

Obtain an API key, available for Enterprise account users. Keep the API key secret and secure.

2. Choose an API Method

Flipsnack API has two endpoints:

  • https://upload.flipsnack.com/v1 for uploads
  • https://api.flipsnack.com/v1 for other requests

Select an API method and include parameters in the URL for GET requests or in the HTTP body for POST requests.

3. Make a Request

Include these mandatory parameters in your request:

  • apiKey for authentication
  • signature for authentication
  • action specifying the method to execute

Example: https://api.flipsnack.com/v1/?apiKey={apiKey}&signature={signature}&action={method}

4. Parse the Response

Responses are in JSON format, containing:

  • code (status code)
  • status (status message)
  • data (returned data, if applicable)

5. Handle Errors

Error responses include an error code and message. Check the status codes for more details.

For more details, visit the Flipsnack API Getting Started Guide. 

Flipsnack API Status Codes

Flipsnack's API returns various status codes to indicate the result of your requests. Here are some key codes:

  • 20 OK: Request was successful.
  • 22 Maintenance mode: API servers are in maintenance.
  • 30 Missing mandatory parameter: Required parameters are missing.
  • 31 Requests per second limit exceeded: Too many requests per second.
  • 32 Requests per minute limit exceeded: Too many requests per minute.
  • 33 Uploads per month exceeded: Monthly upload limit reached.
  • 34 File size too large: File exceeds size limit.
  • 35 Collection maximum pages number exceeded: Exceeds 500 pages.
  • 40 Bad request: Incorrectly formatted request.
  • 41 Invalid credentials: Invalid API key.
  • 45 Invalid file format: Incorrect file type.
  • 50 Operation failed: Server error, try again later.

For the full list and detailed explanations, visit the Flipsnack API Status Codes page.

Flipsnack API Limitations

Upload Limitations

  • Enterprise Plan: Max 1000 uploads per month.
  • Exceeding uploads returns error code "32 - Uploads per month limit exceeded."

File Limitations

  • Accepted Formats: PDF or JPG.
  • collection.create Limits: Single PDF, max 500MB, and 1000 pages.

Request Limitations

  • Rate Limits: 5 calls per second, 60 calls per minute.
  • Exceeding requests returns error code "31 - Requests per second limit exceeded."

Relevant Error Codes

  • 31: Requests per second limit exceeded.
  • 32: Requests per minute limit exceeded.
  • 33: Uploads per month exceeded.
  • 34: File size too large.
  • 35: Collection maximum pages number exceeded.
  • 36: Multiple files upload not allowed.

For detailed information, visit the Flipsnack API Limitations page.

How to Get an API Key for Flipsnack

API keys are available only for valid Enterprise accounts. To obtain an API key:

  1. Sign in to your Flipsnack account.
  2. Navigate to the Settings page and select the API tab.
  3. Click the Get API Keys link to generate your API key and secret key.

Keep your API key and secret key confidential. If your keys are compromised, use the Reset API Keys link to generate new keys.

For more details, visit the Flipsnack API Key Guide.

How to Sign a Request for Flipsnack API

To sign a request for the Flipsnack API, follow these steps:

  1. Sort Parameters: Exclude signature and file parameters. Sort the remaining parameters alphabetically.
  2. Concatenate String: Create a string by concatenating the API secret key with the sorted parameters.
  3. Generate MD5 Hash: Use an MD5 hash function to generate a signature from the concatenated string.
  4. Include Signature: Append the generated signature to your API request.

Example

For apiKey, secretKey, and collectionHash:

  • Concatenate: secretKeyapiKey=value&collectionHash=value
  • MD5 Hash: Generate the hash of this string.
  • Final URL: Include &signature=md5hash in the request URL.

For detailed instructions, visit the Flipsnack API Request Signing Guide.