mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-29 21:14:59 +02:00
1 line
18 KiB
JavaScript
1 line
18 KiB
JavaScript
(globalThis.webpackChunkOpenSign_Docs=globalThis.webpackChunkOpenSign_Docs||[]).push([[5864],{40830(e,n,t){"use strict";t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>h,default:()=>j,frontMatter:()=>c,metadata:()=>i,toc:()=>u});const i=JSON.parse('{"id":"API-docs/v1.2/opensign-api-v-1-2","title":"OpenSign API v1.2","description":"# OpenSign\u2122 API v1.2","source":"@site/docs/API-docs/v1.2/opensign-api-v-1-2.info.mdx","sourceDirName":"API-docs/v1.2","slug":"/API-docs/v1.2/opensign-api-v-1-2","permalink":"/docs/API-docs/v1.2/opensign-api-v-1-2","draft":false,"unlisted":false,"editUrl":null,"tags":[],"version":"current","sidebarPosition":0,"frontMatter":{"id":"opensign-api-v-1-2","title":"OpenSign API v1.2","description":"# OpenSign\u2122 API v1.2","sidebar_label":"Introduction","sidebar_position":0,"hide_title":true,"custom_edit_url":null},"sidebar":"apiSidebar","previous":{"title":"v1.2","permalink":"/docs/API-docs/v1.2"},"next":{"title":"Get your account details","permalink":"/docs/API-docs/v1.2/get-user"}}');var s=t(74848),r=t(28453),o=(t(43905),t(51107)),l=t(23397),d=t.n(l),a=t(19365);t(69016);const c={id:"opensign-api-v-1-2",title:"OpenSign API v1.2",description:"# OpenSign\u2122 API v1.2",sidebar_label:"Introduction",sidebar_position:0,hide_title:!0,custom_edit_url:null},h="OpenSign\u2122 API v1.2",p={},u=[{value:"Getting Started",id:"getting-started",level:2},{value:"Core Capabilities",id:"core-capabilities",level:2},{value:"What\u2019s New in v1.2",id:"whats-new-in-v12",level:2},{value:"Attachment Widget Support",id:"attachment-widget-support",level:3},{value:"Hide Signer Signing Links",id:"hide-signer-signing-links",level:3},{value:"Cleaner Template Retrieval",id:"cleaner-template-retrieval",level:3},{value:"Password-Protected PDF Support",id:"password-protected-pdf-support",level:3},{value:"Offline Signing Control",id:"offline-signing-control",level:3},{value:"Signer Roles",id:"signer-roles",level:3},{value:"Carbon Copy (CC) Recipients",id:"carbon-copy-cc-recipients",level:3},{value:"Available Environments",id:"available-environments",level:2},{value:"Versioning & Backwards Compatibility",id:"versioning--backwards-compatibility",level:2},{value:"Useful Links",id:"useful-links",level:2}];function x(e){const n={a:"a",blockquote:"blockquote",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"theme-doc-version-badge badge badge--secondary",children:"Version: 1.0.0"}),"\n",(0,s.jsx)(o.default,{as:"h1",className:"openapi__heading",children:"OpenSign API v1.2"}),"\n",(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"opensign-api-v12",children:"OpenSign\u2122 API v1.2"})}),"\n",(0,s.jsxs)(n.blockquote,{children:["\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"The open-source DocuSign alternative \u2014 built for developers, trusted by enterprises."})}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"OpenSign\u2122 gives you a complete, production-ready e-signature platform through a single, RESTful API. Send documents for signature, manage templates, track signing status in real time, and automate your entire document lifecycle \u2014 all without vendor lock-in."}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h2,{id:"getting-started",children:"Getting Started"}),"\n",(0,s.jsxs)(n.p,{children:["Every request must carry your API token in the ",(0,s.jsx)(n.code,{children:"x-api-token"})," header."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"x-api-token: <your-api-token>\n"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsxs)(n.strong,{children:["\u2192 ",(0,s.jsx)(n.a,{href:"https://docs.opensignlabs.com/docs/help/Settings/APIToken",children:"How to generate your API token"})]})}),"\n",(0,s.jsxs)(n.p,{children:["Not sure where to begin? Use the ",(0,s.jsx)(n.strong,{children:"sandbox environment"})," (",(0,s.jsx)(n.code,{children:"https://sandbox.opensignlabs.com/api/v1.2"}),") to prototype without affecting live data."]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h2,{id:"core-capabilities",children:"Core Capabilities"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Category"}),(0,s.jsx)(n.th,{children:"What you can do"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Documents"})}),(0,s.jsx)(n.td,{children:"Create, send, update, revoke, and delete signature-request documents"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Templates"})}),(0,s.jsx)(n.td,{children:"Build reusable templates with pre-placed widgets; send to one or many signers"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Self-Sign"})}),(0,s.jsx)(n.td,{children:"Generate self-signed documents without a signer invitation flow"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Public Templates"})}),(0,s.jsx)(n.td,{children:"Share a public signing link \u2014 no signer list required"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Draft Workflow"})}),(0,s.jsx)(n.td,{children:"Save documents or templates as drafts and finalise them later"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Contacts"})}),(0,s.jsx)(n.td,{children:"Manage your signer contact book programmatically"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Folders"})}),(0,s.jsx)(n.td,{children:"Organise documents inside OpenSign Drive folders"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Webhooks"})}),(0,s.jsx)(n.td,{children:"Receive real-time event notifications at your own endpoint"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Users"})}),(0,s.jsx)(n.td,{children:"Retrieve account and credit information"})]})]})]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h2,{id:"whats-new-in-v12",children:"What\u2019s New in v1.2"}),"\n",(0,s.jsx)(n.h3,{id:"attachment-widget-support",children:"Attachment Widget Support"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"attachments"})," widget is now supported on draft document, create document, draft template, create template, and public template APIs."]}),"\n",(0,s.jsx)(n.h3,{id:"hide-signer-signing-links",children:"Hide Signer Signing Links"}),"\n",(0,s.jsxs)(n.p,{children:["Set ",(0,s.jsx)(n.code,{children:'"hide_signer_signing_links": true | false'})," on ",(0,s.jsx)(n.code,{children:"POST /draftdocument"})," to hide signer signing links in the draft document response."]}),"\n",(0,s.jsx)(n.h3,{id:"cleaner-template-retrieval",children:"Cleaner Template Retrieval"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"GET /template/:id"})," and ",(0,s.jsx)(n.code,{children:"GET /templatelist"})," have been streamlined \u2014 redundant parameters are removed and ",(0,s.jsx)(n.strong,{children:"prefill data is now returned separately from signer parameters"}),", making responses easier to consume."]}),"\n",(0,s.jsx)(n.h3,{id:"password-protected-pdf-support",children:"Password-Protected PDF Support"}),"\n",(0,s.jsxs)(n.p,{children:["Pass ",(0,s.jsx)(n.code,{children:'"file_password"'})," in the request body when working with encrypted PDFs. Supported on:\n",(0,s.jsx)(n.code,{children:"POST /createtemplate"})," \xb7 ",(0,s.jsx)(n.code,{children:"PUT /template/:id"})," \xb7 ",(0,s.jsx)(n.code,{children:"POST /createdocument/:template_id"})," \xb7 ",(0,s.jsx)(n.code,{children:"POST /draftdocument"})," \xb7 ",(0,s.jsx)(n.code,{children:"POST /drafttemplate"})," \xb7 ",(0,s.jsx)(n.code,{children:"POST /selfsign"})]}),"\n",(0,s.jsx)(n.h3,{id:"offline-signing-control",children:"Offline Signing Control"}),"\n",(0,s.jsxs)(n.p,{children:["Set ",(0,s.jsx)(n.code,{children:'"allow_offline_sign": true | false'})," on ",(0,s.jsx)(n.code,{children:"POST /createtemplate"})," and ",(0,s.jsx)(n.code,{children:"PUT /template/:id"})," to explicitly enable or disable offline signing for each template."]}),"\n",(0,s.jsx)(n.h3,{id:"signer-roles",children:"Signer Roles"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"signers"})," object now accepts a ",(0,s.jsx)(n.code,{children:'"signer_role"'})," field across all creation routes. Three roles are supported:"]}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Role"}),(0,s.jsx)(n.th,{children:"Behaviour"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.code,{children:"signer"})," ",(0,s.jsx)(n.em,{children:"(default)"})]}),(0,s.jsx)(n.td,{children:"Must complete at least one signature widget"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"viewer"})}),(0,s.jsx)(n.td,{children:"Receives the document for review only \u2014 no widgets allowed"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"approver"})}),(0,s.jsx)(n.td,{children:"Can have any widgets except a signature requirement"})]})]})]}),"\n",(0,s.jsx)(n.h3,{id:"carbon-copy-cc-recipients",children:"Carbon Copy (CC) Recipients"}),"\n",(0,s.jsxs)(n.p,{children:["A new ",(0,s.jsx)(n.code,{children:'"cc"'})," field is now supported alongside the existing ",(0,s.jsx)(n.code,{children:'"bcc"'})," field on document, template, draft and self-sign creation/update routes. Email addresses listed in ",(0,s.jsx)(n.code,{children:'"cc"'})," receive a carbon-copy notification email once the document is completed. Like ",(0,s.jsx)(n.code,{children:'"bcc"'}),", on update routes (such as ",(0,s.jsx)(n.code,{children:"PUT /document/:id"}),") providing ",(0,s.jsx)(n.code,{children:'"cc"'})," overrides the template value, even when supplied as an empty array (",(0,s.jsx)(n.code,{children:"[]"}),"); omit the field to inherit the template value."]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h2,{id:"available-environments",children:"Available Environments"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Environment"}),(0,s.jsx)(n.th,{children:"Base URL"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Sandbox"})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"https://sandbox.opensignlabs.com/api/v1.2"})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Production"})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"https://app.opensignlabs.com/api/v1.2"})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"EU Region"})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"https://eu-app.opensignlabs.com/api/v1.2"})})]})]})]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h2,{id:"versioning--backwards-compatibility",children:"Versioning & Backwards Compatibility"}),"\n",(0,s.jsx)(n.p,{children:"v1.2 is fully backwards-compatible with v1 and v1.1 \u2014 all endpoints from those versions are available on this base URL with no breaking changes. New parameters introduced in v1.2 are optional unless otherwise noted."}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h2,{id:"useful-links",children:"Useful Links"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://www.opensignlabs.com",children:"OpenSign Website"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://docs.opensignlabs.com",children:"Full Documentation"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://github.com/opensignlabs/opensign",children:"GitHub Repository"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://docs.opensignlabs.com/docs/help/Settings/APIToken",children:"Generate API Token"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://www.opensignlabs.com/terms/",children:"Terms of Service"})}),"\n"]}),"\n",(0,s.jsxs)("div",{style:{marginBottom:"2rem"},children:[(0,s.jsx)(o.default,{id:"authentication",as:"h2",className:"openapi-tabs__heading",children:"Authentication"}),(0,s.jsx)(d(),{className:"openapi-tabs__security-schemes",children:(0,s.jsx)(a.default,{label:"API Key: x-api-token",value:"x-api-token",children:(0,s.jsx)("div",{children:(0,s.jsx)("table",{children:(0,s.jsxs)("tbody",{children:[(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:(0,s.jsx)(n.p,{children:"Security Scheme Type:"})}),(0,s.jsx)("td",{children:(0,s.jsx)(n.p,{children:"apiKey"})})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:(0,s.jsx)(n.p,{children:"Header parameter name:"})}),(0,s.jsx)("td",{children:(0,s.jsx)(n.p,{children:"x-api-token"})})]})]})})})})})]}),"\n",(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",marginBottom:"var(--ifm-paragraph-margin-bottom)"},children:[(0,s.jsx)("h3",{style:{marginBottom:"0.25rem"},children:(0,s.jsx)(n.p,{children:"Contact"})}),(0,s.jsx)("span",{children:(0,s.jsx)(n.p,{children:(0,s.jsx)(n.a,{href:"mailto:api@opensignlabs.com",children:"api@opensignlabs.com"})})})]}),"\n",(0,s.jsxs)("div",{style:{marginBottom:"var(--ifm-paragraph-margin-bottom)"},children:[(0,s.jsx)("h3",{style:{marginBottom:"0.25rem"},children:(0,s.jsx)(n.p,{children:"Terms of Service"})}),(0,s.jsx)("a",{href:"http://www.opensignlabs.com/terms/",children:"http://www.opensignlabs.com/terms/"})]}),"\n",(0,s.jsxs)("div",{style:{marginBottom:"var(--ifm-paragraph-margin-bottom)"},children:[(0,s.jsx)("h3",{style:{marginBottom:"0.25rem"},children:(0,s.jsx)(n.p,{children:"License"})}),(0,s.jsx)("a",{href:"http://github.com/opensignlabs/opensign/LICENSE",children:(0,s.jsx)(n.p,{children:"AGPL v3.0"})})]})]})}function j(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(x,{...e})}):x(e)}},69016(e,n,t){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});const s=i(t(96540)),r=i(t(4213));n.default=function({url:e,proxy:n}){return s.default.createElement("div",{style:{float:"right"},className:"dropdown dropdown--hoverable dropdown--right"},s.default.createElement("button",{className:"export-button button button--sm button--secondary"},"Export"),s.default.createElement("ul",{className:"export-dropdown dropdown__menu"},s.default.createElement("li",null,s.default.createElement("a",{onClick:n=>{n.preventDefault(),(e=>{let n;(e.endsWith("json")||e.endsWith("yaml")||e.endsWith("yml"))&&(n=e.substring(e.lastIndexOf("/")+1)),r.default.saveAs(e,n||"openapi.txt")})(`${e}`)},className:"dropdown__link",href:`${e}`},"OpenAPI Spec"))))}},43905(e,n,t){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){const{colorMode:n}=(0,r.useColorMode)(),{logo:t,darkLogo:i}=e,d=()=>"dark"===n?i?.altText??t?.altText:t?.altText,a=(0,o.default)(t?.url),c=(0,o.default)(i?.url);if(t&&i)return s.default.createElement(l.default,{alt:d(),sources:{light:a,dark:c},className:"openapi__logo"});if(t||i)return s.default.createElement(l.default,{alt:d(),sources:{light:a??c,dark:a??c},className:"openapi__logo"});return};const s=i(t(96540)),r=t(83262),o=i(t(86025)),l=i(t(15626))},4213(e,n){var t,i,s;i=[],void 0===(s="function"==typeof(t=function(){"use strict";function n(e,n){return void 0===n?n={autoBom:!1}:"object"!=typeof n&&(console.warn("Deprecated: Expected third argument to be a object"),n={autoBom:!n}),n.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function t(e,n,t){var i=new XMLHttpRequest;i.open("GET",e),i.responseType="blob",i.onload=function(){l(i.response,n,t)},i.onerror=function(){console.error("could not download file")},i.send()}function i(e){var n=new XMLHttpRequest;n.open("HEAD",e,!1);try{n.send()}catch(e){}return 200<=n.status&&299>=n.status}function s(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(t){var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof globalThis&&globalThis.global===globalThis?globalThis:void 0,o=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(e,n,o){var l=r.URL||r.webkitURL,d=document.createElement("a");n=n||e.name||"download",d.download=n,d.rel="noopener","string"==typeof e?(d.href=e,d.origin===location.origin?s(d):i(d.href)?t(e,n,o):s(d,d.target="_blank")):(d.href=l.createObjectURL(e),setTimeout(function(){l.revokeObjectURL(d.href)},4e4),setTimeout(function(){s(d)},0))}:"msSaveOrOpenBlob"in navigator?function(e,r,o){if(r=r||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(n(e,o),r);else if(i(e))t(e,r,o);else{var l=document.createElement("a");l.href=e,l.target="_blank",setTimeout(function(){s(l)})}}:function(e,n,i,s){if((s=s||open("","_blank"))&&(s.document.title=s.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,i);var l="application/octet-stream"===e.type,d=/constructor/i.test(r.HTMLElement)||r.safari,a=/CriOS\/[\d]+/.test(navigator.userAgent);if((a||l&&d||o)&&"undefined"!=typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=a?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),s?s.location.href=e:location=e,s=null},c.readAsDataURL(e)}else{var h=r.URL||r.webkitURL,p=h.createObjectURL(e);s?s.location=p:location.href=p,s=null,setTimeout(function(){h.revokeObjectURL(p)},4e4)}});r.saveAs=l.saveAs=l,e.exports=l})?t.apply(n,i):t)||(e.exports=s)}}]); |