DEV Community

Vouch
Vouch

Posted on

E-signatures in your app with one POST request

Most apps that need a signature end up sending people to another site and copying the result back by hand. Here is the whole round trip with the vouch.ink API: send a PDF, get told when it's signed, download it, and check its audit trail.

1. Send a document

curl -X POST https://api.vouch.ink/v1/documents \
  -H "Authorization: Bearer $VOUCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Freelance agreement",
    "file_url": "https://example.com/agreement.pdf",
    "recipients": [{"name": "Sam Lee", "email": "sam@example.com"}],
    "webhook_url": "https://yourapp.example/hooks/vouch"
  }'
Enter fullscreen mode Exit fullscreen mode

recipients takes up to 20 people. Add "routing" and "order" when they must sign one after another, and "expires_in_days" (1 to 365, default 30). You can send the file as file_base64 instead of a URL.

2. Hear about it

Pass webhook_url on the document, or register one endpoint for everything with POST /v1/webhook_endpoints. GET /v1/events lists what happened if you would rather poll.

3. Get the signed PDF

curl -H "Authorization: Bearer $VOUCH_API_KEY" \
  https://api.vouch.ink/v1/documents/DOC_ID/signed.pdf -o signed.pdf
Enter fullscreen mode Exit fullscreen mode

4. Check the audit trail

GET /v1/documents/DOC_ID/audit returns the hash-chained trail: each event carries the hash of the one before it, so an edit anywhere breaks the chain. GET /v1/verify/{ref} checks a document by its reference.

Also there: remind, void, and accounts for platforms that sign on behalf of their own customers.

What it costs

The API plan is $39 a month for 100 documents (or $29 a month billed yearly), then packs of 100. Full reference: https://api.vouch.ink/docs. Plans: https://vouch.ink/pricing?utm_source=devto&utm_medium=article&utm_campaign=api-roundtrip-w48

Written by the Vouch team with AI help.

Top comments (0)