Recipes

Common API v2 tasks

Minimal happy-path examples for create, update, send, submit, export, list, and webhook setup.

Recipe 1

Create a document from a template

Create a draft document with values keyed by field name.

  1. Find the template id.
  2. POST /documents with name and values.
  3. Store the returned document id.
curl -X POST https://api.crove.app/api/external/v2/documents \
  -H "X-Api-Key: <key>" \
  -H "Content-Type: application/json" \
  -d '{"template_id":"<uuid>","name":"Offer letter - Ravi","values":{"Client Name":"Ravi Sharma","Project Fee":150000,"Start Date":"2026-07-01","Payment Terms":"50% upfront, 50% on delivery"}}'
Response
{"id":"<uuid>","status":"draft","filled":12,"total":19}
What changed from v1: Values are keyed by field name; supported types include text, number, YYYY-MM-DD dates, booleans, and dropdown options.
Full schema in API reference →

Recipe 2

Update or fill values

Patch only the fields that changed.

  1. Keep the document in draft.
  2. PATCH /documents/{id}/values.
  3. For Pabbly, send values[Field] or bare field keys if needed.
curl -X PATCH https://api.crove.app/api/external/v2/documents/<document_id>/values \
  -H "X-Api-Key: <key>" \
  -H "Content-Type: application/json" \
  -d '{"values":{"Special Terms":"Deliver before the filing date.","Rush Delivery":true}}'
Response
{"status":"draft","filled":14,"total":19}
What changed from v1: Partial updates are supported. Pabbly flat payloads can use values[Special Terms] or a bare Special Terms key.
Full schema in API reference →

Recipe 3

Send for signature

Invite a recipient to fill or sign the document.

  1. Prepare a filled draft.
  2. POST /documents/{id}/send with recipients.
  3. Use fill_url only for the intended recipient.
curl -X POST https://api.crove.app/api/external/v2/documents/<document_id>/send \
  -H "X-Api-Key: <key>" \
  -H "Content-Type: application/json" \
  -d '{"recipients":[{"email":"client@example.com","role":"Client"}]}'
Response
{"sent_count":1,"recipients":[{"email":"client@example.com","role":"Client","fill_url":"https://sign.aadharsign.com/...","status":"invited"}]}
What changed from v1: Send is a dedicated v2 document action; it returns each recipient's fill URL and invite status.
Full schema in API reference →

Recipe 4

Complete without a recipient

Complete a fully filled document that does not require recipient signing.

  1. Fill all required fields.
  2. POST /documents/{id}/submit.
  3. Read the document status from the response or follow-up GET.
curl -X POST https://api.crove.app/api/external/v2/documents/<document_id>/submit -H "X-Api-Key: <key>"
Response
{"status":"completed"}
What changed from v1: Submit is separate from send; use it for no-recipient workflows.
Full schema in API reference →

Recipe 5

Export a PDF

Queue a PDF export, poll it, then download the signed URL.

  1. POST /documents/{id}/exports with format pdf.
  2. Poll GET /exports/{job_id}.
  3. Download signed_download_url when status is done.
curl -X POST https://api.crove.app/api/external/v2/documents/<document_id>/exports \
  -H "X-Api-Key: <key>" \
  -H "Content-Type: application/json" \
  -d '{"format":"pdf"}'

curl https://api.crove.app/api/external/v2/exports/<job_id> -H "X-Api-Key: <key>"
Response
{"job_id":"<uuid>","status":"queued"}
{"status":"done","signed_download_url":"https://api.crove.app/api/external/v2/exports/<job>/download-signed?token=..."}
What changed from v1: Exports are async. The final signed URL returns the PDF with 200 application/pdf.
Full schema in API reference →

Recipe 6

List templates and documents

Find the template or document you need before acting on it.

  1. Use limit and search for templates.
  2. Filter documents by status.
  3. Follow the full schema in the API reference for more filters.
curl "https://api.crove.app/api/external/v2/templates?limit=25&search=offer" -H "X-Api-Key: <key>"
curl "https://api.crove.app/api/external/v2/documents?status=awaiting_signature" -H "X-Api-Key: <key>"
Response
{"results":[{"id":"<uuid>","name":"Offer letter"}]}
{"results":[{"id":"<uuid>","status":"awaiting_signature"}]}
What changed from v1: List calls live directly under /templates and /documents in v2.
Full schema in API reference →

Recipe 7

Set up a webhook

Register a v2 webhook and verify each delivery.

  1. POST /webhooks with a public HTTPS URL and canonical events.
  2. Store the returned whsec_ secret; it is shown once.
  3. Verify X-Crove-Signature and dedupe by payload id.
curl -X POST https://api.crove.app/api/external/v2/webhooks \
  -H "X-Api-Key: <key>" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/crove/webhook","events":["recipient.submitted","document.completed","export.completed","document.opened"]}'
Response
{"id":"<uuid>","secret":"whsec_..."}
What changed from v1: Webhook secrets are returned once from create and rotate-secret. Store them before leaving the response.
Full schema in API reference →