Course Objective
This course aims to train developers in advanced integration with the Legale.io API using Postman as the testing and automation tool. By the end of the course, participants will be able to securely and efficiently manage digital documents, upload files, and contact retrieval to launching digital signature flows and handling smart templates.
Methodology
• 100% online, with a focus on hands-on exercises using Postman.
• The course will include brief theoretical explanations followed by practical demonstrations and interactive exercises.
Table of Contents
Section | Topic |
---|---|
1 | Import Postman collection from Legale |
2 | Create API Key from Legale |
3 | Upload a document via API |
4 | Send document for signature via API |
5 | Get contacts via API |
6 | Get users via API |
7 | Get your linked devices to Legale via API |
8 | Get folders in Legale via API |
9 | Delete folders via API |
10 | Get all documents via API |
11 | Delete documents via API |
12 | Get document status via API |
13 | Get signed document via API |
14 | Get Smart documents list via API |
15 | Start signature flow from smart template via API |
Section 1: Postman example from Legale #
Theoretical context #
A Postman collection is a set of preconfigured API requests. Here, you will import an official example from Legale.io to explore the basic structure and understand how the API is organized.
What you will learn #
-
How to find and download a Postman collection from Legale.io
-
How to import the collection into Postman
-
How to explore request structures and categories
Instructions #
-
Go to https://legale.io in your browser
-
Scroll down and click “API Documentation”
-
Select “Legale API – 5MIN” > then go to the API V1 tab or go to https://doc.legale.io/docs/v1/overview
-
Scroll to the bottom of the “Overview” section
-
Click the link to download the Postman example
-
Copy the JSON content and paste it into Notepad
-
Save it with a
.json
extension -
In Postman (https://www.postman.com/), click Import and upload the
.json
file
Conclusion #
By the end of this section, you will understand how to quickly start working with Legale.io’s API using a prebuilt Postman collection, which helps speed up development and testing.
Section 2: Create an API Key from Legale #
Theoretical context #
API Keys are used to securely authenticate applications accessing Legale.io. Postman Environments allow you to store and reuse variables like keys and base URLs, keeping your requests organized and secure.
What you will learn #
-
How to generate an API key in Legale.io
-
How to store credentials securely in Postman
-
How to create an environment for dynamic values
-
How to link environments to collections
Instructions #
-
In Postman, import the previously saved
.json
file -
In your Legale.io account, go to Integration > API Keys
-
Create a new API Key, assign it to a user, and copy it immediately
-
In Postman, go to Environments and create a new environment
-
Add variable
API_KEY
→ paste the key -
Add variable
BASE_URL
→ copy from API documentation
-
-
Save the environment
-
In the Collections tab, choose the newly created environment
-
Check that the variables turn blue—this confirms they’re active
Conclusion #
You’ve learned how to authenticate using Legale.io’s API and configure reusable environments, an essential practice for working efficiently and securely with APIs.
Section 3: Upload a document via API #
#
Theoretical context #
APIs use Base64 encoding to send files as text within JSON bodies. Documents must include anchors to mark the signature location when sent for signing.
What you will learn #
-
How to prepare documents for upload via API
-
How to convert PDFs to Base64 format
-
How to configure a document upload request
-
How to validate the document creation in Legale
Instructions #
-
Create a Word document and insert a signature anchor like
FIRMA1
-
Convert the Word file to a PDF
-
Use a tool to encode the PDF into Base64 format from https://base64.guru/converter/encode/pdf
-
In Postman, go to folder “Document” > request “Document create”
-
Use the environment (ensure blue variables)
-
In the body, replace
"file"
with the Base64-encoded string -
Fill in document name, description, type, folder, and subfolder
-
-
Click Send and take note of the
GUID
andID
returned -
In Legale.io, refresh the page to verify folder and file creation
Conclusion #
You can now encode and upload documents to Legale using API calls, a critical step for automating legal document workflows.
Section 4: Send document for signature via API #
#
Theoretical context #
The Start Flow endpoint activates a digital signing process. You define signers, roles, anchors, and document behavior programmatically, allowing full automation of signature workflows.
What you will learn #
-
How to initiate a signature flow via the API
-
How to configure signer details and options
-
How to use anchors to define where signatures go
-
How to retrieve and test the signing link
Instructions #
-
In Postman, open folder “Sign” > request “Start Flow”
-
Make sure the environment is selected (check for blue variables)
-
In the request body, fill in:
-
guid
of the uploaded document -
signer’s name, email, signature type (e.g. remote)
-
signature anchor (e.g.
FIRMA1
) -
expiration and additional parameters
-
-
Remove or add additional signers as needed
-
Click Send—you will receive a signature link
-
Open the link in your browser and complete the signing process
-
Go back to Legale.io, refresh and confirm document status is now Signed
Conclusion #
You now know how to send documents for signing via the Legale API, including configuring signers, anchoring signatures, and retrieving the signature link.
Section 5: Get contacts via API #
Theoretical context #
Contacts in Legale are linked to specific accounts. Accessing them via API allows integrations to dynamically fetch user information.
What you will learn #
-
How to retrieve all contacts associated with a Legale account
-
How to verify that API results match the Legale UI
-
How contact data is structured in the API response
Instructions #
-
In Postman, open the Data folder and select Get contacts
-
Ensure that Authorization is using your environment (blue variables)
-
Click Send
-
The response body will list all contacts: name, ID, email, and creation date
-
Go to Contacts in Legale.io and verify that the results match
Conclusion #
You’ve learned how to verify contact consistency between the API and Legale’s interface.
Section 6: Get users via API #
#
Theoretical context #
User management in Legale is critical for access control. You can retrieve user roles and statuses using the API.
What you will learn #
-
How to access the list of users using an API Key
-
How to identify admin and regular users
-
How to interpret permission levels in the response
Instructions #
-
In the Data folder, open Get users
-
Change the authentication method to API Key
-
Paste your API Key and ensure the environment is selected
-
Click Send
-
Review the response body: it will list the admin and other users with their roles
-
Compare this with the Users section in Legale
Conclusion #
You now know how to retrieve and verify user information programmatically.
Section 7: Get devices linked to Legale via API #
#
Theoretical context #
Devices such as tablets can be linked to Legale accounts. This endpoint lists them for tracking purposes.
What you will learn #
-
How to retrieve connected device data
-
How to validate device ownership and timestamps
-
How to match devices in Legale UI and API
Instructions #
-
In the Data folder, click Get tablets
-
Make sure your environment is active
-
Click Send
-
The body shows device name, owner, and creation date
-
Cross-check in Legale under Devices
Conclusion #
You can now monitor and manage connected devices through API queries.
Section 8: Get Legale folders via API #
#
Theoretical context #
Folders structure how documents are organized. Fetching them helps build document management dashboards.
What you will learn #
-
How to access folder data via API
-
How to read document counts and hierarchy
-
How to cross-check with Legale’s UI
Instructions #
-
Go to the Folder section, select Get folders
-
Ensure the environment is selected
-
Click Send
-
The body shows “My Drive” and all subfolders with IDs and document totals
-
Compare with My Documents in Legale
Conclusion #
You now understand how to structure and retrieve folders programmatically from Legale.
Section 9: Delete folders via API #
#
Theoretical context #
APIs allow for dynamic folder management, including deletion. This is essential for document lifecycle automation.
What you will learn #
-
How to locate folder IDs
-
How to delete a folder using its ID
-
How to confirm folder removal in the UI
Instructions #
-
In Postman, use Get folders to retrieve all folders
-
Identify the folder to delete and copy its ID
-
Open Delete folder, paste the ID into the variable
FOLDER_ID
-
Ensure environment is active and variables are blue
-
Click Send
-
Go to Legale, refresh the page, and confirm deletion
Conclusion #
You’ve learned to remove folders securely via API and validate changes on the platform.
Section 10: Get all documents via API #
#
Theoretical context #
Fetching all documents helps automate audits and status reporting. The API returns metadata and states.
What you will learn #
-
How to retrieve all documents in your Legale account
-
How to read document status and metadata
-
How to match API data with the UI
Instructions #
-
Navigate to the Document folder
-
Open Document all
-
Ensure the environment is active
-
Click Send
-
The body returns an array of all documents with names and statuses
-
Compare with the UI document count in Legale
Conclusion #
You now know how to retrieve, interpret, and verify documents using API endpoints.
Section 11: Delete documents via API #
#
Theoretical context #
Deleting documents via API is critical for version control and space management.
What you will learn #
-
How to identify document GUIDs
-
How to delete documents securely
-
How to validate deletion in the Legale UI
Instructions #
-
Use Document all to find the document name and GUID
-
Open Document delete
-
Paste the GUID into the variable field
-
Check the environment
-
Click Send
-
Refresh Legale and verify the document is removed
Conclusion #
You’re now equipped to manage document deletion dynamically through the Legale API.
Section 12: Get document status via API #
#
Theoretical context #
Tracking the signature and delivery status of a document ensures transparency and workflow monitoring.
What you will learn #
-
How to retrieve the status of a specific document
-
How to read signature metadata
-
How to validate with the creator’s account
Instructions #
-
Use Document all to find and copy the GUID of the desired document
-
Open Get Document Status
-
Paste the GUID in the parameter field
-
Click Send
-
Read the response: signature method, signer’s email, status
Conclusion #
You’ve learned how to track document progress and verify it via API.
Section 13: Get signed document via API #
#
Theoretical context #
Retrieving signed documents allows you to archive or forward them automatically.
What you will learn #
-
How to request the Base64 version of a signed document
-
How to handle failed retrievals
-
How to confirm document completion
Instructions #
-
Make sure the document is fully signed
-
Open Get Signed Document
-
Paste the GUID of the signed document
-
Click Send
-
The body returns the document in Base64 (or error if not signed)
Conclusion #
You can now retrieve signed documents automatically for archiving or delivery.
Section 14: Get smart templates list via API #
#
Theoretical context #
Smart templates let you define reusable documents with variable fields. You can fetch and inspect them via the API.
What you will learn #
-
How to fetch all smart templates
-
How to interpret their structure and fields
-
How to validate content using Legale
Instructions #
-
In the Smart Template folder, open Get list
-
Click Send
-
The body will list template names, content, and variable fields (if any)
-
Cross-check in Legale’s Smart document section
Conclusion #
You can now programmatically inspect reusable templates and their fields.
Section 15: Start signature flow from smart template via API #
#
Theoretical context #
This endpoint allows generating new documents and launching signing flows from smart templates, injecting variables on the fly.
What you will learn #
-
How to trigger document generation from a smart template
-
How to populate variables dynamically
-
How to configure the signer and send the document
Instructions #
-
Get the ID of the smart template from Get list
-
Go to Start flow from template
-
Fill in the variable fields with desired values
-
Assign the document a name and storage folder
-
Define signer email, name, method, and the anchor word
-
Click Send
-
Confirm email is sent and document shows up in Legale’s folder
Conclusion #
You’ve now automated the entire flow from template to signature with variable fields, saving time and reducing errors.