How to add Digital Signature in C# using KAiZEN APIs?
Adding digital signature in C# applications is essential for securing documents, ensuring authenticity, and streamlining approval workflows. If you’re developing in C#, integrating eSignatures can be simpler than you think—especially with a powerful tool like KAiZEN. This blog will walk you through how to seamlessly add digital signatures to your C# applications using KAiZEN’s robust and developer-friendly API.
Step-by-Step Guide to Integrate eSignatures in C# Applications:
Step 1:
Begin by listing the individuals who need to sign the document and determining the sequence of their signatures. KAiZEN allows for sequential signing, ensuring signers follow the order you define.
For Example:
Signer Information
Signer Name | Order | Signer Email |
---|---|---|
Signer 1 | 1 | signer1@gmail.com |
Signer 2 | 2 | signer2@gmail.com |
-
Step 2:
You’ll need to initiate a secure HTTP POST request to the KAiZEN “Initiate Sign API” with the following parameters:
HTTP Call Details
Parameters Name Value Content-Type application/json Method POST Endpoint https://fa-kaizen-prod.azurewebsites.net/api/Sign/RequestStr?code=RTa1A0GW5Yl92OF54-73lRqglLFCt_0pVcg86hWf1EjtAzFuNROcdA== Body JSON Body with parameters Key Parameters for the Request Body
Parameters Name Description Required? docContent Base64 Content for the PDF File Yes docName Name of the File Yes appToken Unique Code to initiate the request Yes requesterEmail Email address of the person initiating the request Yes requesterName Name of the person initiating the request Yes description Describes the document NO signers An array of the signers who needs to sign the document in the pre-defined order. Yes CallBackURL CallbackURL defines the url on which the KAiZEN should send a response once all the signers signs the document. It can be webservice url of Salesforce or any external page.
Eg: https://duumy.my.salesforce- sites.com/services/apexrest/KaizenCallbackURL/No newRequestEmailSubject Describes the email subject No requesterMessage Describes the prompt eSignature field No docDescription Describes the document No -
Step 3:
C# Code Example for Integration
var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "https://fa-kaizen-staging.azurewebsites.net/api/Sign/RequestStr?code=mLgEBTpi9dfooQ6TB9gc7sa4qiIuuxmqQYoTx8nQQ1StAzFu93g06A=="); var content = new StringContent("{\n \"docContent\":\"<
>\",\n \"requesterEmail\": \"xyz@gmail.com\",\n \"requesterName\": \"XYZ\",\n \"requesterPhone\": \"xxxxx-xxx-xxxx\",\n \"description\" :\"\",\n \"newRequestEmailSubject\":\"You have a document to sign\",\n \"requesterMessage\": \"Kindly eSign your KAiZEN Test PDF\",\n \"signers\": [\n {\n \"signerEmail\": \"signer1@gmail.com\",\n \"signerName\": \"Signer1\",\n \"signerPhone\": \"xx-xxx-xxxx-xxx\",\n \"order\": \"1\",\n \"signerRole\": \"signer\"\n \n },{\n \"signerEmail\": \"signer2@gmail.com\",\n \"signerName\": \"Signer2\",\n \"signerPhone\": \"xxx-xxx-xxxx-xxxx\",\n \"order\": \"2\",\n \"signerRole\": \"reviewer\"\n \n }\n ],\n \n \"docDescription\": \"Base 64 string based test doc\",\n \"callbackurl\": \"\"\n}", null, "application/json"); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); Sample API Response:
{ “FailRules”: [], “Data”: { “SignRequestId”: “01HV6MEARQD3X8ZXXX5FR3YDB8”, “RequestNo”: “KAiZEN-118” } }
Once the request is accepted, a unique request ID is returned. If a callback URL is provided, a signed PDF will be sent to the specified endpoint after all signers have completed their actions.
What Happens After the API Call?
Each signer receives an email notification to begin signing, following the pre-defined order. The signing flow is intuitive and secure.
How the KAiZEN Signing Workflow Operates
-
Check Email Inbox
Each signer receives an email from KAiZEN with a link to sign.
-
Click to Begin
The email contains a secure link labeled “Sign Here” which opens the KAiZEN signing editor.
-
Sign the Document
After clicking on the “Sign Here” button. You’ll get a popup where you can choose the following methods to eSign:
- Initials
- Draw your signature
- Upload an image of your signature
- Recently Used Signs
-
Submit and Done
Once you’ve placed your signature, click Submit. The next signer in the sequence will then be notified.
-
After All Signers Complete
Once every signer has completed the process:
- Each signer will receive an email with the final signed document.
- If a callback URL was configured, a copy of the signed document will be automatically sent to that system (e.g., Java or your application).
Conclusion
Integrating eSignatures in C# using KAiZEN is quick, secure, and scalable. It simplifies approval cycles, reduces delays, and ensures legally binding digital transactions—all with just a few lines of code.
👉 Get started for free – Request your KAiZEN API Key and start embedding eSignatures in your C# applications today!
Sign up for Free
Trial today!
Try KAiZEN for free
