Templates
Make a document once, then send it to new people with one call.
Make a template in the app
Templates are made in the app: upload the document, add roles such as Client, and place each role’s fields. List them with GET /templates; each template shows its roles.
Send from a template
Pass template_id and fill each role with a person. Fields come from the template, so you don’t place any.
curl -X POST "https://api.esorasign.com/v1/documents" \
-H "Authorization: Bearer $ESORA_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"template_id": "tpl_2zg4mZaouqKLiMcVbpT4r5",
"recipients": [
{ "template_role": "Client", "name": "Maya Chen", "email": "maya.chen@example.com" },
{ "template_role": "Account manager", "name": "John Smith", "email": "john.smith@example.com" }
],
"send": true
}'Every role must be filled before the document can be sent (422 not_ready otherwise). To send one template to many people from a spreadsheet, use bulk send in the app.