API Documentation
API Documentation

Overview

The Jotform API makes it possible to connect to your form data without using the Jotform web site.

The Jotform API is written for Jotform users and 3rd party developers who would like to serve Jotform users. For example, Zapier uses the Jotform API to connect form submission data with other services.

Care to tell us how you would like to use Jotform API? Feel free to fill this form. We'd be happy to help you—we’ll even assign a developer to help you with your task!

Upgrade to Enterprise to make your API url your-domain.com/API or subdomain.jotform.com/API instead of api.jotform.com Learn more about Jotform Enterprise

Getting Started

To get started using Jotform API you need a valid API key. Obtaining an API key is very simple.

  • 1. Go to My Account
  • 2. Navigate to API Section
  • 3. Create a new API Key
My Account API Settings

Get started with the Jotform API by using an API library in the language of your choice. See libraries section for a complete list.

Authentication

The Jotform API supports more than one authentication method to simplify the authentication process in different programming languages.

1. Authenticate with Query Parameters

You can send your API Key with your query as a parameter

GET An example call to get user details

    curl -X GET "https://api.jotform.com/user?apiKey={myApiKey}"
    
POST An example call to setup a new webhook

    curl -X POST -d "webhookURL=http://my.webhook.url/connect-to-DB.ext" -d "apiKey={myApiKey}" "https://api.jotform.com/v1/form/{myFormID}/webhooks"

2. Authenticate with HTTP Headers

You can send your API Key with your query as a HTTP header

An example call to get user details by HTTP header

    curl -H "APIKEY: {myApiKey}" "https://api.jotform.com/user"

3. Authenticate with Javascript SDK

You can authenticate users through Jotform by using our Javascript SDK.

1. First, you should call JF.login() to launch a login form within an iFrame pop-up to prompt a user to sign-in. If the user authenticates successfully, (s)he will be asked to allow permissions to access to her account. You can pass callback functions to JF.login for both successful and failed authorizations. Authorize Window

<script src="https://js.jotform.com/JotForm.js"></script>
<script>

    //JF.login(success, error) method takes two optional arguments
    //Both arguments should be function 
    //First argument will be called after successful login
    //Second argument will be called if authorization fails
    JF.login(

        function success(){
            JF.getForms(function(response){
                for(var i=0; i<response.length; i++){
                    document.write( "<li> " + response[i].title);
                }
            });
        },

        function error(){
            window.alert("Could not authorize user");
        }
    ); 
</script> 
                            
2. At this point, we can use the API to perform actions. But, what if we want to be able to store this authentication so that we can use it in the future? To be able to do that, you need to get the user's API key and save it in your servers. In order to obtain API key from SDK, call JF.getAPIKey method.

var apiKey = JF.getAPIKey();
console.log(apiKey); //should log currently used API key
                            


Once you have the API key, you can call JF.initialize({apiKey: "123456789"}) and then call any other API methods. Note that JF.login method will automatically call initialize method after successful login.

JF.initialize( {apiKey: "123456789"} ); 
                            

Libraries

Github Repositories

Android : https://github.com/jotform/jotform-api-android - ZIP or Tarball
C# : https://github.com/jotform/jotform-api-csharp - ZIP or Tarball
GO : https://github.com/jotform/jotform-api-go - ZIP or Tarball
iOS : https://github.com/jotform/jotform-api-ios - ZIP or Tarball
Java : https://github.com/jotform/jotform-api-java - ZIP or Tarball
NodeJS : https://github.com/jotform/jotform-api-nodejs - ZIP or Tarball
PHP : https://github.com/jotform/jotform-api-php - ZIP or Tarball
Python : https://github.com/jotform/jotform-api-python - ZIP or Tarball
Ruby : https://github.com/jotform/jotform-api-ruby - ZIP or Tarball
Scala : https://github.com/jotform/jotform-api-scala - ZIP or Tarball


Installation Notes


PHP Client Library

Simply download Jotform.php into your application path and include in your php file as:

include "../Jotform.php";

More info available on repository page at Github.


Python Client Library

There is currently no package submitted to PyPi. You need to download and import jotform.py as follows.

from jotform import JotformAPIClient

More info available on repository page at Github.


Java Client Library

Java client library is not available as a '.jar' file so you have to copy the folder structure of Jotform Java package into your project. Jotform API Java client uses Apache HTTP Client 4.2.5 and org.json packages. So in order to work with the api client you need to add them to your project.

First check out the git repository and add the following files into your src folder as:

/src/com/jotform/api/JotformAPIWrapper.java
/src/com/jotform/api/JotformException.java
/src/com/jotform/api/samples/GetTodaysSubmissions.java
/src/com/jotform/api/samples/PrintFormList.java
/src/org/json/JSONArray.java
/src/org/json/JSONException.java
/src/org/json/JSONObject.java
/src/org/json/JSONString.java
/src/org/json/JSONStringer.java
/src/org/json/JSONTokener.java
/src/org/json/JSONWriter.java

Then copy the contents of the /lib/ folder into your project with the same path.

/lib/commons-logging-1.1.1.jar
/lib/httpclient-4.2.5.jar
/lib/httpcore-4.2.4.jar

Then you will need to add these .jars into your buildpath. If you are using eclipse, you can simply right click on each jar file and click Build Path->Add To Build Path. If the jars are not visible in your project explorer even though you copied them into your lib/ folder, try right clicking on your project in Package Explorer and then clicking refresh.

More information available on repository page at Github.

Javascript Client Library Copy and paste the script below to your page
<script src="https://js.jotform.com/JotForm.js"></script>
NodeJS Client Library
npm install jotform

More information available on repository page at Github.

Use cases

You can find some use cases in API Use Cases Repository

  • Calculate Survey Result Percentages : Example written with API PHP library to calculate the percentages of star rates/radio buttons in the form submissions.
  • Download your submissions' uploaded files to your computer, implemented with Ruby.
  • Combine Submissions from different forms into one .csv file. Implemented with JavaScript and PHP.
  • Contribution Map : See where submissions come from. Implemented with JavaScript only.
  • Jotform Views : List and display Submissions blended with your imagination. Made so easy. Implemented with JavaScript and PHP.
  • Populate Fields : A script that creates urls to prepopulate your forms with your desired values. Implemented with JavaScript.
  • Answer Comparator : This script compares the current form entries to those that have already been submitted by previous users. Implemented with JavaScript and PHP.
  • Import Submissions : This script imports data from .CSV and Microsoft Excel files and submits them to Jotform via the PHP API. Implemented with JavaScript and PHP.

  • Do you have an use case to share with us? Fork our repository, commit your code and open a pull request!

    Do you want us to implement examples for you? Contact Us and let us know your request!

    FAQ

    What is Jotform API?

    Jotform API allows you to access your Jotform account, forms and form submissions. Writing applications, integrations and scripts with Jotform API is very easy since it is based on REST principles. Code samples are also available on most common languages such as PHP, Java, Python, NodeJS and GO.

    What are the most common uses for Jotform API?

  • Integration with a 3rd party app to process existing form submission data, or to receive submission notifications with webhooks.
  • Mobile frontend apps for Jotform.
  • To Process form submission data to with your own scripts.
  • What is covered in Version 1?

    Jotform API v1 is mostly read only. You can get information about the Jotform user and forms. You can also download existing form data.

    Are there any restrictions?

    API Keys are limited to:
  • 1000 requests per day for the starter plan
  • 10000 requests per day for the bronze plan
  • 50000 requests per day for the silver plan
  • 100000 requests per day for the gold plan
  • Jotform Enterprise has no limits to the number of daily API calls.

    You can get more information about the limits from our article Daily API Call Limits.
    If you need your limits to be increased please contact us.

    Where can I get an API Key?

    You can get your Jotform API Key from API section at My Account.

    Does Jotform API supports JSONP?

    Yes, Jotform API supports JSONP requests. You can simply add "callback" variable with your callback function's name to your API requests.

    Example usage: https://api.jotform.com/user?apiKey={APIKey}&callback=myCallBackFunction

    If you have any further question, please contact API Team.