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

Sending Contracts 101

What you need to get started

You only need a few things to get started sending Contracts via the REST API:

  1. A PactSafe account with REST API access. Looking to test first? Request a developer account here.
  2. You'll need to create an API key in your PactSafe profile here. All REST API calls require authentication.
  3. You'll need to create & publish a Contract in PactSafe and get the ID (it's the integer in the URL). Learn more on that here.

Typical Flow to Sending Contracts

There are 3 steps required for sending Contracts:

  1. Contract Created and Published
  2. Create a Request
  3. Send a Request

What's a "Request"?

A Request encompasses the entire experience of sending contracts to a Signer, including but not limited to: who receives the contracts, where they are sent, and which contracts get sent.

Create a Request

To create a request, you'll do a POST to https://api.pactsafe.com/v1.1/sites/:id/requests with a JSON request body, similar to the following:

{
  "name": "My Request Name!",
  "contracts": [1],
  "signers": [
    {
      "signer_id": "[email protected]",
      "signer": {
        "email": "[email protected]",
        "mobile_number": "317-123-1234",
        "additional_attributes": {
          "first_name": "Test",
          "last_name": "Test"
        }
      },
      "send_to": {
        "email": true, // true if you want them to receive by email
        "mobile_number": true // true if you want them to also receive an sms asking for acceptance
      }
    }
  ]
}

Once you have done the POST, you will receive back a response body containing the full request, including other default properties as part of a typical Request. You'll want to retrieve the id of the response body to move onto the next step....sending!

Send a Request

To send a request, it's as simple as doing a POST to https://api.pactsafe.com/v1.1/requests/:request_id/send.

Contracts Must be Published (i.e. not a draft)

Please make sure that the contracts you plan on sending are published prior to creating the Request.

Updated 2 months ago



Sending Contracts 101


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.