Getting started

Create, publish and download your first signed envelope.

Follow these steps to create and publish your first envelope. All requests go to https://api.resly.se/v2 and need the x-resly-api-key header (see Authentication).

An envelope moves through the statuses DRAFT, SIGNING and SEALED. It starts as DRAFT, becomes SIGNING when you publish it, and becomes SEALED when everyone has signed and the final signed PDF is produced. If reviewers were added to the envelope in the Resly app, it is REVIEWING until they approve it, then SIGNING.

  1. Create Envelope. The response contains the envelope id you use in the next steps.

  2. Upload Content. Send a PDF or Word file (.pdf, .docx) as multipart/form-data in the field fileData. The file type is taken from the part's content type, so send application/pdf or application/vnd.openxmlformats-officedocument.wordprocessingml.document. Content can only be added while the envelope is DRAFT.

    curl -X POST https://api.resly.se/v2/envelopes/{envelopeId}/content \
      -H "x-resly-api-key: $RESLY_API_KEY" \
      -F '[email protected];type=application/pdf'
  3. Create Signer. A signer needs a name and, for the default email invite, an email. The default signing method is BankID, which only works for Swedish signers. For other countries, set signingMethods (the Create Signer reference lists which methods each country supports). Send the signer's ssn so only that person can sign; without it, anyone with the signing link can sign with their own BankID.

    {
      "name": "Jane Doe",
      "email": "[email protected]"
    }
  4. Publish Envelope. The envelope becomes SIGNING (or REVIEWING first, if it has reviewers) and the signers in the first signing group (signingGroup) are invited by email or SMS (ONSPOT signers get nothing). Later groups are invited when the previous group has signed. The envelope needs at least one file and one signer, and publishing counts toward your team's e-sign usage. Teams on a free plan get 402 when their e-sign limit is reached.

The shortcut

If you have the files and signers ready, Create and Publish Envelope does all four steps in one request. Files are sent base64-encoded in JSON (plain base64, no data: prefix). Add ?dryrun=true to validate the request without creating anything; a valid request returns {}. A dry run checks team rules (SMS verification, blocked publishing), but not the e-sign limit or the PDF contents, so the real request can still fail on those.

{
  "signers": [
    {
      "name": "Jane Doe",
      "email": "[email protected]"
    }
  ],
  "files": [
    {
      "fileData": "JVBERi0xLjcK...",
      "filename": "contract.pdf"
    }
  ]
}

Unknown fields in a request body are ignored, not rejected, so check field names against the reference. Unknown query parameters are rejected with 400.

After publishing

  • Get the envelope with Get Envelope and read status, or subscribe to the envelope.sealed webhook (set it up in the Resly app, see Webhooks).
  • Once a signer is invited (when their signing group is reached), they have a publicSigningUrl where they sign. Use it to open signing yourself for ONSPOT signers.
  • Once the envelope is SEALED, call Download Content (GET /content/envelopes/{envelopeId}/{fileId}) for each content[].sealedFileData.fileId; there is one signed PDF per content item. The response is JSON with a url that is valid for 600 seconds and needs no API key.