Your app needs clients to sign something: a booking form, a services agreement, an onboarding pack. A coding agent such as Claude Code, Codex or Cursor can open the GoodSign account itself, hand you one payment link, and carry on building with a working API key. This guide shows the prompt, each request and the cost.
curl./profile/apikeys.Paste this, with your own details:
Our app needs clients to sign a booking form (booking-form.pdf). Use the
GoodSign e-signature API. Read https://goodsign.io/api/help and
https://goodsign.io/esignature-api.md first.
If GOODSIGN_API_KEY is not set, open an account for me:
POST https://goodsign.io/api/agent/signup with
{"name": "Jane Smith", "email": "jane@acme.com", "agent": "Claude Code"}.
Save api_key, pay_url and status_url to .env.local straight away (they are
not shown again), check .env.local is in .gitignore, give me pay_url, then
poll status_url until status is "active".
Rules: never commit or log the key. Call GoodSign from server code only.
Use "draft": true while testing. Ask me before any send that emails a
real person.
The agent sends one request:
curl -X POST https://goodsign.io/api/agent/signup \
-H "Content-Type: application/json" \
-d '{"name": "Jane Smith", "email": "jane@acme.com", "agent": "Claude Code"}'
It gets back a key and two links (trimmed):
{
"api_key": "...",
"status": "payment_required",
"pay_url": "https://goodsign.io/agent/pay/...",
"status_url": "https://goodsign.io/api/agent/status/...",
"first_payment": {"credits": 10, "auto_topup": true},
"expires_in_days": 30
}
Nothing is stored on GoodSign yet, and every API call made with the key answers 402.
The one approval. You open pay_url, check the price, choose whether to keep auto top-up, and pay by card on Stripe. Your bank may ask you to approve the payment. The agent cannot pay for you. The payment creates the account and switches the key on, and GoodSign sends you one email with a link to set a password.
The agent polls status_url (no header needed):
{
"status": "active",
"account_email": "jane@acme.com",
"credits": 10,
"auto_topup": true,
"pay_url": "https://goodsign.io/agent/pay/...",
"summary": "Ready to send. Each envelope costs 1 credit, however many signers it has."
}
A new account is sometimes held for a manual check after payment: the status is under_review and API calls answer 403, usually for a few hours. A link not paid within 30 days expires, and nothing was created.
Where the key lives: an environment variable, in a file your repository ignores while you build and in your host's secret store in production. Never commit it. /api/* accepts requests from any origin, so a key in browser code can be read from the page's network traffic. Keep every call on your server.
The app uses the REST API, so nothing needs restarting. Adding the MCP server for the agent itself is optional and needs a client restart.
The agent prints text tags in the PDF where fields go, such as [name|Client], [sign|Client] and [date|Client]. Each distinct key is one signer. It uploads the PDF once:
curl -X POST https://goodsign.io/api/uploadpdf \
-H "Authorization: Bearer $GOODSIGN_API_KEY" \
-F "file=@booking-form.pdf"
{
"success": true,
"uuid": "6b2f0c1e-...",
"badtags": [],
"signers_found": 1,
"send_payload": {"uuid": "6b2f0c1e-...", "signers": [{"key": "Client"}]}
}
That response is trimmed. The app keeps the uuid in its config. A template built in the dashboard works too: GET /api/templates lists its uuid and signer keys.
For each booking the app calls POST /api/usetemplate:
curl -X POST https://goodsign.io/api/usetemplate \
-H "Authorization: Bearer $GOODSIGN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"uuid": "6b2f0c1e-...",
"duplicate": true,
"doc_name": "Booking form for Sam Lee",
"webhook": "https://app.acme.com/webhooks/goodsign",
"metadata": {"booking_id": 4812},
"signers": [
{"key": "Client", "name": "Sam Lee", "email": "sam@example.com", "reminder_days": 2}
]
}'
"duplicate": true makes each send a copy, so the uploaded PDF stays reusable. Without it the first send uses the upload up. The response:
{
"success": true,
"doc": {"uuid": "9d1c4a7e-...", "name": "Booking form for Sam Lee.pdf", "status": "sent", "webhook": "https://app.acme.com/webhooks/goodsign"},
"warnings": "",
"credit": 9
}
Store doc.uuid against the booking. Other fields the endpoint accepts: send_in_order, cc_email, email_subject, email_message, fields (prefill values by key), ignore_missing_signers, smsverify, draft, email_external, and brand and hide_chat on the PRO plan. A signer address the mailer cannot deliver to, such as "TBC", gets a 400 before any credit is spent.
GoodSign POSTs JSON to the webhook URL:
{"uuid": "9d1c4a7e-...", "status": "document_complete"}
Four events are delivered: signer_opened, signer_complete, document_complete (instead of signer_complete when the last signer finishes) and signer_attachments_complete. The payload is not signed and a failed delivery is not retried. Treat each call as a nudge: fetch GET /api/document/{uuid} and act only when master_doc.status is complete. Also poll open documents on a schedule, to catch missed webhooks.
Then download the signed PDF:
curl -H "Authorization: Bearer $GOODSIGN_API_KEY" \
-o booking-4812.pdf https://goodsign.io/api/download/9d1c4a7e-...
Until the PDF exists this answers 404 with "Document is not complete". It is rendered after the last signature, so retry a minute later if a download straight after the webhook gets that 404. /api/downloadzip/{uuid} returns every file in a multi-file envelope.
By default GoodSign emails each signer their link and the finished PDF. Add "email_external": true and GoodSign emails the signer nothing. The response gains a signing_links array, one link per signer with its key, to put in your own email or an iframe. "email_external": "notifyonly" skips the invite but still emails the finished PDF. The reminder endpoints skip external signers, so chasing them is your app's job. The iframe details are in the embedded signing guide.
There is no free sandbox: every real send costs a credit, test or not. What the API gives you:
badtags is empty and signers_found matches your keys."draft": true saves the document with its signers and fields, emails nobody and spends no credit. Inspect it with GET /api/document/{uuid}, then remove it with POST /api/document/{uuid}/delete. With an uploaded PDF, send "duplicate": true as well, or the draft uses the upload up.email_external: true and open the returned link yourself. Each costs 1 credit."credits": 100 at signup (US$150 a charge). A 500-credit payment gets the 20% bulk discount: US$600.hide_chat and per-customer brands need PRO, $10 per user per month.See the pricing page.
pay_url again.The API docs have a page for each of the main calls. The agent signup section of the API page has the signup request and its optional fields.
Need documents signed? Make a free electronic signature for your own PDFs, or send documents for signing at $1.50 each with no subscription.
All rights reserved © GoodSign Limited 2026
2 Stuart St, Ponsonby, Auckland 1011, New Zealand...