Intermittent timeout in createEnvelope API (Node.js) – Envelope created but response not received
Hi Team,
We are facing an intermittent issue while integrating with DocuSign using the Node.js SDK.
Issue Description
We are calling the createEnvelope API from our Node.js application. In some cases:
-
The API call times out (60 seconds) on our side
-
However, the envelope is successfully created in DocuSign within ~7–10 seconds
-
A webhook (Connect event) is also received successfully
The problem is that the API response is not received by our application
Expected Behavior
The createEnvelope API should return a response with envelopeId once the envelope is created.
Actual Behavior
-
Envelope gets created successfully
-
Webhook is triggered
-
But the API call results in:
AxiosError: timeout of 60000ms exceeded
Environment Details
-
Runtime: Node.js
-
SDK: DocuSign Node SDK
-
Hosting: Azure Kubernetes Service (AKS)
-
Timeout: 60 seconds (also tested with higher timeout)
-
Occurrence: Intermittent (not consistent)
Code Snippet
const dsApiClient = new docuSign.ApiClient();
dsApiClient.addDefaultHeader("Authorization", "Bearer " + token);
dsApiClient.restClient = dsApiClient.restClient || {};
dsApiClient.restClient.agent = new https.Agent({
keepAlive: true,
maxSockets: 50,
keepAliveMsecs: 1000
});
dsApiClient.setBasePath(apiBasePath);
dsApiClient.timeout = 60000;
const envelopesApi = new docuSign.EnvelopesApi(dsApiClient);
const results = await envelopesApi.createEnvelope(accountId, {
envelopeDefinition: envelope,
});
Observations
-
The same implementation works fine in lower environments
-
Issue is only seen in Production
-
Based on logs, DocuSign completes processing quickly
-
Webhook confirms envelope creation even when API times out
Questions
-
Is there any known issue where the
createEnvelopeAPI succeeds but the response is not returned? -
Could this be related to SDK behavior or connection handling?
-
Are there any recommended configurations for Node.js SDK in containerized environments (AKS)?
-
Is it safe to rely on webhook events as the source of truth in such cases?
Any guidance or suggestions would be greatly appreciated.
Thanks in advance!
Back to Docusign.com

