diff --git a/docs/docs/API-docs/opensign.yaml b/docs/docs/API-docs/opensign.yaml index e82e8e017..291462556 100644 --- a/docs/docs/API-docs/opensign.yaml +++ b/docs/docs/API-docs/opensign.yaml @@ -1,4 +1,3 @@ ---- openapi: 3.0.3 info: title: OpenSign API v1 @@ -31,15 +30,15 @@ tags: - name: User description: Access detailed user information with the OpenSign™ API. Retrieve and manage user details effortlessly to enhance your application’s functionality and user experience. - name: Contacts - description: Utilize the OpenSign™ API to efficiently manage contacts in your OpenSign contact book. Seamlessly add, update, and organize your contacts for a streamlined digital signing experience. + description: "Utilize the OpenSign™ API to efficiently manage contacts in your OpenSign contact book. Seamlessly add, update, and organize your contacts for a streamlined digital signing experience." - name: Documents - description: Streamline your document management with the OpenSign™ API. Easily upload, delete and organize your documents for efficient digital signing and seamless workflow integration. + description: "Streamline your document management with the OpenSign™ API. Easily upload, delete and organize your documents for efficient digital signing and seamless workflow integration." - name: Templates - description: Optimize your document creation process with the OpenSign™ API for managing reusable templates. Create, update, and organize templates effortlessly to ensure consistency and efficiency in your digital signing workflows. + description: "Optimize your document creation process with the OpenSign™ API for managing reusable templates. Create, update, and organize templates effortlessly to ensure consistency and efficiency in your digital signing workflows." - name: Webhook - description: Enhance your application’s responsiveness with the OpenSign™ API for managing webhooks. Easily set up, update, and manage webhooks to receive real-time notifications and automate your digital signing processes. + description: "Enhance your application’s responsiveness with the OpenSign™ API for managing webhooks. Easily set up, update, and manage webhooks to receive real-time notifications and automate your digital signing processes." - name: Folder - description: Organize your documents efficiently with the OpenSign™ API for managing folders in OpenSign Drive. Create, update and manage folders seamlessly to keep your digital signing files structured and easily accessible. + description: "Organize your documents efficiently with the OpenSign™ API for managing folders in OpenSign Drive. Create, update and manage folders seamlessly to keep your digital signing files structured and easily accessible." paths: /getuser: get: @@ -250,7 +249,7 @@ paths: tags: - Documents summary: Create Document - description: "The Create Document API allows users to generate new documents by providing data with base64 encoded file.\n\nUpload you pdf in our [**Debug UI**](https://app.opensignlabs.com/debugpdf) here you can draw widgets and copy co-oridnate, page number of them. also you can copy base64 of PDF\n\n**Below widgets are supported in the document:**\n\nCommon parameters of widgets:\n- **type:** Indicates the type of widget.\n- **page:** Specifies the page number on which you want to place the respective widget.\n- **x, y:** Denotes the horizontal and vertical coordinates of the starting point of the widget. You can use the debug UI to determine these values.\n- **w, h:** Represents the width and height of the widget. You can adjust these values using the debug UI.\n- **required:** Set to false if you want to make the widget optional. By default, it's true. Not applicable for signature-type widgets.\n- **name:** Provides a different name for widgets if you are providing more than one widget.\n1. **signature:**\n```\n{\n \"type\":\"signature\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21\n}\n```\n- **Note:** At least one signature is required for each signer. All signature fields are compulsory by default.\n2. **stamp:**\n```\n{\n \"type\":\"stamp\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"stamp\"\n }\n}\n```\n3. **initials:**\n```\n{\n \"type\":\"initials\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"initials\"\n }\n}\n```\n4. **email:**\n```\n{\n \"type\":\"email\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"email\"\n }\n}\n```\n5. **name:**\n```\n{\n \"type\":\"name\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"name\"\n }\n}\n```\n6. **job title:**\n```\n{\n \"type\":\"job title\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"job title\"\n }\n}\n```\n7. **company:**\n```\n{\n \"type\":\"company\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"company\"\n }\n}\n```\n8. **date:**\n```\n{\n \"type\":\"date\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"date\",\n \"default\": \"04-15-2024\",\n \"format\": \"mm-dd-yyyy\" \n }\n}\n ```\n- **default:** Provide the date from which you want to start the date of the date widget. Must be provided in the specified format. By default, today's date provided.\n- **format:** Specify the date format of your choice from the options below.\n - \"dd/MM/yyyy\",\n - \"dd-mm-yyyy\", \n - \"yyyy-mm-dd\", \n - \"mm.dd.yyyy\", \n - \"mm-dd-yyyy\", \n - \"mmm dd, yyyy\", \n - \"mmmm dd, yyyy\", \n - \"dd mmm, yyyy\", \n - \"dd mmmm, yyy\"\n\n9. **textbox:**\n```\n{\n \"type\":\"textbox\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"textbox\",\n \"default\": \"name\",\n \"hint\": \"provide name\",\n \"regularexpression\":\"\"\n }\n}\n```\n- **default:** Provide a default value for the textbox (Optional).\n- **hint:** Provide a hint for the textbox (Optional).\n- **regularexpression:** Provide regex for custom validation, such as allowing only numbers, only capital letters, etc. (Optional).\n\n10. **checkbox:**\n```\n{\n \"type\":\"checkbox\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"checkbox\",\n \"values\": [\"male\", \"female\", \"other\"],\n \"selectedvalues\": [ \"male\", \"female\" ],\n \"readonly\": false, \n \"hidelabel\": false,\n \"validation\": {\n \"minselections\": 0, \n \"maxselections\": 0 \n }\n }\n}\n```\n- **values:** Provide options for the checkbox list.\n- **selectedvalues:** Provide values that need to be selected by default (Optional).\n- **readonly:** Set to true if you want to set the checkbox as readonly. By default, it's false\n- **hidelabel:** Set to true if you want to hide labels of the checkbox. By default, it's false.\n- **minselections:** Provide the minimum number of checkboxes that must be selected by the user.\n- **maxselections:** Provide the maximum number of checkboxes that can be selected by the user.\n\n11. **dropdown:**\n ```\n{\n \"type\":\"dropdown\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"dropdown\",\n \"values\": [\"male\", \"female\", \"other\"],\n \"default\": \"male\"\n }\n }\n}\n```\n- **values:** Provide options for the dropdown list.\n- **default:** Provide the value that needs to be selected by default. Only one value is accepted. (Optional).\n12. **radio button:**\n```\n{\n \"type\":\"radio button\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"radio button\",\n \"values\": [\"male\", \"female\", \"other\"],\n \"default\": \"male\"\n }\n }\n}\n``` \n- **values:** Provide options for the radio button list.\n- **default:** Provide the value that needs to be selected by default. Only one value is accepted. (Optional).\n13. **image:**\n```\n{\n \"type\":\"image\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"image\"\n }\n }\n}\n```\n" + description: "The Create Document API allows users to generate new documents by providing data with base64 encoded file.\n\nUpload you pdf in our [**Debug UI**](https://app.opensignlabs.com/debugpdf) here you can draw widgets and copy co-oridnate, page number of them. also you can copy base64 of PDF\n\n**Below widgets are supported in the document:**\n\nCommon parameters of widgets:\n- **type:** Indicates the type of widget.\n- **page:** Specifies the page number on which you want to place the respective widget.\n- **x, y:** Denotes the horizontal and vertical coordinates of the starting point of the widget. You can use the debug UI to determine these values.\n- **w, h:** Represents the width and height of the widget. You can adjust these values using the debug UI.\n- **required:** Set to false if you want to make the widget optional. By default, it's true. Not applicable for signature-type widgets.\n- **name:** Provides a different name for widgets if you are providing more than one widget.\n- **color:** Specifies the color of the widget content. Available options include black, blue, red, and yellow, with black as the default selection if no color is specified.\n1. **signature:**\n```\n{\n \"type\":\"signature\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21\n}\n```\n- **Note:** At least one signature is required for each signer. All signature fields are compulsory by default.\n2. **stamp:**\n```\n{\n \"type\":\"stamp\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"stamp\"\n }\n}\n```\n3. **initials:**\n```\n{\n \"type\":\"initials\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"initials\"\n }\n}\n```\n4. **email:**\n```\n{\n \"type\":\"email\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"email\",\n \"color\": \"black\"\n }\n}\n```\n5. **name:**\n```\n{\n \"type\":\"name\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"name\",\n \"color\": \"black\"\n }\n}\n```\n6. **job title:**\n```\n{\n \"type\":\"job title\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"job title\",\n \"color\": \"black\"\n }\n}\n```\n7. **company:**\n```\n{\n \"type\":\"company\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"company\",\n \"color\": \"black\"\n }\n}\n```\n8. **date:**\n```\n{\n \"type\":\"date\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"date\",\n \"default\": \"04-15-2024\",\n \"format\": \"mm-dd-yyyy\",\n \"color\": \"black\"\n }\n}\n ```\n- **default:** Provide the date from which you want to start the date of the date widget. Must be provided in the specified format. By default, today's date provided.\n- **format:** Specify the date format of your choice from the options below.\n - \"dd/MM/yyyy\",\n - \"dd-mm-yyyy\", \n - \"yyyy-mm-dd\", \n - \"mm.dd.yyyy\", \n - \"mm-dd-yyyy\", \n - \"mmm dd, yyyy\", \n - \"mmmm dd, yyyy\", \n - \"dd mmm, yyyy\", \n - \"dd mmmm, yyy\"\n\n9. **textbox:**\n```\n{\n \"type\":\"textbox\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"textbox\",\n \"default\": \"name\",\n \"hint\": \"provide name\",\n \"regularexpression\":\"\",\n \"color\": \"black\"\n }\n}\n```\n- **default:** Provide a default value for the textbox (Optional).\n- **hint:** Provide a hint for the textbox (Optional).\n- **regularexpression:** Provide regex for custom validation, such as allowing only numbers, only capital letters, etc. (Optional).\n\n10. **checkbox:**\n```\n{\n \"type\":\"checkbox\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"checkbox\",\n \"values\": [\"male\", \"female\", \"other\"],\n \"selectedvalues\": [ \"male\", \"female\" ],\n \"readonly\": false, \n \"hidelabel\": false,\n \"color\": \"black\",\n \"validation\": {\n \"minselections\": 0, \n \"maxselections\": 0 \n }\n }\n}\n```\n- **values:** Provide options for the checkbox list.\n- **selectedvalues:** Provide values that need to be selected by default (Optional).\n- **readonly:** Set to true if you want to set the checkbox as readonly. By default, it's false\n- **hidelabel:** Set to true if you want to hide labels of the checkbox. By default, it's false.\n- **minselections:** Provide the minimum number of checkboxes that must be selected by the user.\n- **maxselections:** Provide the maximum number of checkboxes that can be selected by the user.\n\n11. **dropdown:**\n ```\n{\n \"type\":\"dropdown\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"dropdown\",\n \"values\": [\"male\", \"female\", \"other\"],\n \"default\": \"male\",\n \"color\": \"black\"\n }\n}\n```\n- **values:** Provide options for the dropdown list.\n- **default:** Provide the value that needs to be selected by default. Only one value is accepted. (Optional).\n12. **radio button:**\n```\n{\n \"type\":\"radio button\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"radio button\",\n \"values\": [\"male\", \"female\", \"other\"],\n \"default\": \"male\",\n \"color\": \"black\"\n }\n}\n``` \n- **values:** Provide options for the radio button list.\n- **default:** Provide the value that needs to be selected by default. Only one value is accepted. (Optional).\n13. **image:**\n```\n{\n \"type\":\"image\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"image\",\n \"color\": \"black\"\n }\n}\n```\n" operationId: createdocument requestBody: content: @@ -583,12 +582,46 @@ paths: $ref: '#/components/schemas/invalidtoken' security: - x-api-token: [] + /drafttemplate: + post: + tags: + - Templates + summary: Draft Template + description: "The Template Drafting API enables users to create customizable templates, serving as blueprints for generating documents with predefined structures. Upon successful creation of a template, the API returns a unique **objectId** (designated as template_id), which can be used to generate documents based on the specified template. Additionally, a **url** is provided, which offers a user interface for editing the template and facilitating document distribution.\n\nUpload you pdf in our [**Debug UI**](https://app.opensignlabs.com/debugpdf) here you can draw widgets and copy co-oridnate, page number of them. also you can copy base64 of PDF.\n\n**Below widgets are supported in the document:**\n\nCommon parameters of widgets:\n\n- **type:** Indicates the type of widget.\n- **page:** Specifies the page number on which you want to place the respective widget.\n- **x, y:** Denotes the horizontal and vertical coordinates of the starting point of the widget. You can use the debug UI to determine these values.\n- **w, h:** Represents the width and height of the widget. You can adjust these values using the debug UI.\n- **required:** Set to false if you want to make the widget optional. By default, it's true. Not applicable for signature-type widgets.\n- **name:** Provides a different name for widgets if you are providing more than one widget.\n- **color:** Specifies the color of the widget content. Available options include black, blue, red, and yellow, with black as the default selection if no color is specified.\n1. **signature:**\n```\n{\n \"type\":\"signature\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21\n}\n```\n2. **stamp:**\n```\n{\n \"type\":\"stamp\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"stamp\"\n }\n}\n```\n3. **initials:**\n```\n{\n \"type\":\"initials\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"initials\"\n }\n}\n```\n4. **email:**\n```\n{\n \"type\":\"email\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"email\",\n \"color\": \"black\"\n }\n}\n```\n5. **name:**\n```\n{\n \"type\":\"name\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"name\",\n \"color\": \"black\"\n }\n}\n```\n6. **job title:**\n```\n{\n \"type\":\"job title\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"job title\",\n \"color\": \"black\"\n }\n}\n```\n7. **company:**\n```\n{\n \"type\":\"company\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"company\",\n \"color\": \"black\"\n }\n}\n```\n8. **date:**\n```\n{\n \"type\":\"date\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"date\",\n \"default\": \"04-15-2024\",\n \"format\": \"mm-dd-yyyy\",\n \"color\": \"black\"\n }\n}\n ```\n- **default:** Provide the date from which you want to start the date of the date widget. Must be provided in the specified format. By default, today's date provided.\n- **format:** Specify the date format of your choice from the options below.\n - \"dd/MM/yyyy\",\n - \"dd-mm-yyyy\", \n - \"yyyy-mm-dd\", \n - \"mm.dd.yyyy\", \n - \"mm-dd-yyyy\", \n - \"mmm dd, yyyy\", \n - \"mmmm dd, yyyy\", \n - \"dd mmm, yyyy\", \n - \"dd mmmm, yyy\"\n\n9. **textbox:**\n```\n{\n \"type\":\"textbox\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"textbox\",\n \"default\": \"name\",\n \"hint\": \"provide name\",\n \"regularexpression\":\"\",\n \"color\": \"black\"\n }\n}\n```\n- **default:** Provide a default value for the textbox (Optional).\n- **hint:** Provide a hint for the textbox (Optional).\n- **regularexpression:** Provide regex for custom validation, such as allowing only numbers, only capital letters, etc. (Optional).\n\n10. **checkbox:**\n```\n{\n \"type\":\"checkbox\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"checkbox\",\n \"values\": [\"male\", \"female\", \"other\"],\n \"selectedvalues\": [ \"male\", \"female\" ],\n \"readonly\": false, \n \"hidelabel\": false,\n \"color\": \"black\",\n \"validation\": {\n \"minselections\": 0, \n \"maxselections\": 0 \n }\n }\n}\n```\n- **values:** Provide options for the checkbox list.\n- **selectedvalues:** Provide values that need to be selected by default (Optional).\n- **readonly:** Set to true if you want to set the checkbox as readonly. By default, it's false\n- **hidelabel:** Set to true if you want to hide labels of the checkbox. By default, it's false.\n- **minselections:** Provide the minimum number of checkboxes that must be selected by the user.\n- **maxselections:** Provide the maximum number of checkboxes that can be selected by the user.\n\n11. **dropdown:**\n ```\n{\n \"type\":\"dropdown\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"dropdown\",\n \"values\": [\"male\", \"female\", \"other\"],\n \"default\": \"male\",\n \"color\": \"black\"\n }\n}\n```\n- **values:** Provide options for the dropdown list.\n- **default:** Provide the value that needs to be selected by default. Only one value is accepted. (Optional).\n12. **radio button:**\n```\n{\n \"type\":\"radio button\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"radio button\",\n \"values\": [\"male\", \"female\", \"other\"],\n \"default\": \"male\",\n \"color\": \"black\"\n }\n}\n``` \n- **values:** Provide options for the radio button list.\n- **default:** Provide the value that needs to be selected by default. Only one value is accepted. (Optional).\n\n13. **image:**\n```\n{\n \"type\":\"image\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"image\"\n }\n }\n}\n``` \n" + operationId: drafttemplate + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/createtemplate_body' + required: true + responses: + "200": + description: Template created successfully! + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_draft_200' + "400": + description: "Something went wrong, please try again later!" + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_400_1' + "405": + description: Invalid API Token! + content: + application/json: + schema: + $ref: '#/components/schemas/invalidtoken' + security: + - x-api-token: [] /createtemplate: post: tags: - Templates summary: Create Template - description: "The Template Creation API allows users to create customizable templates, which serve as blueprints for generating documents with predefined structures. Upon successful template creation, the API returns a unique **template_id** that can be used to generate documents based on the specified template.\n\nUpload you pdf in our [**Debug UI**](https://app.opensignlabs.com/debugpdf) here you can draw widgets and copy co-oridnate, page number of them. also you can copy base64 of PDF.\n\n**Below widgets are supported in the document:**\n\nCommon parameters of widgets:\n\n- **type:** Indicates the type of widget.\n- **page:** Specifies the page number on which you want to place the respective widget.\n- **x, y:** Denotes the horizontal and vertical coordinates of the starting point of the widget. You can use the debug UI to determine these values.\n- **w, h:** Represents the width and height of the widget. You can adjust these values using the debug UI.\n- **required:** Set to false if you want to make the widget optional. By default, it's true. Not applicable for signature-type widgets.\n- **name:** Provides a different name for widgets if you are providing more than one widget.\n1. **signature:**\n```\n{\n \"type\":\"signature\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21\n}\n```\n2. **stamp:**\n```\n{\n \"type\":\"stamp\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"stamp\"\n }\n}\n```\n3. **initials:**\n```\n{\n \"type\":\"initials\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"initials\"\n }\n}\n```\n4. **email:**\n```\n{\n \"type\":\"email\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"email\"\n }\n}\n```\n5. **name:**\n```\n{\n \"type\":\"name\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"name\"\n }\n}\n```\n6. **job title:**\n```\n{\n \"type\":\"job title\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"job title\"\n }\n}\n```\n7. **company:**\n```\n{\n \"type\":\"company\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"company\"\n }\n}\n```\n8. **date:**\n```\n{\n \"type\":\"date\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"date\",\n \"default\": \"04-15-2024\",\n \"format\": \"mm-dd-yyyy\" \n }\n}\n ```\n- **default:** Provide the date from which you want to start the date of the date widget. Must be provided in the specified format. By default, today's date provided.\n- **format:** Specify the date format of your choice from the options below.\n - \"dd/MM/yyyy\",\n - \"dd-mm-yyyy\", \n - \"yyyy-mm-dd\", \n - \"mm.dd.yyyy\", \n - \"mm-dd-yyyy\", \n - \"mmm dd, yyyy\", \n - \"mmmm dd, yyyy\", \n - \"dd mmm, yyyy\", \n - \"dd mmmm, yyy\"\n\n9. **textbox:**\n```\n{\n \"type\":\"textbox\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"textbox\",\n \"default\": \"name\",\n \"hint\": \"provide name\",\n \"regularexpression\":\"\"\n }\n}\n```\n- **default:** Provide a default value for the textbox (Optional).\n- **hint:** Provide a hint for the textbox (Optional).\n- **regularexpression:** Provide regex for custom validation, such as allowing only numbers, only capital letters, etc. (Optional).\n\n10. **checkbox:**\n```\n{\n \"type\":\"checkbox\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"checkbox\",\n \"values\": [\"male\", \"female\", \"other\"],\n \"selectedvalues\": [ \"male\", \"female\" ],\n \"readonly\": false, \n \"hidelabel\": false,\n \"validation\": {\n \"minselections\": 0, \n \"maxselections\": 0 \n }\n }\n}\n```\n- **values:** Provide options for the checkbox list.\n- **selectedvalues:** Provide values that need to be selected by default (Optional).\n- **readonly:** Set to true if you want to set the checkbox as readonly. By default, it's false\n- **hidelabel:** Set to true if you want to hide labels of the checkbox. By default, it's false.\n- **minselections:** Provide the minimum number of checkboxes that must be selected by the user.\n- **maxselections:** Provide the maximum number of checkboxes that can be selected by the user.\n\n11. **dropdown:**\n ```\n{\n \"type\":\"dropdown\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"dropdown\",\n \"values\": [\"male\", \"female\", \"other\"],\n \"default\": \"male\"\n }\n }\n}\n```\n- **values:** Provide options for the dropdown list.\n- **default:** Provide the value that needs to be selected by default. Only one value is accepted. (Optional).\n12. **radio button:**\n```\n{\n \"type\":\"radio button\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"radio button\",\n \"values\": [\"male\", \"female\", \"other\"],\n \"default\": \"male\"\n }\n }\n}\n``` \n- **values:** Provide options for the radio button list.\n- **default:** Provide the value that needs to be selected by default. Only one value is accepted. (Optional).\n\n13. **image:**\n```\n{\n \"type\":\"image\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"image\"\n }\n }\n}\n``` \n" + description: "The Template Creation API allows users to create customizable templates, which serve as blueprints for generating documents with predefined structures. Upon successful template creation, the API returns a unique **template_id** that can be used to generate documents based on the specified template.\n\nUpload you pdf in our [**Debug UI**](https://app.opensignlabs.com/debugpdf) here you can draw widgets and copy co-oridnate, page number of them. also you can copy base64 of PDF.\n\n**Below widgets are supported in the document:**\n\nCommon parameters of widgets:\n\n- **type:** Indicates the type of widget.\n- **page:** Specifies the page number on which you want to place the respective widget.\n- **x, y:** Denotes the horizontal and vertical coordinates of the starting point of the widget. You can use the debug UI to determine these values.\n- **w, h:** Represents the width and height of the widget. You can adjust these values using the debug UI.\n- **required:** Set to false if you want to make the widget optional. By default, it's true. Not applicable for signature-type widgets.\n- **name:** Provides a different name for widgets if you are providing more than one widget.\n- **color:** Specifies the color of the widget content. Available options include black, blue, red, and yellow, with black as the default selection if no color is specified.\n1. **signature:**\n```\n{\n \"type\":\"signature\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21\n}\n```\n2. **stamp:**\n```\n{\n \"type\":\"stamp\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"stamp\"\n }\n}\n```\n3. **initials:**\n```\n{\n \"type\":\"initials\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"initials\"\n }\n}\n```\n4. **email:**\n```\n{\n \"type\":\"email\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"email\",\n \"color\": \"black\"\n }\n}\n```\n5. **name:**\n```\n{\n \"type\":\"name\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"name\",\n \"color\": \"black\"\n }\n}\n```\n6. **job title:**\n```\n{\n \"type\":\"job title\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"job title\",\n \"color\": \"black\"\n }\n}\n```\n7. **company:**\n```\n{\n \"type\":\"company\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"company\",\n \"color\": \"black\"\n }\n}\n```\n8. **date:**\n```\n{\n \"type\":\"date\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"date\",\n \"default\": \"04-15-2024\",\n \"format\": \"mm-dd-yyyy\",\n \"color\": \"black\"\n }\n}\n ```\n- **default:** Provide the date from which you want to start the date of the date widget. Must be provided in the specified format. By default, today's date provided.\n- **format:** Specify the date format of your choice from the options below.\n - \"dd/MM/yyyy\",\n - \"dd-mm-yyyy\", \n - \"yyyy-mm-dd\", \n - \"mm.dd.yyyy\", \n - \"mm-dd-yyyy\", \n - \"mmm dd, yyyy\", \n - \"mmmm dd, yyyy\", \n - \"dd mmm, yyyy\", \n - \"dd mmmm, yyy\"\n\n9. **textbox:**\n```\n{\n \"type\":\"textbox\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"textbox\",\n \"default\": \"name\",\n \"hint\": \"provide name\",\n \"regularexpression\":\"\",\n \"color\": \"black\"\n }\n}\n```\n- **default:** Provide a default value for the textbox (Optional).\n- **hint:** Provide a hint for the textbox (Optional).\n- **regularexpression:** Provide regex for custom validation, such as allowing only numbers, only capital letters, etc. (Optional).\n\n10. **checkbox:**\n```\n{\n \"type\":\"checkbox\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"checkbox\",\n \"values\": [\"male\", \"female\", \"other\"],\n \"selectedvalues\": [ \"male\", \"female\" ],\n \"readonly\": false, \n \"hidelabel\": false,\n \"color\": \"black\",\n \"validation\": {\n \"minselections\": 0, \n \"maxselections\": 0 \n }\n }\n}\n```\n- **values:** Provide options for the checkbox list.\n- **selectedvalues:** Provide values that need to be selected by default (Optional).\n- **readonly:** Set to true if you want to set the checkbox as readonly. By default, it's false\n- **hidelabel:** Set to true if you want to hide labels of the checkbox. By default, it's false.\n- **minselections:** Provide the minimum number of checkboxes that must be selected by the user.\n- **maxselections:** Provide the maximum number of checkboxes that can be selected by the user.\n\n11. **dropdown:**\n ```\n{\n \"type\":\"dropdown\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"dropdown\",\n \"values\": [\"male\", \"female\", \"other\"],\n \"default\": \"male\",\n \"color\": \"black\"\n }\n}\n```\n- **values:** Provide options for the dropdown list.\n- **default:** Provide the value that needs to be selected by default. Only one value is accepted. (Optional).\n12. **radio button:**\n```\n{\n \"type\":\"radio button\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"radio button\",\n \"values\": [\"male\", \"female\", \"other\"],\n \"default\": \"male\",\n \"color\": \"black\"\n }\n}\n``` \n- **values:** Provide options for the radio button list.\n- **default:** Provide the value that needs to be selected by default. Only one value is accepted. (Optional).\n\n13. **image:**\n```\n{\n \"type\":\"image\", \n \"page\":1, \n \"x\": 327, \n \"y\": 628, \n \"w\": 114, \n \"h\": 21, \n \"options\": {\n \"required\": true, \n \"name\": \"image\"\n }\n }\n}\n``` \n" operationId: createtemplate requestBody: content: @@ -1422,16 +1455,16 @@ components: $ref: '#/components/schemas/draftdocument_body_signers' sendInOrder: type: boolean - example: true description: "If set to 'true', only the first signer will receive the signature request email initially. Emails to subsequent signers will be triggered sequentially, with each sent only after the previous signer has completed their signing. By default, sendInOrder is set to 'true'." + example: true enableOTP: type: boolean - example: false description: "true - this option will enable OTP verification. Users will receive a verification code via email, which they must enter to sign the document. false - this option will disable OTP verification, allowing users to sign the document directly without additional steps." + example: false enableTour: type: boolean - example: false - description: "true - this option will enable a guided tour for signers, providing instructions during the signing process. false - disable the guided tour, ensuring a faster, uninterrupted signing experience." + description: "true - this option will enable a guided tour for signers, providing instructions during the signing process. false - disable the guided tour, ensuring a faster, uninterrupted signing experience." + example: false createdocument_body: required: - file @@ -1481,16 +1514,16 @@ components: example: "" sendInOrder: type: boolean - example: true description: "If set to 'true', only the first signer will receive the signature request email initially. Emails to subsequent signers will be triggered sequentially, with each sent only after the previous signer has completed their signing. By default, sendInOrder is set to 'true'." + example: true enableOTP: type: boolean - example: false description: "true - this option will enable OTP verification. Users will receive a verification code via email, which they must enter to sign the document. false - this option will disable OTP verification, allowing users to sign the document directly without additional steps." + example: false enableTour: type: boolean - example: false - description: "true - this option will enable a guided tour for signers, providing instructions during the signing process. false - disable the guided tour, ensuring a faster, uninterrupted signing experience." + description: "true - this option will enable a guided tour for signers, providing instructions during the signing process. false - disable the guided tour, ensuring a faster, uninterrupted signing experience." + example: false inline_response_200_d: type: object properties: @@ -1556,8 +1589,8 @@ components: example: "" sendInOrder: type: boolean - example: true description: "If set to 'true', only the first signer will receive the signature request email initially. Emails to subsequent signers will be triggered sequentially, with each sent only after the previous signer has completed their signing. By default, sendInOrder is set to 'true'." + example: true timeToCompleteDays: type: number description: time to complete days is used to calculate expiry date of your document @@ -1565,12 +1598,12 @@ components: example: 15 enableOTP: type: boolean - example: false description: "true - this option will enable OTP verification. Users will receive a verification code via email, which they must enter to sign the document. false - this option will disable OTP verification, allowing users to sign the document directly without additional steps." + example: false enableTour: type: boolean - example: false - description: "true - this option will enable a guided tour for signers, providing instructions during the signing process. false - disable the guided tour, ensuring a faster, uninterrupted signing experience." + description: "true - this option will enable a guided tour for signers, providing instructions during the signing process. false - disable the guided tour, ensuring a faster, uninterrupted signing experience." + example: false resendmail_body: required: - document_id @@ -1634,12 +1667,12 @@ components: example: "" enableOTP: type: boolean - example: false description: "true - this option will enable OTP verification. Users will receive a verification code via email, which they must enter to sign the document. false - this option will disable OTP verification, allowing users to sign the document directly without additional steps." + example: false enableTour: type: boolean - example: false - description: "true - this option will enable a guided tour for signers, providing instructions during the signing process. false - disable the guided tour, ensuring a faster, uninterrupted signing experience." + description: "true - this option will enable a guided tour for signers, providing instructions during the signing process. false - disable the guided tour, ensuring a faster, uninterrupted signing experience." + example: false inline_response_200_3: type: object properties: @@ -1705,16 +1738,25 @@ components: $ref: '#/components/schemas/createtemplate_body_signers' sendInOrder: type: boolean - example: true description: "If set to 'true', only the first signer will receive the signature request email initially. Emails to subsequent signers will be triggered sequentially, with each sent only after the previous signer has completed their signing. By default, sendInOrder is set to 'true'." + example: true enableOTP: type: boolean - example: false description: "true - this option will enable OTP verification. Users will receive a verification code via email, which they must enter to sign the document. false - this option will disable OTP verification, allowing users to sign the document directly without additional steps." + example: false enableTour: type: boolean - example: false - description: "true - this option will enable a guided tour for signers, providing instructions during the signing process. false - disable the guided tour, ensuring a faster, uninterrupted signing experience." + description: "true - this option will enable a guided tour for signers, providing instructions during the signing process. false - disable the guided tour, ensuring a faster, uninterrupted signing experience." + example: false + inline_response_draft_200: + type: object + properties: + objectId: + type: string + example: Bh2Hspnmch + url: + type: string + example: https://app.opensignlabs.com/drafttemplate/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2VtYWlsIjoicHJhZnVsbC5uYXZrYXIrYWRtaW5AbnhnbGFicy5jb20iLCJ0ZW1wbGF0ZV9pZCI6IkF0Zkk0cmNCbnAiLCJpYXQiOjE3MzEzMTExMzl9.aNqjCxc9MkE6-ZIr-MObKjqtpR5d3NXi68eMeWnT0Lc inline_response_200_5: type: object properties: @@ -1750,12 +1792,12 @@ components: example: "" enableOTP: type: boolean - example: false description: "true - this option will enable OTP verification. Users will receive a verification code via email, which they must enter to sign the document. false - this option will disable OTP verification, allowing users to sign the document directly without additional steps." + example: false enableTour: type: boolean - example: false - description: "true - this option will enable a guided tour for signers, providing instructions during the signing process. false - disable the guided tour, ensuring a faster, uninterrupted signing experience." + description: "true - this option will enable a guided tour for signers, providing instructions during the signing process. false - disable the guided tour, ensuring a faster, uninterrupted signing experience." + example: false inline_response_404_7: type: object properties: