Question

Upload File & Send DocuSign Envelope to Customer - INVALID_REQUEST_PARAMETER

  • 17 December 2023
  • 0 replies
  • 45 views

 In response to the post above: 

 

Even if you upload a new document, I recommend you set an empty template with a role for the recipient. Leave the name and email empty for this role since we’ll fill it here in the API request. Just give a name to the role. Once it’s done look at your URL bar and copy the template ID.

 

Now paste this in the requests body:

 

{

  "status": "sent",

  "emailSubject": "{{YOUR SUBJECT}}",

  "emailBlurb": "{{YOUR MESSAGE}}",

  "templateId": "{{TEMPLATE ID}}",

  "documents": [

    {

      "documentId": "1",

      "name": "{{DOCUMENT NAME}}",

      "fileExtension": "pdf",

      "documentBase64": "{{BASE64 STRING}}”

    }

],

"templateRoles": [

  {

    "email": "{{RECIPIENT EMAIL}}",

    "name": "{{RECIPIENT NAME}}",

    "roleName": "{{ROLE NAME AS DEFINED EARLIER}}"

  }

]

}

 


 

Note that you’ll need to encode your document in Base 64 format. In my case I had a PDF URL from a previous Google Docs step in my Zap. You can do that by going to thebase64.com > Signup > Grab your API secret > And add a Base 64 step in your Zap just before Docusign. It’s free and fast.

 

If you want to add a “Sign Here” field in your Docusign document (to make it easier for the recipient), add a comma at the end of the “roleName” line + the following code:

 

"tabs": {

  "signHereTabs": [

    {

      "documentId": "1",

      "pageNumber": "{{THE PAGE NUMBER WHERE YOU WANT THE FIELD}}",

      "xPosition": "100",

      "yPosition": "100"

    }

   ]

  }

 


 

As to “xPosition” and “yPosition”, just make tests and play around to find the right spot.

 

 

 

That’s it! Thanks :)

Adrien


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.