Hi,
I have a weird behaviour I do not understand. I’m using the envlope-API to create an envelope based on a template (/restapi/v2.1/accounts/{{accountId}}/envelopes). My destination is the development tenant.
For this API Call I use the following request body
{
"templateId": "{{templateId}}",
"emailSubject": "Subject set by API",
"emailBlurb": "Mailbody set by API",
"templateRoles": [
{
"email": "Some.Name@test.com",
"name": "Some Name",
"roleName": "signer",
"tabs": {
"companyTabs": [
{
"value": "test Company 1",
"tabLabel": "atb.docusignFields.label-company <id>",
"locked": "true"
},
{
"value": "test Company 2",
"tabLabel": "atb.docusignFields.label-company <id>",
"locked": "true"
}
]
}
}
],
"status": "sent"
}With this I receive a HTTP.201 Created.
The call GET /restapi/v2.1/accounts/{{accountId}}/envelopes/{{envelopeId}}/documents/1/tabs then shows the values set in the previous POST Call.

However, as soon as the recipient (role “signer”) clicks on “Review Document” in the mail received, the value changes to “redceiver_test” (in the API and within the document)

Why? What am I doing wrong?
Weirdly I found a workaround. When I first POST /restapi/v2.1/accounts/{{accountId}}/envelopes without the tabs and status “created” (to create a Draft)
{
"templateId": "{{templateId}}",
"emailSubject": "Subject set by API",
"emailBlurb": "Mailbody set by API",
"templateRoles": [
{
"email": "Some.Name@test.com",
"name": "Some Name",
"roleName": "signer"
}
],
"status": "created"
}and then changing the envelope created via PUT /restapi/v2.1/accounts/{{accountId}}/envelopes/{{envelopeId}}/recipients/1/tabs
(Hint: I got the tabId via GET /v2.1/accounts/{{accountId}}/envelopes/{{envelopeId}}/documents/1/tabs; however, these IDs seems to change from envelope to envelope, therefore I did not include them in my previous API Call)
{
"textTabs": [
{
"value": "test Company 1",
"locked": "true",
"tabLabel": "atb.docusignFields.label-company <id>",
"tabId": "<tabId>"
},
{
"value": "test Company 2",
"locked": "true",
"tabLabel": "atb.docusignFields.label-company <id>",
"tabId": "<tabId>"
}
]
}And then sending the envelope by changing the status to sent via
PUT /restapi/v2.1/accounts/{{accountId}}/envelopes/{{envelopeId}}
{
"status": "sent"
}the document contains the correct values… Even after the recipient reviews the document.
Where does the value change to “redceiver_test” comes from in the first place?
Thanks in advance,
best wishes,
Julian
Back to Docusign.com


