Skip to main content
New Voice
October 23, 2026
Question

DocuSign API endpoint /restapi/v2.1/accounts/{accountId}/envelopes search_text problem

I have been using the DocuSign API for over two years now and recently came across the following problem.

Using the endpoint 

/restapi/v2.1/accounts/{accountId}/envelopes

 (https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/liststatuschanges/)

I wanted to find envelopes containing certain text. I have done this many times before with no problems. However, on this occasion the expected envelope was not being returned. The first search I performed used the following:

https://eu.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes?from_date=2026-05-01T00:00:00Z&to_date=2026-10-22T23:59:59Z&search_text=contrat_FRECOCMP_France_AFR_prestations_2027_2027&order=desc&order_by=action_required

This returned no envelope matches. Then I tried the search :

https://eu.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes?from_date=2026-05-01T00:00:00Z&to_date=2026-10-22T23:59:59Z&search_text=ontrat_FRECOCMP_France_AFR_prestations_2027_2027&order=desc&order_by=action_required

Which is exactly the same as the first search but with the 'c' of 'contrat' removed. This returned one envelope match and inside that envelope was the string ‘contrat_FRECOCMP_France_AFR_prestations_2027_2027’. I then tried the search :

https://eu.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes?from_date=2026-05-01T00:00:00Z&to_date=2026-10-22T23:59:59Z&search_text=contrat_FRECOCMP_France_AFR_prestations_2027_202&order=desc&order_by=action_required

With the difference between this and the first search being the removal of the last number '7'. The envelope that was returned by the 2nd search was again found.

So, why does the first search not return the envelope that the other two searches do?

Is there a limit on the number of characters (48) that can be searched for and if so why would it break the search if this number was exceeded. That is currently the only thing I can think of but it does seem rather strange.

For info, I have also performed other searches using the '48 character' idea and it returns the same results i.e. If 48 characters are used an envelope or envelopes are found but it I add the 49th character [that also exists in the envelop(s)] no matches are found!

Any help much appreciated