PactSafe

The PactSafe Developer Hub

Welcome to the PactSafe developer hub. You'll find comprehensive guides and documentation to help you start working with PactSafe as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Guides

Our REST API

What is it?

Our REST API is a comprehensive set of APIs to connect to PactSafe for things like creating or versioning contracts, updating user information, sending contracts manually, and more.

When should I use it?

Our entire user interface is built on top of our REST API, so any function besides the simple latest, retrieve, and send calls of our Activity API will require our REST API.

Here are some examples for when you'd want to use our API:

  • You need to retrieve the content of a Contract stored in PactSafe.
  • You want to send a Contract to an individual for electronic signature.
  • You want to retrieve or update metadata about a contract like tags, name, or description.
  • You want to update a user's login details.
  • You want to retrieve detailed activity for a signer.

Where do I learn more?

Check out our REST API docs for more information. There are a lot of amazing resources to help you get started–including sample code, the API explorer, and more.

Who is PactSafe? PactSafe is a secure contract management platform, the world's fastest electronic signature, and contract analytics solution for business contracts, web and mobile apps, and other contracts that are executed online with your customers. The Vault Developer Tooklit provides you tools to plug in to your websites or mobile apps to help your business unify signatures across all your contracts.

The rest API exposes CRUD operations on all of the core PactSafe resources. We follow conventional RESt methods and protocols using POST (create), GET (retrieve), PATCH (update), and DELETE (delete).

All data is sent and received as JSON, and all requests require an OAuth Access Token for authorization. An OAuth Access Token can be created for your user bycreating one in your account.

API Resource Overview

The endpoint for the PactSafe API is https://api.pactsafe.com. The current version of the API is 1.1

There are several objects with important relationships core to the PactSafe system to think about as you're integrating your app. Here are some basic concepts that will introduce you to how the system works.

  • A contract is a first party object and houses basic metadata like title, description, and more.
  • A contract has many version that are drafted and published (all of which can be done either in our interface or via the REST API.
  • A contract has both a latest_version and a published_version object attached to it to keep track of new versions that are still in draft.
  • A signer is someone who is actually signing a contract either inside a clickwrap or through a signature request.
  • You can create a request (for signature) between one or many signers(s).
  • A version of a contract can have many revision(s) within a request.

Other things of note

There are many other facets to the system that are important to know when it comes to our system architecture as you become more familiar with the system:

  • An account can have many site(s) which act as a sub-tenant within your environment. One site is your default, which controls how a contract can be shared across an account.
  • A user can have access to one account or many, one site or many.

Basics of the API

  • Want to limit the number of results on your GET request? simply add ?per_page=5 to define your own pages. Default is 25 per page.
  • For pagination add ?page=2 to your GET request.
  • You can expand the data you return on any GET call by adding ?expand=<field_name>,<field_name> where `<field_name> is the name of any top-level property on the object you are calling.
  • To filter your API requests, there's a simple parameter filter you can append to your call with the field name and value.
  • Filtering example: /agreements?filter=classification==privacy_policy and published==true will return a filtered set of agreements. Note Please URL encode your requests for reliable responses!
  • Filtering dates can be done with > or < and the date format YYYY-MM-DD. Times are filtered against GMT.