Detailed guide on creating and configuring documents
curl -X POST https://app.sajn.se/api/v1/documents \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Employment Contract - John Doe", "type": "SIGNABLE" }'
{ "documentId": "doc_123abc", "externalId": null, "expiresAt": null, "signers": [] }
{ "name": "Employment Contract", "type": "SIGNABLE", "signers": [ { "name": "John Doe", "email": "john@example.com", "role": "SIGNER", "signingOrder": 1 }, { "name": "Jane Manager", "email": "jane@example.com", "role": "SIGNER", "signingOrder": 2 } ] }
{ "documentId": "doc_123", "signers": [ { "signerId": "signer_1", "name": "John Doe", "email": "john@example.com", "token": "token_abc", "signingUrl": "https://app.sajn.se/sign/doc_123?token=token_abc" } ] }
{ "name": "Service Agreement", "type": "SIGNABLE", "documentMeta": { "subject": "Please sign the service agreement", "message": "Thank you for choosing our services. Please review and sign the attached agreement.", "signingOrder": "SEQUENTIAL", "defaultSignatureType": "DRAWING", "distributionMethod": "EMAIL", "forceReadFullDocument": true, "preferredLanguage": "sv" } }
{ "name": "Time-Sensitive Agreement", "expiresAt": "2024-12-31T23:59:59Z" }
{ "name": "Contract #12345", "externalId": "contract_12345_from_my_crm" }
{ "name": "Employment Contract - John Doe", "templateId": "template_abc123" }
{ "name": "Project Agreement", "customFields": [ { "customInputId": "field_project_name", "value": "Website Redesign" }, { "customInputId": "field_budget", "value": "50000" } ] }
{ "name": "Service Agreement - Acme Corp", "type": "SIGNABLE", "externalId": "agreement_2024_001", "expiresAt": "2024-02-15T23:59:59Z", "documentMeta": { "subject": "Service Agreement for Your Review", "message": "Please review and sign this service agreement. Contact us if you have any questions.", "signingOrder": "SEQUENTIAL", "defaultSignatureType": "DRAWING", "distributionMethod": "EMAIL", "forceReadFullDocument": true, "showCommentsToSigners": true, "preferredLanguage": "sv", "validFrom": "2024-01-01T00:00:00Z", "validTo": "2024-12-31T23:59:59Z", "value": "500000" }, "signers": [ { "name": "Jane Manager", "email": "jane@company.com", "role": "SIGNER", "signingOrder": 1 }, { "name": "John Client", "email": "john@acme.com", "role": "SIGNER", "signingOrder": 2 } ], "customFields": [ { "customInputId": "project_name", "value": "Digital Transformation" }, { "customInputId": "department", "value": "IT" } ] }