Formality API Client Documentation
The Formality API Client allows you to interact with the Formality API efficiently, providing endpoints to manage agreements, counterparties, and related entities within a given workspace.
Requirements
An active Formality workspace.
The base API URL.
Your assigned
workspaceId, which follows/api/v1/in the API URL.
Identifying Your Workspace ID
The workspaceId follows app.formality.com in the APP URL. For example, if you are accessing agreements using the following URL:
<https://app.formality.com/myCompany/agreements>The workspace ID is myCompany.
Accessing the Swagger Interface
To explore and test the API, you can use the Swagger UI.
Steps to Access Swagger:
Open your browser.
Navigate to the following URL: https://app.formality.com/-/api-doc-swagger
The Swagger UI will load (you must be logged in), displaying the available API endpoints.
You can expand any endpoint to view details and test API calls.
Click Try it out on an endpoint to enter parameters and execute requests.
Review the responses directly in the interface.
Generating Personal Refresh Tokens
Refresh Tokens let you securely connect your Formality workspace to external tools and services like Postman, scripting environments, or internal integrations—without needing to log in manually.
What You Can Do With Refresh Tokens
Automate Workflows
Use tokens to enable integrations that automate tasks like syncing agreements or triggering actions based on lifecycle events.
Access the API Securely
Generate access tokens to authenticate API requests without sharing your login credentials.
Monitor and Manage Usage
See when and where your tokens were last used, helping you stay in control of access.
Set Expirations
Define how long a token stays valid—from a few days to a full year—and revoke it at any time.
Steps to Generate a Token:
Create a Refresh Token Head to Personal Settings > Formality API
click on “New Token”
give it a name
set a token description if needed
set an expiration date
click on “Create Token”
Use It Once to Save It The full token is shown only once right after creation—copy and store it somewhere safe. Once copied you can click on “Done”
Generate the Access Token Once you’ve copied your refresh token, you can use it to request an Access Token via the
GET /api/v1/tokenendpoint.<aside> ℹ️
The access token has a lifespan of 5 minutes, once expired you’ll need to generate a new one.
</aside>
Use the access token in your API requests In the response, locate the
tokenfield and copy its value.
You can use this access token to request all the endpoints by adding the following header:
Using the Token in External Tools
Once you have the token, you can use it in other tools like Postman or Curl to authenticate API requests.
Using the Token in Postman
Open Postman.
Create a new request.
Select the GET method and enter an API endpoint, e.g.:
Navigate to the Headers tab and add the following key-value pair:
Key:
AuthorizationValue:
Bearer <your-access-token>
Click Send to execute the request.
Review the JSON response.
Using the Token with Curl
Run the following command in your terminal:
Objects relationship

Base API URL
To access the API, use the following format:
For example:
Making API Requests
All requests should be made using the correct HTTP methods (GET, POST, PUT, DELETE) and must include the required workspaceId.
Example: Retrieve Agreements
Endpoint:
Example Request:
Example: Retrieve Agreement Fields
Endpoint:
Example Request:
Handling Responses
API responses are returned in JSON format. Example response for retrieving agreements:
Error Handling
401
Unauthorized – Check your access rights.
403
Forbidden – Ensure you have the correct permissions.
404
Not Found – Verify the workspace ID and endpoint.
500
Internal Server Error – Contact support if the issue persists.
Conclusion
This API client allows seamless integration with the Formality system. Ensure that you use the correct workspaceId and handle responses and errors properly when making API requests.
Need Help?
If you run into any issues or have questions about the API, reach out to our Customer Success team. We’re happy to guide you through the setup or help troubleshoot.
Mis à jour
Ce contenu vous a-t-il été utile ?
