Files
OpenSign/assets/js/cfb1e6eb.ddb32cf1.js
T

1 line
14 KiB
JavaScript

"use strict";(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[539],{28453:(e,n,o)=>{o.d(n,{R:()=>a,x:()=>d});var s=o(96540);const t={},i=s.createContext(t);function a(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),s.createElement(i.Provider,{value:n},e.children)}},79436:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>r,contentTitle:()=>d,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"help/Settings/Webhook","title":"Webhook","description":"\ud83d\udd14 What is a Webhook?","source":"@site/docs/help/Settings/Webhook.md","sourceDirName":"help/Settings","slug":"/help/Settings/Webhook","permalink":"/docs/help/Settings/Webhook","draft":false,"unlisted":false,"editUrl":"https://github.com/opensignlabs/opensign/tree/feat-docs/docs/docs/help/Settings/Webhook.md","tags":[],"version":"current","sidebarPosition":3,"frontMatter":{"sidebar_position":3,"title":"Webhook"},"sidebar":"tutorialSidebar","previous":{"title":"API Token","permalink":"/docs/help/Settings/APIToken"},"next":{"title":"Preferences","permalink":"/docs/help/Settings/Preferences"}}');var t=o(74848),i=o(28453);const a={sidebar_position:3,title:"Webhook"},d="\ud83d\udd01 Webhook",r={},l=[{value:"\ud83d\udd14 What is a Webhook?",id:"-what-is-a-webhook",level:2},{value:"\ud83e\udde0 Simple Example",id:"-simple-example",level:2},{value:"\ud83e\udded How to Add a Webhook in OpenSign",id:"-how-to-add-a-webhook-in-opensign",level:2},{value:"\ud83e\uddea Sandbox Webhook",id:"-sandbox-webhook",level:2},{value:"\ud83d\udccb Supported Webhook Events",id:"-supported-webhook-events",level:2},{value:"\ud83d\udd0d Example Payload: <code>Document Created</code>",id:"-example-payload-document-created",level:3},{value:"\ud83d\udd0d Example Payload: <code>Document Viewed</code>",id:"-example-payload-document-viewed",level:3},{value:"\ud83d\udd0d Example Payload: <code>Document Signed</code>",id:"-example-payload-document-signed",level:3},{value:"\ud83d\udd0d Example Payload: <code>Document Completed</code>",id:"-example-payload-document-completed",level:3},{value:"\ud83d\udd0d Example Payload: <code>Document Declined</code>",id:"-example-payload-document-declined",level:3},{value:"\u2753 Frequently Asked Questions",id:"-frequently-asked-questions",level:2},{value:"1. What is the OpenSign Sandbox environment?",id:"1-what-is-the-opensign-sandbox-environment",level:3},{value:"2. Can I use my Live Webhook in the Sandbox?",id:"2-can-i-use-my-live-webhook-in-the-sandbox",level:3},{value:"3. Can I test all webhook events in the Sandbox?",id:"3-can-i-test-all-webhook-events-in-the-sandbox",level:3},{value:"\ud83d\udcac Need Help?",id:"-need-help",level:2}];function c(e){const n={a:"a",blockquote:"blockquote",br:"br",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",hr:"hr",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"-webhook",children:"\ud83d\udd01 Webhook"})}),"\n",(0,t.jsx)(n.h2,{id:"-what-is-a-webhook",children:"\ud83d\udd14 What is a Webhook?"}),"\n",(0,t.jsxs)(n.p,{children:["A ",(0,t.jsx)(n.strong,{children:"webhook"})," allows one system (like OpenSign) to automatically send real-time data or notifications to another system (like your server) when a specific event occurs."]}),"\n",(0,t.jsxs)(n.p,{children:["Think of it as a ",(0,t.jsx)(n.strong,{children:"push notification for your backend"})," \u2014 instead of continuously checking for updates (polling), a webhook pushes data to your endpoint ",(0,t.jsx)(n.strong,{children:"as soon as an event happens"}),"."]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h2,{id:"-simple-example",children:"\ud83e\udde0 Simple Example"}),"\n",(0,t.jsx)(n.p,{children:"Suppose you're using OpenSign to collect eSignatures:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["When someone ",(0,t.jsx)(n.strong,{children:"signs a document"}),", OpenSign triggers a ",(0,t.jsx)(n.strong,{children:"POST request"})," to your server."]}),"\n",(0,t.jsx)(n.li,{children:"The request includes data such as the document ID, signer email, and signature status."}),"\n",(0,t.jsx)(n.li,{children:"Your server can then process this information \u2014 for example, update your CRM, trigger a workflow, or send a confirmation email."}),"\n"]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h2,{id:"-how-to-add-a-webhook-in-opensign",children:"\ud83e\udded How to Add a Webhook in OpenSign"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Step 1:"})," Log in to your OpenSign account using your credentials.",(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Step 2:"})," Navigate to ",(0,t.jsx)(n.strong,{children:"Settings \u2192 Webhook"}),"."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://github.com/user-attachments/assets/6b069b6c-d2b7-408b-b7c9-7fbeb55d6c98",alt:"Navigate to Add Webhook"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Step 3:"})," Click ",(0,t.jsx)(n.strong,{children:"Add Webhook"}),"."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["A popup will appear. Enter your ",(0,t.jsx)(n.strong,{children:"Webhook URL"})," and click ",(0,t.jsx)(n.strong,{children:"Yes"})," to save it."]}),"\n"]}),"\n",(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Note:"})," To enable ",(0,t.jsx)(n.strong,{children:"Live Webhook"})," support, you must upgrade to a ",(0,t.jsx)(n.strong,{children:"paid plan"})," \u2014 either the ",(0,t.jsx)(n.strong,{children:"Professional"})," or ",(0,t.jsx)(n.strong,{children:"Teams"})," plan."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://github.com/user-attachments/assets/ff68b255-a6e6-4a7d-9cef-6dd9e3b6d4e4",alt:"Add Webhook"})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h2,{id:"-sandbox-webhook",children:"\ud83e\uddea Sandbox Webhook"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["You can also add webhook for the ",(0,t.jsx)(n.strong,{children:"Sandbox"})," environment on the same page."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Sandbox webhook"})," are available on all plans, including the ",(0,t.jsx)(n.strong,{children:"Free"})," plan, and are ideal for development and testing."]}),"\n"]}),"\n",(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Caution:"})," Avoid sending sensitive or confidential data to the Sandbox environment."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["\ud83d\udcd8 ",(0,t.jsx)(n.strong,{children:"API Reference:"}),(0,t.jsx)(n.br,{}),"\n","You can also manage your webhooks via our API.",(0,t.jsx)(n.br,{}),"\n","See the API documentation here: ",(0,t.jsx)(n.a,{href:"https://docs.opensignlabs.com/docs/API-docs/save-update-webhook",children:"Save/Update Webhook API"})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h2,{id:"-supported-webhook-events",children:"\ud83d\udccb Supported Webhook Events"}),"\n",(0,t.jsx)(n.p,{children:"OpenSign sends event notifications to your configured webhook URL when any of the following actions occur:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Document Created"})," \u2013 A document is created."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Document Viewed"})," \u2013 A signer viewed the document."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Document Signed"})," \u2013 A signer signed the document."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Document Completed"})," \u2013 All required signatures are completed."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Document Revoked or Declined"})," \u2013 The document was revoked or declined."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Each notification is sent as a ",(0,t.jsx)(n.strong,{children:"POST request"})," with a ",(0,t.jsx)(n.strong,{children:"JSON payload"})," containing relevant event data."]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.h3,{id:"-example-payload-document-created",children:["\ud83d\udd0d Example Payload: ",(0,t.jsx)(n.code,{children:"Document Created"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "event": "created",\n "type": "request-sign",\n "objectId": "kpeg6Q2rO7",\n "file": "https://legadratw3d.ams3.digitaloceanspaces.com/851de61f62b60a1f62e03232464fa4bf_81wV17MTebsrRoov.pdf?...",\n "name": "Sample Test Doc",\n "note": "Please review and sign this document",\n "description": "",\n "signers": [\n {\n "name": "Peter Mark",\n "email": "peter.mark1093@gmail.com",\n "phone": "3556567789"\n }\n ],\n "createdAt": "Fri, 16 May 2025 15:02:42 IST"\n}\n'})}),"\n",(0,t.jsxs)(n.h3,{id:"-example-payload-document-viewed",children:["\ud83d\udd0d Example Payload: ",(0,t.jsx)(n.code,{children:"Document Viewed"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "event": "viewed",\n "type": "request-sign",\n "objectId": "kpeg6Q2rO7",\n "file": "https://legadratw3d.ams3.digitaloceanspaces.com/851de61f62b60a1f62e03232464fa4bf_81wV17MTebsrRoov.pdf?...",\n "name": "Sample Test Doc",\n "note": "Please review and sign this document",\n "description": "",\n "signers": [\n {\n "name": "Peter Mark",\n "email": "peter.mark1093@gmail.com",\n "phone": "3556567789"\n }\n ],\n "viewedBy": "peter.mark1093@gmail.com",\n "viewedAt": "Fri, 16 May 2025 16:18:16 IST",\n "createdAt": "Fri, 16 May 2025 15:02:28 IST"\n}\n'})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.h3,{id:"-example-payload-document-signed",children:["\ud83d\udd0d Example Payload: ",(0,t.jsx)(n.code,{children:"Document Signed"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "event": "signed",\n "type": "request-sign",\n "objectId": "kpeg6Q2rO7",\n "file": "https://legadratw3d.ams3.digitaloceanspaces.com/bc2eb56cc9d29a5f222e4a4b5dbbcfbf_signed_sample_test_doc_4858.pdf?...",\n "name": "Sample Test Doc",\n "note": "Please review and sign this document",\n "description": "",\n "signer": {\n "name": "Peter Mark",\n "email": "peter.mark1093@gmail.com",\n "phone": "3556567789"\n },\n "signedAt": "Fri, 16 May 2025 16:18:34 GMT+5:30",\n "createdAt": "Fri, 16 May 2025 15:02:28 GMT+5:30"\n}\n'})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.h3,{id:"-example-payload-document-completed",children:["\ud83d\udd0d Example Payload: ",(0,t.jsx)(n.code,{children:"Document Completed"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "event": "completed",\n "type": "request-sign",\n "objectId": "kpeg6Q2rO7",\n "file": "https://legadratw3d.ams3.digitaloceanspaces.com/bc2eb56cc9d29a5f222e4a4b5dbbcfbf_signed_sample_test_doc_4858.pdf?...",\n "certificate": "https://legadratw3d.ams3.digitaloceanspaces.com/9c954912f529acb7e4d065ec0521a63b_certificate.pdf?...",\n "name": "Sample Test Doc",\n "note": "Please review and sign this document",\n "description": "",\n "signers": [\n {\n "name": "Peter Mark",\n "email": "peter.mark1093@gmail.com",\n "phone": "3556567789"\n }\n ],\n "completedAt": "Fri, 16 May 2025 16:18:35 GMT+5:30",\n "createdAt": "Fri, 16 May 2025 15:02:28 GMT+5:30"\n}\n'})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.h3,{id:"-example-payload-document-declined",children:["\ud83d\udd0d Example Payload: ",(0,t.jsx)(n.code,{children:"Document Declined"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "event": "declined",\n "type": "request-sign",\n "objectId": "1gtDMBHpEY",\n "file": "https://legadratw3d.ams3.digitaloceanspaces.com/e90c32a45351eb52eb00e0054ae50566_581ZmOn4CwAqnxSF.pdf?...",\n "name": "Sample Test Doc ",\n "note": "Please review and sign this document",\n "description": "",\n "signers": [\n {\n "name": "Peter Mark",\n "email": "peter.mark1093@gmail.com",\n "phone": "9283784545554"\n }\n ],\n "declinedBy": "peter.mark1093@gmail.com",\n "declinedReason": "Invalid date format used.",\n "declinedAt": "Fri, 16 May 2025 16:25:38 IST",\n "createdAt": "Fri, 16 May 2025 16:24:28 IST"\n}\n'})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h2,{id:"-frequently-asked-questions",children:"\u2753 Frequently Asked Questions"}),"\n",(0,t.jsx)(n.h3,{id:"1-what-is-the-opensign-sandbox-environment",children:"1. What is the OpenSign Sandbox environment?"}),"\n",(0,t.jsx)(n.p,{children:"The Sandbox is a testing environment designed for developers to safely experiment with OpenSign APIs and workflows. It mirrors the live environment but with testing limitations."}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h3,{id:"2-can-i-use-my-live-webhook-in-the-sandbox",children:"2. Can I use my Live Webhook in the Sandbox?"}),"\n",(0,t.jsxs)(n.p,{children:["No. ",(0,t.jsx)(n.strong,{children:"Live Webhooks do not work"})," in the Sandbox environment. You must configure a separate webhook specifically for Sandbox testing."]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h3,{id:"3-can-i-test-all-webhook-events-in-the-sandbox",children:"3. Can I test all webhook events in the Sandbox?"}),"\n",(0,t.jsxs)(n.p,{children:["Yes. The Sandbox environment supports all event types, including ",(0,t.jsx)(n.code,{children:"created"}),", ",(0,t.jsx)(n.code,{children:"viewed"}),", ",(0,t.jsx)(n.code,{children:"signed"}),", ",(0,t.jsx)(n.code,{children:"completed"}),", and ",(0,t.jsx)(n.code,{children:"revoked/declined"}),".",(0,t.jsx)(n.br,{}),"\n","However, some behaviors may be simulated for testing purposes."]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h2,{id:"-need-help",children:"\ud83d\udcac Need Help?"}),"\n",(0,t.jsxs)(n.p,{children:["If you need help testing your webhook or integrating it into your application, feel free to reach out to our support team at ",(0,t.jsx)(n.a,{href:"mailto:support@opensignlabs.com",children:"support@opensignlabs.com"}),"."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Happy signing with OpenSign\u2122!"})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}}}]);