From the Trenches: Optimize your SOAP API calls with server-specific base URIs

When it comes to using an API, one of the key considerations is ensuring that you are communicating with the correct server. In most cases, this means making an HTTP request against a specific endpoint URL that identifies the location of the API resources. With your Docusign account, this specific endpoint may be different depending on the region and data center where your account is located. We refer to this as your account “site” or “server”.

In Docusign’s developer environment there is only one server, named “demo”, so the topic of this article is not especially relevant for a demo integration. However, the production environment includes a number of different servers such as NA1 (www), NA2, NA3, EU, CA, and others.

Why should I care?

If you are using the eSignature SOAP API, ensuring that the server is correctly configured in your API calls can mitigate some known troubleshooting headaches and potentially improve the response times of your calls. The SOAP API behaves differently than the REST API, as the REST API will error and reject calls that are not made to the correct server. 

Our SOAP API is designed in a way that you do not actually need to specify the server. It uses a cross-site forwarding proxy to automatically forward the API calls from one server to the next until it finds the one your account is on. While this may sound convenient, it does take some time to cycle through each server, which is why specifying the server in your API calls can potentially improve performance and save a couple of seconds per call.

Where can I find my server?

As an administrator on a Docusign account, you can find your server by finding your Account Base URI. To find this on your account, navigate to Settings > Apps and Keys. The Apps and Keys page is where you can find API information about your account and manage any integration keys that  you may own. One of these pieces of API information is the Account Base URI

The base URI will always be in the form of https://{server}, where the server will be replaced with your account’s specific server. For example, here is a view of an account on the NA4 server:

You can find your base URI on the API and Keys page in Settings.

Now let's take a look at how you can get the base URI from an API call. Using the SOAP API, you can do this by calling the Credentials API Group with the Login method. Here is an example of a request and a response using this method:


POST /api/3.0/credential.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: ""
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap="">
        <Login xmlns="">


HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<soap:Envelope xmlns:soap=""
         <wsu:Timestamp wsu:Id="Timestamp-324bf44e-e98f-464a-880d-d40bd9d4798f">
      <LoginResponse xmlns="">
            <AuthenticationMessage>Successful authentication</AuthenticationMessage>
                  <AccountName>Example Account</AccountName>
                  <UserName>Example User</UserName>

You can see in the response here that a list of accounts is returned, which also includes a <BaseUrl> property. My example here only includes one account, but you may see more if the user is a member of multiple accounts.

Now that you know your Base URL, you can use it in your API calls. This will ensure the calls coming from your integration are pointing to the correct server. So in my example of an account on the NA4 server, if I am using the DSAPI.ASMX service endpoint, I will update my endpoints as follows:



Again, this example uses the DSAPI.ASMX service endpoint, but this will also work for the accountmanagement.ASMX and API.ASMX service endpoints.

One important thing to note is that you are updating the request endpoint, but you are not updating the “SOAPAction” header. The SOAPAction header should still use the convention for its base path.

What if I don’t own the integration?

If you are using a third-party application that is integrated with Docusign, then you will likely have very little control over the code that is making the API calls to Docusign. However, many integrations that use our SOAP API have settings or configuration pages that ask you to input your base URI. Some older guides may suggest for you to use the base URI because it will work just fine, but as you learned above, specifying your base URI will always be preferred and may improve your overall performance. If this option is not available for configuration, please reach out to the integration owner for guidance and support.

Additional resources

Steve DiCicco
Steve DiCicco
Developer Support Engineer