SDKs overview

Formstack provides Software Development Kits (SDKs) and libraries to facilitate programmatic interaction with its platform, including Formstack Forms, Documents, and Sign. These tools allow developers to integrate Formstack functionalities directly into custom applications, automate workflows, and manage data programmatically. The core interaction is typically through a RESTful API architecture, with SDKs acting as language-specific wrappers that simplify HTTP requests and response handling. Formstack's developer resources cover authentication, endpoint descriptions, and data structures for various operations, such as submitting form data, retrieving entries, and managing documents or e-signatures.

Integrating with Formstack's API via an SDK enables use cases such as pre-populating forms with existing data, triggering document generation based on application events, or embedding e-signature workflows within a larger application suite. The availability of both official and community-contributed libraries extends support across multiple programming languages and development environments, allowing developers to choose tools best suited for their projects.

Official SDKs by language

Formstack maintains official SDKs for several popular programming languages, designed to streamline API interactions. These SDKs typically handle API authentication (primarily using OAuth 2.0), request formatting, and response parsing, reducing the boilerplate code developers need to write. The official libraries are supported by Formstack and are often the recommended approach for integrating with the platform.

Official Formstack SDKs
Language Package Name Install Command Maturity Description
PHP formstack/formstack-api-php composer require formstack/formstack-api-php Stable A PHP client for interacting with the Formstack API, providing methods for form management and data submission.
Ruby formstack-api gem install formstack-api Stable A Ruby gem for accessing Formstack's API, simplifying interactions for Ruby applications.
Node.js @formstack/api npm install @formstack/api Stable An official Node.js package for integrating with Formstack's platform, supporting modern JavaScript environments.

These official SDKs are regularly updated to reflect changes and additions to the Formstack API. Developers can find detailed documentation and examples for each SDK on the Formstack developer portal, which includes specific API endpoint references and usage instructions (see Formstack's help documentation).

Installation

Installing Formstack SDKs follows standard package management practices for each respective language. Below are typical installation instructions for the officially supported SDKs.

PHP

The Formstack PHP SDK is distributed via Composer, the dependency manager for PHP. Ensure Composer is installed on your system.

composer require formstack/formstack-api-php

After installation, you can include the autoloader in your project:

require 'vendor/autoload.php';

Ruby

The Formstack Ruby gem is available through RubyGems. You can install it using the gem command.

gem install formstack-api

Then, require it in your Ruby application:

require 'formstack-api'

Node.js

The Formstack Node.js SDK is published on npm, the package manager for JavaScript. Use npm or yarn to install it.

npm install @formstack/api
# or
yarn add @formstack/api

You can then import it into your JavaScript or TypeScript projects:

const Formstack = require('@formstack/api');
// or for ES Modules
import Formstack from '@formstack/api';

Quickstart example

This quickstart example demonstrates how to retrieve a list of forms using the Node.js SDK. Before running, ensure you have initialized the SDK with your Formstack API key or OAuth token. You can find details on obtaining API credentials within the Formstack API documentation.

import Formstack from '@formstack/api';

// Replace with your actual Formstack API access token
const accessToken = 'YOUR_FORMSTACK_ACCESS_TOKEN';

const formstackClient = new Formstack({
  accessToken: accessToken,
});

async function listForms() {
  try {
    const response = await formstackClient.forms.list();
    console.log('Successfully fetched forms:', response.data.forms);

    if (response.data.forms.length > 0) {
      console.log('First form name:', response.data.forms[0].name);
      console.log('First form ID:', response.data.forms[0].id);
    } else {
      console.log('No forms found in your account.');
    }
  } catch (error) {
    console.error('Error fetching forms:', error.message);
    if (error.response) {
      console.error('API Error Response:', error.response.data);
    }
  }
}

listForms();

This example initializes the Formstack client with an access token and then calls the forms.list() method to fetch all forms associated with the authenticated account. It then logs the names and IDs of the retrieved forms. Error handling is included to catch potential issues during the API call, such as network errors or invalid credentials.

For more complex operations, such as submitting form entries, generating documents, or managing e-signatures, refer to the specific method calls available within the respective SDK documentation provided by Formstack. These operations typically involve constructing request bodies with form data or document parameters and handling the API responses accordingly. The Formstack API supports various actions, including creating, reading, updating, and deleting resources across its product suite.

Community libraries

Beyond the official SDKs, the developer community has contributed various libraries and integrations for Formstack's API. These community-driven projects can offer support for additional programming languages, frameworks, or specific use cases not covered by official offerings. While not officially maintained by Formstack, community libraries can provide valuable resources and alternative approaches for integrating with the platform.

When considering a community library, it is advisable to evaluate its maintenance status, documentation quality, and community support. Factors such as recent updates, open issues, and the responsiveness of contributors can indicate the library's reliability. Developers can often find these projects on platforms like GitHub or package repositories specific to their programming language. For example, a search for "Formstack API" on GitHub topics page may reveal relevant community projects.

Common types of community contributions include:

  • Client Libraries for other languages: Implementations in languages like Python, C#, or Go, which might not have an official Formstack SDK.
  • Framework-specific integrations: Plugins or modules designed for popular web frameworks (e.g., Django, Ruby on Rails, Laravel) that abstract Formstack API interactions into framework-native patterns.
  • Utility tools: Scripts or applications that perform specific tasks using the Formstack API, such as bulk data migration, recurring report generation, or custom webhook handlers.

Always verify the security and functionality of any third-party library before integrating it into production systems. Reviewing the source code and understanding its dependencies is a recommended practice for community-contributed tools.