Flipsnack API
  • API documentation
  • Getting started
  • API status codes
  • API limitations
  • How to get an API key
  • How to sign a request
  • API reference
    • collection.create
    • collection.getCollection
    • collection.update
    • collection.deleteCollection
    • collection.getEmbed
    • collection.getStats
    • collection.getList
    • collection.downloadHTML
    • user.getStats
  • Zapier
    • zapier.getZapierLeadFormSample
Powered by GitBook
On this page
  • 1. Apply for an API key
  • 2. Choose an API method
  • 3. Make a request
  • 4. Parse the response
  • 5. Handle errors

Getting started

PreviousAPI documentationNextAPI status codes

Last updated 2 years ago

1. Apply for an API key

The first thing you need to do is . The API keys are available only for users with active Enterprise accounts. Please note that the API key is secret and you should not disclose or share it with anyone else.

2. Choose an API method

Flipsnack API has two endpoints which receive API calls:

  • https://upload.flipsnack.com/v1 - for upload requests

  • https://api.flipsnack.com/v1 - for the all other requests

Once you identify the correct endpoint, you must select one of the API methods, depending on what action you wish to perform. You can select the action from the API methods listed in the API Reference.

Each method must receive a set of parameters. You must send these parameters as part of the URL when using HTTP GET requests or inside the HTTP body for HTTP POST requests. When uploading files you must use HTTP POST with encoding multipart/form-data. All other requests must be made using HTTP GET.

3. Make a request

The request (either through POST or GET) must contain at least 3 parameters. The mandatory parameters are:

  • apiKey - required for authentication. We associate the user to the API key provided

  • signature - required for authentication. Please read to see how to calculate the parameter

  • action - specifies which method should be executed

Example:

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

4. Parse the response

The response from the API will be in JSON format.

ⓘ Requesting XML formatted response using the format parameter is deprecated and we strongly recommend you to avoid it.

The response body will contain 3 parameters:

  • status - the status message corresponding to the status code

  • data - the actual data sent from the API server

If the request does not need data returned from the server (e.g. delete operations) or if the response is an error, the data parameter will be missing.

5. Handle errors

code - the status code of the response (20 for 'OK'). See other returned by the API

In case of errors, the response will contain the error code (the code parameter) along with the error message associated (the status parameter). Error messages have a code value higher than 20. Please see the list of for more details.

Note: Status messages are only descriptive. We recommend you to use the status code when checking API responses. You can find the explanation for each status code in the list.

obtain an API key
How to sign requests
status codes
status codes
status codes