
From the trenches: Updating document attributes with the CLM API
Learn how to use the Docusign CLM API to update document attributes, enabling automated document management and reliable data synchronization.

Automating document attributes with the Contract Lifecycle Management (CLM) API significantly improves document management efficiency and accuracy by eliminating manual errors, simplifying compliance, and ensuring consistent categorization. This is particularly valuable for organizations that manage large volumes of documents, as it allows teams to focus on strategic tasks rather than data entry and promotes seamless integration with other business systems for a more automated workflow.
This article will demonstrate how to use the CLM API to update document attributes, enabling automated document management and reliable data synchronization.
Creating the attributes
To set up custom attributes, go to the Admin page. In the Documents & Folders section, find the Attributes option.
Click on the Create Group button as shown below:

We will name this group “Document Reviewer”. Inside the group, create the Attributes that will be added to the document in CLM.
Create two attributes: email and collaborator. Set both attributes as Strings, as shown in the image below:

Checking the attributes
It’s important to verify that the attributes were created successfully. To do this, open an existing document and click on the Attributes tab. Scroll down and add the group to display the attributes we created:

Using the CLM API
To update the attributes group, we’ll use the Documents:Patch endpoint from the CLM API. The request payload should look like this:
{
"AttributeGroups":
{
"Group Name":
{
"AttributeName":
{
"AttributeType": "String",
"RepeatingAttribute": false,
"Value": ""
}
}
}
}For the attributes we created earlier, use the following payload:
{
"AttributeGroups":
{
"Document Reviewer":
{
"email":
{
"AttributeType": "String",
"RepeatingAttribute": false,
"Value": "email@email.com"
},
"collaborator":
{
"AttributeType": "String",
"RepeatingAttribute": false,
"Value": "John Doe"
}
}
}
}The endpoint requires the id of the Document, which you can find in the URL when viewing the document in CLM or by retrieving it through the API.
In Postman, the API call looks like this:

The GUID at the end of the endpoint is the document id whose attributes will be updated through the CLM API.
You can see that the group name we created is included inside the AttributeGroups object., which the API uses to identify the attribute group.
The same applies for the attributes. The API uses the attribute name.
The AttributeType must match the type selected in the attribute settings. Both attributes were set to the “String” type:

Checking the results
If you receive an HTTP 200 response, refresh the document's page and see if the data was updated:

Otherwise, if the group name or attribute name is incorrect, you’ll receive an HTTP 422 response. The API response includes details about the error in the ValidationErrors object:

In the above image, you can see that the group name is incorrect (e.g Document Viewer instead of Document Reviewer).
Conclusion
Automating attribute updates through the CLM API helps maintain consistent metadata and reduces manual work in your document workflows.
Additional resources

Guilherme Flores is a Docusign Developer Support Engineer based in Brazil.
Related posts
Docusign IAM is the agreement platform your business needs


