Centar za pomoć

REST API quickstart

Create, send, track and download an envelope from any language, with the exact request fields and endpoints.

The REST API lets your own software create, send, track and download envelopes. It is included with the plans that list it (the Team plan does), with no add-on and no separate contract. Base URL: https://signspry.com/api/v1. Requests and responses are JSON, and errors look like {"error": "…"}.

Authenticating

Create a key under API & webhooks (account menu), then send it as a bearer token:

curl https://signspry.com/api/v1/account \
  -H "Authorization: Bearer sk_live_..."

Keys are shown once, carry the scopes you tick, can expire and can be limited to certain IP addresses. Each key may make 120 requests a minute. Read API keys before you create your first one. If you are building an app that uses short-lived tokens, see OAuth2.

Create and send an envelope

curl -X POST https://signspry.com/api/v1/envelopes \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Service agreement — Acme",
    "message": "Please sign by Friday.",
    "documents": [{"name": "msa.pdf", "content_b64": "<base64 PDF>"}],
    "recipients": [
      {"name": "Rahul Menon", "email": "rahul@acme.in", "routing_order": 1}
    ],
    "use_anchors": true,
    "send": true
  }'

The response is 201 with an envelope object (its id, status, recipients and more). Leave out send (or status: "sent") to keep a draft, then send it later with POST /envelopes/{id}/send.

What you can put in the request:

FieldNotes
documents1 to 10, each with a name and content_b64. PDF, Word or plain text; see What you can upload
recipients[]name, email, routing_order, role (signer or cc) and access_code
recipients[].phone, notify, verifyphone with country code, then notify: whatsapp or sms; verify: email, whatsapp or sms for a one-time code. Channels that are not switched on return 400
expires_days, reminder_daysdefault to your Admin → Signing defaults
fields[]explicit fields; coordinates are fractions of the page (0 to 1) from the top-left, recipient is an index into recipients
use_anchorsplace fields from anchor tags in the document, so you never compute coordinates; hide_markers hides the markers

A payment field needs an amount; see Collecting payment at signature. Field types are listed in Field types.

If the plan or usage allowance blocks the send you get 402 with "upgrade": true. If the document is of a kind some laws do not allow to be signed electronically, a warnings list comes back with the envelope.

Track, remind, void, download

CallNeedsWhat it does
GET /accountaccount:readkey owner and usage
GET /envelopes?status=&limit=&offset=envelopes:readlist your envelopes (limit up to 100)
GET /envelopes/{id}envelopes:readdetail with recipients and fields
POST /envelopes/{id}/sendenvelopes:writesend a draft
POST /envelopes/{id}/remindenvelopes:writenudge pending signers
POST /envelopes/{id}/voidenvelopes:writevoid, with an optional reason
POST /envelopes/{id}/recipients/{rid}/signing-linkenvelopes:writea fresh signing URL
POST /envelopes/{id}/recipients/{rid}/embedenvelopes:writean embedded-signing URL
GET /envelopes/{id}/documentenvelopes:readthe sealed PDF, once complete
GET /envelopes/{id}/auditenvelopes:readthe hash-chained audit trail

Rather than polling GET /envelopes/{id}, subscribe to webhooks.

Build against the sandbox first. A test key behaves the same way but never emails or texts anyone, and returns the signing links.
Je li vam ovo bilo korisno?