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.
-
Create Envelope. The response contains the envelope
idyou use in the next steps. -
Upload Content. Send a PDF or Word file (.pdf, .docx) as
multipart/form-datain the fieldfileData. The file type is taken from the part's content type, so sendapplication/pdforapplication/vnd.openxmlformats-officedocument.wordprocessingml.document. Content can only be added while the envelope isDRAFT.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' -
Create Signer. A signer needs a
nameand, for the default email invite, anemail. The default signing method is BankID, which only works for Swedish signers. For other countries, setsigningMethods(the Create Signer reference lists which methods each country supports). Send the signer'sssnso only that person can sign; without it, anyone with the signing link can sign with their own BankID.{ "name": "Jane Doe", "email": "[email protected]" } -
Publish Envelope. The envelope becomes
SIGNING(orREVIEWINGfirst, if it has reviewers) and the signers in the first signing group (signingGroup) are invited by email or SMS (ONSPOTsigners 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 get402when 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 theenvelope.sealedwebhook (set it up in the Resly app, see Webhooks). - Once a signer is invited (when their signing group is reached), they have a
publicSigningUrlwhere they sign. Use it to open signing yourself forONSPOTsigners. - Once the envelope is
SEALED, call Download Content (GET /content/envelopes/{envelopeId}/{fileId}) for eachcontent[].sealedFileData.fileId; there is one signed PDF per content item. The response is JSON with aurlthat is valid for 600 seconds and needs no API key.