Skip to main content
Blog
Home/

From the Trenches: Troubleshooting INVALID_REQUEST_PARAMETER errors in the eSignature REST API

Author Iandro Simoes
Iandro Simoes
Summary3 min read

INVALID_REQUEST_PARAMETER errors come up frequently in Docusign eSignature API integrations. Understand common causes for these errors and how to troubleshoot them.

      • Additional resources

      Table of contents

      One of the most common errors when using the eSignature REST API is the INVALID_REQUEST_PARAMETER. That error has various causes, although the error message describes precisely the cause of the issue. Let's see some examples below.

      {
          "errorCode": "INVALID_REQUEST_PARAMETER",
          "message": "The request contained at least one invalid parameter. Captive Recipients not supported with WhatsApp Delivery."
      }

      The error message describes an issue involving the WhatsApp delivery feature, which seems incompatible with embedded recipients. When you choose WhatsApp delivery, Docusign sends notifications to the messaging app that links the recipient directly to the agreement to be signed. With embedded recipients, the signers use your application and the embedded signing link to sign from within your application. No signing notification is sent by Docusign in this case, which is why WhatsApp delivery and embedded recipients are incompatible in this scenario. Now, let's see the API request that caused the issue.

      {
          "emailSubject": "Please sign this document set",
          "documents": [
              {
                  "documentBase64": "{document_base64}",
                  "name": "Document Name",
                  "fileExtension": "txt",
                  "documentId": "1"
              }
          ],
          "recipients": {
              "signers": [
                  {
                      "email": "recipient01@domain.com",
                      "name": "Signer 01",
                      "recipientId": "1",
                      "routingOrder": "1",
                      "clientUserId": 1000,
                      "deliveryMethod": "WhatsApp",
                      "phoneNumber":
                      {
                          "countryCode": "1",
                          "number":"0056781234"
                      },
                      "tabs": {
                          "signHereTabs": [
                              {
                                  "anchorString": "/SignHere01/"
                              }
                          ]
                      }
                  }
              ]
          },
          "status": "sent"
      }

      The clientUserId automatically specifies the signer as captive (embedded). Furthermore, the deliveryMethod property is set to WhatsApp.

      Docusign can return INVALID_REQUEST_PARAMETER for other reasons as well:

      • Passing null as the value for a mandatory parameter, such as the envelope ID in the envelope creation.

      • The integration sends a request to the endpoint with no query parameters as required. That can happen, for example, on GET Envelopes:listStatusChanges, where your request must include one or more of the following parameters: from_date, envelope_ids, or transaction_ids.

      • Failing to supply the URL correctly can also throw an error. Example: not supplying the accountId in the API URL endpoint.

      • Incorrect ID format. The Docusign IDs (envelopes, accounts, users, etc.) are globally unique identifiers (GUIDs) using the following format: 7e5bd754-357b-4f7b-b368-3ec2fc280b56. You can get the INVALID_REQUEST_PARAMETER when using IDs in the wrong format.

      • Incorrect value format. Each parameter has its correct value format. For example, if you are working on positioning the tabs using the yPosition and xPosition parameters, the values must be in integer format, not a fractional number. All the value formats may be found in our API Reference.

      As you can see, knowing what is being sent in the request body is fundamental to troubleshooting the issue. The best way to do that is to get the API logging on the admin account and follow the path described in this article to identify and solve the issue.

      If you have any questions about your development,  we recommend you join the Docusign Developer Community for support.

      Additional resources

      Author Iandro Simoes
      Iandro Simoes

      Iandro Simoes has been a developer since 2011 and has worked with API development and integrations since 2017. As a developer support engineer, he helps business owners and developers find the best technical solutions for their Docusign integrations. His passion is implementing new technologies and, through this, being part of an innovative and technological world.

      More posts from this author

      Related posts

      • Analyze your API calls with API Logger
        Developers

        Analyze your API calls with API Logger

        Author Larry Kluger
        Larry Kluger
      • From the Trenches: Managing API logs with the C# SDK

        From the Trenches: Managing API logs with the C# SDK

        Author Sylvain Lebreton
        Sylvain Lebreton
      • From the Trenches: Find your REST request using Docusign API logs

        From the Trenches: Find your REST request using Docusign API logs

        Author Koll Klienstuber
        Koll Klienstuber
      Analyze your API calls with API Logger

      Analyze your API calls with API Logger

      Author Larry Kluger
      Larry Kluger
      From the Trenches: Managing API logs with the C# SDK

      From the Trenches: Managing API logs with the C# SDK

      Author Sylvain Lebreton
      Sylvain Lebreton
      From the Trenches: Find your REST request using Docusign API logs

      From the Trenches: Find your REST request using Docusign API logs

      Author Koll Klienstuber
      Koll Klienstuber

      Discover what's new with Docusign IAM or start with eSignature for free

      Explore Docusign IAMTry eSignature for Free
      Person smiling while presenting