Docs
Recipes

Send a Contract for Signature

When your HR system makes a contract, send it through Agoo to be signed, hear when it's done and keep the sealed PDF.

Preview

This is a published preview. Names and fields may still change before general availability; changes will be listed in the changelog.

You need a secret key with signing:write and signing:read, on Pro or Enterprise. Test mode works on every plan.

Send It

Send the PDF, base64-encoded, up to 20 MB. Someone in your directory signs in Agoo; anyone else gets a one-time link by email, SMS or both, chosen for this message.

Send for signature
curl https://api.agoohq.com/v1/signing-requests \
  -H "Authorization: Bearer $AGOO_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Contract of Employment",
    "order": "in_order",
    "documents": [{ "title": "Contract", "content_base64": "'"$(base64 < contract.pdf)"'" }],
    "signers": [
      { "person_id": "person_01m6k4d6f8h0k2m4p6r8t0v2xz", "role": "signer" },
      { "name": "Efua Mensah", "email": "efua@example.com", "channels": ["email"], "role": "witness" }
    ]
  }'

A new file is checking until its virus check passes, then sent.

Hear When It's Done

Subscribe a webhook endpoint to signing.completed and signing.declined. See webhooks.

Keep the Sealed PDF

Download it
curl -o sealed.pdf \
  https://api.agoohq.com/v1/signing-requests/$REQUEST_ID/documents/$DOCUMENT_ID/sealed?download=true \
  -H "Authorization: Bearer $AGOO_SECRET_KEY"

The Repr-Digest header carries its SHA-256. The file carries a PAdES signature in your organisation's name, with a certificate page and a QR code that anyone can use to check it. No Agoo account is needed to check it, and no Agoo service has to be up to check its signature against the published certificate:

Check it yourself
pdfsig sealed.pdf

A reader will say the signer isn't trusted, because the seal doesn't come from a certification authority. Compare its certificate's fingerprint with the one on the verification page.

Good to Know

  • Up to ten documents and 25 signers. Each document is sealed separately, with its own ID.
  • A power of attorney, statutory declaration, affidavit, will, trust or land conveyance can't be signed electronically under Ghana's Electronic Transactions Act (s.4).
  • Requests for identity, disciplinary or health documents aren't returned to API keys.

On this page