Adobe Sign API - FAQ

API access is reserved exclusively for enterprise and developer tier accounts.

Links to core documentation

Megjegyzés:

In May 2021 the legacy SOAP APIs will no longer be supported. 

All customers using the SOAP API should migrate to the REST API as soon as possible.


General Concepts

You cannot author the document by viewing the page on Web UI, or drag-and-drop, or assign signatory roles using transientDocumentId through API.

The transientDocuments call returns the transientDocumentID, which is valid for 7 days.  You can use it only for the further API calls. It is stored on the API server and assigned this ID. Upload a file and then refer its ID in the further API calls.

You cannot directly upload a document in Agreement using the REST API.

As per the REST requirement, first create a transient document first and then use this ID in Agreement, Widget, or Library methods as the file source.

The transient document is a raw source file such as PDF, doc, docx uploaded to the Adobe servers. So, it is a convenient way to transmit your base document to the API servers and a transient document on the web.

Yes, you can post agreements using workflows in v6 using API call POST /agreements. Pass the workflowId parameter in the API call.

You can get the workflowId of a workflow using GET /workflows call.

  1. Log in to Adobe Sign as an admin

  2. Navigate to Account > Adobe Sign API > API Request Log

    API Logs

  1.  Log in to Adobe Sign Account as an admin

  2. Navigate to: Account > Adobe Sign API > API Information

  3. Click REST API Samples link.

    Megjegyzés:

    To download the JavaScript SDK, see https://github.com/adobe-sign/AdobeSignJsSdk.

Starting from v6, the option "sendTroughWeb" is no longer available. The state replaces it. It is the state in which the agreement lands. The state field can only be provided in POST calls. It never gets returned in GET /agreements/{ID} and is ignored if provided in PUT /agreements/{ID} call. The eventual status of the agreement can be obtained from GET /agreements/ID.

state(string) = ['AUTHORING' or 'DRAFT' or 'IN_PROCESS'].

AUTHORING allows a user to author the documents of an agreement before sending them out. The authoring operation here refers to creating, editing, or placing form fields along with their configurations (assignee, conditions, data type, and so on.) in the agreement documents. After posting the document in Authoring state, the document is visible in Adobe Sign Manage tab Draft section.

DRAFT is temporary or a primitive stage of the final intended resource which can be updated in steps to create the final resource and is not visible in Adobe Sign Manage tab Draft section. Using Draft state, Participant set info is not required and it can be later assigned while making PUT /agreements/agreementId to complete this draft. This step can be iterated number of times until you have all the required data to create the agreement.

IN_PROCESS changes the agreement status to Out for Signature and is visible in Adobe Sign Manage tab Out for Signature section.

The sendThroughWeb allows you to send the agreement interactively. The various parameters in the “options” field in v5 POST /agreements request allow the user to configure this interactive view(Send page). All these page configuration parameters such as fileUploadOptions are moved to POST agreements/ID/views api.

So in effect, you can achieve sendThroughWeb by creating an agreement in AUTHORING state through POST /agreements API. Then, to ask for the url of the next page in desired configuration, call the POST agreements/ID/views API.

Do the following steps:

1. Go to REST API V6 documentation and select POST/agreements method.
2. Use the following request code:

{

  "fileInfos": [

    {

      "transientDocumentId": "***************************"

    }

  ],

  "name": "test",

  "participantSetsInfo": [

    {

      "memberInfos": [

        {

          "email": "abc@gmail.com"

        }

      ],

      "order": 1,

      "role": "SIGNER"

    }

  ],

  "signatureType": "ESIGN",

  "state": "AUTHORING"

}

 

3. Now, use the method post /agreements/{agreementId}/views with below request code:

 

{

  "name": "AUTHORING"

}

The response code provides the URL for authoring fields.

One can define the callback URL in below ways:

  • Use the below parameter to define the callback url as needed:

    "callbackInfo": "",
  • Contact Adobe Sign support to set the default callback url for complete account.

SOAP UI (SmartBear) gets SSL connection error similar to the following one, which you get when you make API call. This error generally occurs if you are using outdated SSL or TLS protocol lower than TLS1.2

ERROR: Exception in request: javax.net.ssl.SSLException: Received fatal alert: protocol_version
ERROR: An error occurred [Received fatal alert: protocol_version], see error log for details

  1. Add (-Dsoapui.https.protocols=SSLv3,TLSv1.2) in the VMOPTIONS file under the Bin folder.

  2. Go to C:\Program Files\SmartBear\SoapUI-5.2.1\bin (It depends on where you have installed the SOAP UI. It can be under C:\Program Files (x86))

  3. In the VMOPTIONS file, enable full read/write file permission.

    VMOPTIONS

  4. Right click VMOPTIONS file>Properties>Security tab>Select User>Click Edit. (The User Access Control icon appears on the Edit button)>Select all the check boxes and click OK.

  5. Repeat the same for Administrators, Systems, and all application packages.

  6. Open the file using Notepad.

  7. Add this protocol at the bottom “-Dsoapui.https.protocols=SSLv3,TLSv1.2” and save the changes.

  8. Close SOAP UI and relaunch. It works with no SSL error when you make API call. (Perform test ping call to check).

Following are the steps to create Client ID and Client Secret in the adobe sign application:

  1. Log in to Adobe Sign account.

  2. Navigate to Account > Adobe Sign API > API Applications.

    Fnord.

  3. To create an application, click + icon.

    Fnord.

  4. Enter Name and Display Name.

  5. Under Domain, select CUSTOMER, and click Save.

    Fnord.

  6. Highlight the application by single click.

  7. Click Configure OAuth for Application.

    Fnord.

  8. Enter the Redirect URI.

  9. To enable the required scopes, select the respective check boxes, and click Save.

Figyelmeztetés:

In June 2020 Adobe Sign will no longer support Integration Keys. Developers should instead use the OAuth process.

  1. Log in to Adobe Sign as an account admin

  2. Navigate to: Account > Adobe Sign API > API Information

  3. Click the Integation Key link

    Navigate to Integration Key

    Megjegyzés:

    If you do not see the Integration Key link, contact your Success manager to have them enable your account.

    • Name the key with an intuitive value
    • Select the various Scopes required for your application function
    • Click Save once the key is fully configured
    Create Integration Key interface

  4. Once saved, the key can be found in: Account > Personal Preferences > Access Tokens

    The name of the key and all the enabled scopes are listed.  

    Click the key description once to expose the action links:

    • Integration Key - This link provides the literal key 
    • Revoke - This revokes and deletes the access token permanently
    Access Tokens - Integration Key

  1. Log in to Adobe Sign account.

  2. Navigate to Account > Adobe Sign API > API Applications.

  3. Click + icon to create an application.

    Postman1

  4. Click Configure OAuth for Application.

    Fnord.

  5. Generate Authorization Code using the following link. The Client ID, Redirect URI & scopes must be the same as in the following URL as selected in the application (Avoid space in the followingURL and the Shard like 'NA1' is as per the Adobe Sign account belongs to):

    https://secure.na1.echosign.com/public/oauth?redirect_uri=https://www.google.co.in&response_type=code&client_id=CBJCHBCAABAAo9FZgq31_5BVG_kcIXEe6gNtn-R-gdNe&scope=user_login:self+agreement_send:account

  6. If the call is successful, pick Authorization code from the Address bar.

    Fnord.

  7. Download and install Postman from the https://www.getpostman.com/apps link.

  8. Once it is downloaded and installed, click NEW to create a POST.

  9. Enter the https://secure.na1.echosign.com/oauth/token link as per your Adobe Sign account belongs to.

  10. Under Headers, enter Content-Type as application/x-www-form-urlencoded.

  11. Make sure x-www-form-urlencoded is selected under Body and enter the below parameters with their corresponding values from the application created in Adobe Sign account and click SEND.

    Fnord.

  12. If all the information is correct, it returns the access token and the refresh token in the response:

    Fnord.

While running OAuth Process, make sure to follow below points:

1. Correct Client ID and Redirect URI is specified.
2. Scopes provided in Authorization URL should match exactly with the scopes provided in Adobe Sign application.
3. Use the correct shard (na1, na2, au1, eu1, jp1) as per the account is being configured.
4. Remove any spaces provided in the authorization URL (if any).
5. Check the Syntax of Authorization URL:

https://secure.na1.echosign.com/public/oauth?redirect_uri=https://secure.na1.echosign.com/public/oauthDemo&
response_type=code&client_id=9MEJXY4Y4R7L2T&scope=agreement_send

Access tokens are valid only for 3600 seconds (one hour) after which they are expired.

The API request holder can use Refresh tokens in order to generate new Access tokens as needed.

Webhooks are supported in the REST API v6 and later.

If a Webhook receiver fails to respond within 72 hours, the webhook gets disabled and no notification is sent.

If the target URL for the webhook is down for any reason, Adobe Sign queue up the JSON and retry the push in a progressive cycle over 72 hours.

The undelivered events get persisted in a retry queue and a best effort is made over the next 72 hours to deliver the notifications in the order they occurred.

The strategy for retrying delivery of notifications is a doubling of time between attempts, starting with a 1-minute interval increasing to every 12 hours, resulting in 15 retries in the space of 72 hours.

 

To create webhook directly from Adobe Sign UI, first create webhook URL through Azure AD function apps by using below steps:

  1. Log in through Microsoft account https://portal.azure.com/.

  2. Register for Function Apps under the AzureAD account.

    Azure Menu

  3. Go to AzureAD and go to Function Apps > Click + icon for Functions.

  4. Select Webhook+API with Javascript as language and click Create Function.

    Azure API UI

  5. Replace the Index.js file with the following code snippet:

    module.exports = function (context, req) { 
        var clientId = req.headers['x-adobesign-clientid']; 
        // Validate that the incoming ClientID is genuine 
        if (clientId === '************************************') { 
            context.res = { 
                // status: 200, /* Defaults to 200 */ // any 2XX response is acceptable 
                body: { 
                    'xAdobeSignClientId' : clientId, 
                     
                }, 
                headers : { 
                    'Content-Type' : 'application/json' 
                } 
            }; 
        } 
        else { 
            context.res = { 
                status: 400, 
                body: "Opps!! Illegitimate Call identified" 
            }; 
        } 
        context.done(); 
    };
  6. Click the Test button on the right corner and provide the following header:

    X-AdobeSign-ClientId as ***********************

    API Test

  7. Click Save and Run.

  8. Once you receive 200 OK response with the following header, click Get function URL

    200 response

  9. Copy the URL and go to Adobe Sign UI > Webhooks > Click + icon to create.

  10. Enter the following information: 

    • Name: An intuitive name that other admins can readily understand is suggested.
    • Scope: How wide of a net is the webhook catching. Account and Group are available in the interface.
      The API supports Account, Group, User, and Resource scopes.
    • Only one Scope per webhook can be defined
    • URL: The target URL that Adobe Sign pushed the JSON payload to.
    • Events: The trigger that causes Adobe Sign to build the JSON and push it to the URL.
      Each event builds a different payload relevant to the trigger event
      Multiple Events can be included in one webhook.
    • Notification Parameters: The Notification Parameters identify the sections of the Event JSON payload, allowing you to select only the sections of the Event that are important.
    Webhook UI

  11. Once the webhook is fully defined, click Save, and the new webhook starts reacting to trigger events immediately.

The agreement asset refers to an asset through which you can create an agreement, for example, library document, widget, and agreement, itself.

To search for Agreement Asset Events, first, make a request to the API that creates agreementAssetEvents with relevant search parameters.

The Response is the first page of results along with a search Id param and next page cursor. You can use it to fetch further page results if they are available using the API, which retrieves agreementAssetEvents based on search Id.

  1. Open the REST API Documentation for version 5.

  2. Go to post/search/agreementAssetEvents and generate the access token with relevant scopes.

  3. In the request code, define the start and end date as per the requirement:

    { 
      "endDate": "2018-05-22T22:33:33", 
      "startDate": "2017-12-22T22:33:33" 
    }
  4. Click Try it out. It fetches the agreement asset IDs, which can be also used as agreement IDs.


User/Account Managment

  1. Log in to Adobe Sign.
  2. Navigate to Account>Adobe Sign API>REST API documentation.
  3. Select Version 5.
  4. Under post /users method, use the request code mentioned under
    UserCreationInfo method
    {
    "email": "email@email.com",
    "firstName": "AA",
    "lastName": "AB",
    "password":"12******rte"
    }

Adobe Sign accounts that use the Admin Console (Adobe One) to manage their user entitlement cannot use the Adobe Sign API to create users or manage existing users.

The Adobe One Admin Console uses a different API than the Adobe Sign API. Please see these articles for more information:

 

Getting Group ID:

  1. Go to https://secure.na1.echosign.com/public/docs/restapi/v5.

  2. Under Resources and Operations, click groups.

  3. Click GET /groups.

  4. Click the oAuth Access-token button.

  5. Generate the Access token.

  6. Click the Try it out button.

    You receive a response as following with the group name and Group ID:

    { 
      "groupInfoList": [ 
        { 
          "groupId": "3AAABLblqZhB4o9EnlvmGB_m8CrG5O6XClTBO7vmojOOexu5r3G95LtEV2Sp7BuhNvQYSvWB7PmmwVPXnhPIiYSuHV98Cerkp", 
          "groupName": "Default Group" 
        }, 
        { 
          "groupId": "3AAABLblqZhC3dPT6za5h7r1-BOEWivCe_OcAVONhcsKa57SL9_iCwGr5v_JED1No5jE20Pcjv0mYH2J-LoY1AcmqS69vRkO7", 
          "groupName": "test" 
        }, 
      ] 
    }

Deleting group:

  1. Click DELETE /groups/{groupId}.

  2. To generate Access Token, click the oAuth Access-token button.

  3. Add groupId received in the response of the previous call that you want to delete in groupId Box.

  4. Click Try it Out.

    You receive a response as the following once Group is deleted: No content

Megjegyzés:

You cannot delete a group, which has a user assigned. In the essence, you can delete only the empty Group. You receive a response as the following if there is a user in the group.


{

  "code": "GROUP_NOT_EMPTY",

  "message": "The group cannot be deleted because it is not empty."

}


Initiating/Sending Agreements

Generating a Transient document

  1. Click on transientDocuments and expand the POST /transientDocuments method

  2. Click the OAuth Access-token button

    API TransientDocument Method

    • Enable the Scopes for the transaction
    • Click Authorize
    OAuth Scopes

  3. Allow Access

    If challenged, click Allow Access

  4. You are returned to the API methods page. The Authorization value is now populated.

    • Enter the file name in the File-Name field
    • Click the Choose File button and upload the document for the agreement
    • Click the Try it out! button
    Try it out!

  5. The response is generated.

    The transientDocumentID can be found in the Response Body:

    Transient document ID

Generating an Agreement using the Transient document

  1. Click on agreements and expand the POST /agreements method

    • Click the OAuth Access-token button
    • Enable the OAuth scope
    • Click Authorize
      • If challenged, click Allow Access
  2. You are returned to the API methods page. The Authorization value is now populated.

    • Copy the below script into a text editor (this script is just a minimally configured example; your production code will be different)
    •  Insert your trasientDocumentId value into the code where indicated
    { 
      "fileInfos": [ 
       {"transientDocumentId":"PASTE YOUR TRANSIENTDOCUMENTID HERE"} 
      ], 
      "name": "test doc", 
      "participantSetsInfo": [ 
        { 
          "memberInfos": [ 
            { 
              "email": "noreply@echosign.com" 
            } 
          ], 
          "order": 1, 
          "role": "SIGNER" 
        } 
      ], 
      "signatureType": "ESIGN", 
      "state": "DRAFT" 
    }

     

    • Copy your custom script and paste it into the AgreementInfo field
    • Click the Try it out! button
    POST agreement method

  3. The response is generated.

    The agreementID can be found in the Response Body:

    POST agreement method response

Following are the steps to add files in FileInfo Parameter:

  1. Use transient ID:

    Go to POST/transientDocuments and upload the document to be used from your local system.
    Use the transient ID generated under the File Info section in POST/Agreements:

    "fileInfos": [ 
         { 
           "transientDocumentId": "" 
         } 
       ],
  2. Use Library document ID:

    Go to Dashboard. Click Add document to Library and save the template.
    Under REST API Documentation, click GET /libraryDocuments and retrieve the Library ID for template being created.
    Under POST/Agreements, provide the library document ID:

    "libraryDocumentId": "", 
      "libraryDocumentName": "",
  3. Use publicly available URL:

    Provide the publicly accessible URL to be used under FileInfo parameter:

    { 
          "documentURL": { 
            "mimeType": "", 
            "name": "", 
            "url": "" 
          },
  1. Select the Agreements> POST/agreements option. 

  2. Select the Oauth Access-Token option, and provide necessary scopes.

  3. Once the access token is added, you can use the following Request Code:

    { 
    "documentCreationInfo": { 
         "recipientSetInfos": [ 
              { 
                   "recipientSetRole": "SIGNER", 
                   "recipientSetMemberInfos": [{"email": "testemail@email.com"}] 
              }, 
              { 
                   "recipientSetRole": "SIGNER", 
                   "recipientSetMemberInfos": [{"email": "testemail@email.com"}] 
              } 
         ], 
         "signatureFlow": "SEQUENTIAL", 
         "name": "husband wife", 
         "signatureType": "ESIGN", 
         "fileInfos": [ 
    { 
    "transientDocumentId": "(SAMPLE VALUE)3AAABLblqZhAJ9H6e23kZAfBUbItPvIhHTEyA6eZhziEp4KSntYcULpo43OEXwuWiWa-IM1r1EExYW0044CjCkliP4WFL5yKBUDq5DYSmSxVlFypcD0at8kK-BX-Mu3T9c_3GUqgDg0ArX0MmzWT72GLR_0M4Jq--mtuqGzq-VK1s-WGR6GcbedVY7XWAf3b3h-SpE08Hc-iF3zO7jQzi9newXSl-iW2JJsb_55tggkyxkXAkj74C1WD6KkJzgblK0JU-seh6QPDd0Fv6_mfQe2EPQA31nXj50aXwD_xlUBq7mg5FeaBnZ5bzgoqIWGHkbyeD2taaFdw*"} 
    ] 
    } 
    }

In POST /agreements call, for signatureflow parameter you can Pass SENDER_SIGNS_FIRST or SENDER_SIGNS_LAST value to add the Sender as First or Last Signer Respectively.

Here is an example of the call in JSON format:

{

  "documentCreationInfo": {

    "fileInfos": [

      {        "transientDocumentId":"3AAABLblqZ-yourIDGoesHere"

      }

    ],

    "name": "Test",

    "recipientSetInfos": [

      {

        "recipientSetMemberInfos": [

          {

            "email": "test@email.com"

          }

        ],

        "recipientSetRole": "SIGNER"

      }

    ],

    "signatureType": "ESIGN",

    "signatureFlow": "SENDER_SIGNS_FIRST"

  }

}

Megjegyzés:

The Option for Send on behalf is available only in REST API V6 with Advanced sharing on.

If Send permission is not provided in sharing or if Advance Sharing is not enabled, you get a response such as following:

 

{"code":"PERMISSION_DENIED","message":"User provided in x-on-behalf-of-user header does not have required permission to perform this operation."}

 

For Send on behalf function, enable Advanced Account Sharing for the account so that users can give sending permissions to other users while sharing their account. For Advanced sharing, see Enabling Advanced Account Sharing.

Once User sharing is enabled, go through the following steps to Send on behalf:

Generating a Transient document:

  1. Under transientDocuments, click POST /transientDocuments.

  2. To generate token for Authorization, click the OAUTH ACCESS-TOKEN button.

  3. In x-on-behalf-of-user, provide the email of user you want to send on behalf of in the following format: email:test@email.com

  4. To select a File, click Choose File, and click Try it Out.

    You receive a response such as following with transientDocumentId:

    {"transientDocumentId":"3AAABLblqZhB9Mjo0mrIu_pSgrf5VsMaKM68_Vmn80cimaqiUAD2OxrPp2e5H8GvjfiOxj4d5B8bCPkUfvaozW3KLisp_wseGVOL8A7oNZni1DWyFi4uNoxLQu4nUO44Wh63GQv9_HEJMePust0Pk94vJ_rbS96R7ic-vl7jbOkN0b4EB5-JMqlC-Fl_Vpyz8I1EQUrM5I4nB9ztMov4ad00yiOtDw0tB-Y2t5JdzM07P-mpJmwYEl8Fq2IeDuWjcR2tV7qY7TNGX2CNyh9jt0aMyduHeYa0GABr69z8Hm76eKdtaM_1E1ggWj205fSrNcwJsnpSO278*"}

Generating an agreement using the Transient document:

  1. Under agreements, click POST /agreements.

  2. To generate token for Authorization, Click the OAUTH ACCESS-TOKEN button.

  3. In x-on-behalf-of-user, provide the email of the user as done while creating the Transient document.

  4. In AgreementInfo, add the following code, and click Try it out.

    { 
      "fileInfos": [ 
        {    "transientDocumentId":"3AAABLblqZhB9Mjo0mrIu_pSgrf5VsMaKM68_Vmn80cimaqiUAD2OxrPp2e5H8GvjfiOxj4d5B8bCPkUfvaozW3KLisp_wseGVOL8A7oNZni1DWyFi4uNoxLQu4nUO44Wh63GQv9_HEJMePust0Pk94vJ_rbS96R7ic-vl7jbOkN0b4EB5-JMqlC-Fl_Vpyz8I1EQUrM5I4nB9ztMov4ad00yiOtDw0tB-Y2t5JdzM07P-mpJmwYEl8Fq2IeDuWjcR2tV7qY7TNGX2CNyh9jt0aMyduHeYa0GABr69z8Hm76eKdtaM_1E1ggWj205fSrNcwJsnpSO278*" 
        } 
      ], 
      "name": "Test", 
      "participantSetsInfo": [ 
        { 
          "memberInfos": [ 
            { 
              "email": "signer@email.com" 
            } 
          ], 
          "order": 1, 
          "role": "SIGNER" 
        } 
      ], 
      "signatureType": "ESIGN", 
      "state": "IN_PROCESS" 
    }

     

    You receive a response such as following with agreementId:

    { 
      
      "id": "CBJCHBCAABAAUlen3l_fzlj1Kbn_wGZAhYcIgN0J7Qtq" 
      
    }
  1. Log in to Adobe Sign.

  2. Navigate to  Account>Adobe Sign API>API Information and click REST API Method Documentation.

    Webhook UI

  3. POST /transientDocuments and upload a file and create a transient Document ID.

  4. Copy the transient Document ID and use it in the POST /agreements method. Mention the following JSON request in the box:

    { 
        "documentCreationInfo": { 
            "mergeFieldInfo": null, 
            "recipientSetInfos": [{ 
                    "signingOrder": null, 
                    "recipientSetRole": "SIGNER", 
                    "recipientSetMemberInfos": [{ 
                        "securityOptions": null, 
                        "email": "test1@gmail.com" 
                    }], 
                    "privateMessage": "Hello 1", 
                    "securityOptions": null 
                }, 
                { 
                    "signingOrder": null, 
                    "recipientSetRole": "SIGNER", 
                    "recipientSetMemberInfos": [{ 
                        "securityOptions": null, 
                        "email": "test2@gmail.com" 
                    }], 
                    "privateMessage": "Hello 2", 
                    "securityOptions": null 
                } 
            ], 
            "signatureType": "ESIGN", 
            "callbackInfo": null, 
            "message": "Please review and sign this document.", 
            "locale": "en_US", 
            "vaultingInfo": null, 
            "securityOptions": null, 
            "reminderFrequency": null, 
            "ccs": null, 
            "postSignOptions": null, 
            "signatureFlow": "SENDER_SIGNATURE_NOT_REQUIRED", 
            "daysUntilSigningDeadline": null, 
            "formFieldLayerTemplates": [], 
            "name": "Adobe Sign Agreement", 
            "formFields": null, 
            "fileInfos": [{ 
                "libraryDocumentName": null, 
                "transientDocumentId": "XXXXXXXXXXXX", 
                "documentURL": null, 
                "libraryDocumentId": null 
            }] 
        } 
    }
  5. To execute the JSON Request, click the Try It Out button.

    Webhook UI

    The correct JSON returns the response with the agreement ID.

    Webhook UI

Following are the parameters that you can pass in the code to set open password:

 

{

    "documentCreationInfo":

    [{

        "signatureType": "ESIGN",

               "recipientSetInfos": [{

            "recipientSetMemberInfos": [{                      

                "email": "abc@xyz.com"                  

            }],

                   

            "recipientSetRole": "SIGNER"                         

        }],

               "signatureFlow": "SENDER_SIGNATURE_NOT_REQUIRED",

                   "fileInfos": [           {               

            "libraryDocumentId": "3AAABLblqZhBsm_vH7TVzU3hRdbtWuvzfTKDvBzaKZTiehjO2eGTk5Rlu02K-0BYn8HBJVFTWOmT_BQlrofPBlrCdjiJ_JI-V"        

        }       ],

               "name": "Open password to view document",

               "securityOptions": {        

            "openPassword": "1234",

                     "protectOpen": true   

        }  

    }]

}

 

To create agreement using API with state as "AUTHORING," do the following steps:

Go to Post /agreements and create Access token with the required scopes.

Use the request code as follows:

 

{

  "fileInfos": [

    {

      "transientDocumentId": "*********************"

    }

  ],

  "name": "A1",

  "participantSetsInfo": [

    {

      "memberInfos": [

        {

          "email": "abc@xyz.com"

        }

      ],

      "order": 1,

      "role": "SIGNER"

    }

  ],

  "signatureType": "ESIGN",

  "state": "AUTHORING"

}

 

The v6 has a set of authoring API’s to author an agreement. In v5, the formFields are directly consumed in POST /agreements api. However, in v6 user can create an agreement in AUTHORING state (state = AUTHORING) through v6 POST /agreements and use PUT /agreements/ID/formFields at any later point of time to add form fields to the documents of this agreement.

Following are the steps:

  1. Go to REST API V6 documentation and select POST/agreements method.

  2. Use the following request code:

    { 
      "fileInfos": [ 
        { 
          "transientDocumentId": "***************************" 
        } 
      ], 
      "name": "test", 
      "participantSetsInfo": [ 
        { 
          "memberInfos": [ 
            { 
              "email": "abc@gmail.com" 
            } 
          ], 
          "order": 1, 
          "role": "SIGNER" 
        } 
      ], 
      "signatureType": "ESIGN", 
      "state": "AUTHORING" 
    }
  3. Use the method put /agreements/{agreementId}/formFields with the following request as sample:

    { 
      "fields": [ 
        { 
         "locations": [ 
              { 
                "height": 36, 
                "left": 75, 
                "pageNumber": "1", 
                "top": 200, 
                "width": 150 
              } 
            ], 
            "contentType": "SIGNATURE_BLOCK", 
            "name": "sigBlock1", 
            "inputType": "SIGNATURE", 
            "recipientIndex":1 
           } 
    ]}

     

    It sends the agreement to mentioned recipient once the request is completed.

  1. Log in to Adobe Sign.

  2. Navigate to  Account>Adobe Sign API>API Information and click REST API Method Documentation.

    Webhook UI

  3. POST /transientDocuments and upload a file and create a transient Document ID.

  4. Copy the transient Document ID and use it in the POST /agreements method. Mention the following JSON request in the box:

    { 
        "documentCreationInfo": { 
            "recipientSetInfos": [{ 
                    "recipientSetRole": "SIGNER", 
                    "recipientSetMemberInfos": [{ 
                        "email": "test1@gmail.com" 
                    }], 
                    "privateMessage": "Hello 1" 
                }, 
                { 
                    "recipientSetRole": "SIGNER", 
                    "recipientSetMemberInfos": [{ 
                        "email": "test2@gmail.com" 
                    }], 
                    "privateMessage": "Hello 2" 
                } 
            ], 
            "signatureType": "ESIGN", 
            "message": "Please review and sign this document.", 
            "signatureFlow": "SENDER_SIGNATURE_NOT_REQUIRED", 
            "name": "Demo1", 
            "fileInfos": [{ 
                "transientDocumentId": "XXXXXXXXXX" 
            }], 
            "formFields": [{ 
                    "hidden": "1", 
                    "defaultValue": "test1@gmail.com", 
                    "name": "Signer Email (Applicant-1)", 
                    "inputType": "TEXT_FIELD", 
                    "readOnly": true, 
                    "locations": { 
                        "pageNumber": 1, 
                        "top": 100, 
                        "left": 100, 
                        "width": 100, 
                        "height": 30 
                    }, 
      
                    "contentType": "SIGNER_EMAIL" 
                }, 
                { 
                    "name": "Signature (Applicant-2)", 
                    "inputType": "SIGNATURE", 
                    "locations": { 
                        "pageNumber": 1, 
                        "top": 520, 
                        "left": 162, 
                        "width": 280, 
                        "height": 30 
                    }, 
                    "contentType": "SIGNATURE", 
                    "required": 1, 
                    "recipientIndex": 1 
                }, 
                { 
                    "name": "Signature (Applicant-3)", 
                    "inputType": "SIGNATURE", 
                    "locations": { 
                        "pageNumber": 2, 
                        "top": 312, 
                        "left": 154, 
                        "width": 280, 
                        "height": 30 
                    }, 
                    "contentType": "SIGNATURE", 
                    "required": 1, 
                    "recipientIndex": 1 
                }, 
                { 
                    "defaultValue": "017/09/2018", 
                    "displayFormatType": "DATE", 
                    "name": "Signature Date (Applicant-4)", 
                    "format": "DATE_DD_MM_YYYY", 
                    "inputType": "TEXT_FIELD", 
                    "readOnly": true, 
                    "locations": { 
                        "pageNumber": 2, 
                        "top": 260, 
                        "left": 90, 
                        "width": 80, 
                        "height": 30 
                    }, 
                    "contentType": "DATA", 
                    "required": 1, 
                    "recipientIndex": 1 
                }, 
                { 
                    "name": "Signature (Applicant-5)", 
                    "inputType": "SIGNATURE", 
                    "locations": { 
                        "pageNumber": 3, 
                        "top": 199, 
                        "left": 179, 
                        "width": 276, 
                        "height": 30 
                    }, 
                    "contentType ": "SIGNATURE", 
                    "required": 1, 
                    "recipientIndex": 1 
                }, 
                { 
                    "contentType": "SIGNATURE_DATE", 
                    "defaultValue": "06/07/2018", 
                    "displayFormatType": "DATE", 
                    "name": "Signature Date (Applicant-6)", 
                    "format": "DATE_DD_MM_YYYY", 
                    "inputType": "TEXT_FIELD", 
                    "readOnly": true, 
                    "locations": { 
                        "pageNumber": 3, 
                        "top": 188, 
                        "left": 488, 
                        "width": 76, 
                        "height": 25 
                    }, 
                    "required": 1, 
                    "recipientIndex": 1 
                }, 
                { 
                    "name": "Signature (Applicant-7)", 
                    "inputType": "SIGNATURE", 
                    "locations": { 
                        "pageNumber": 3, 
                        "top": 370, 
                        "left": 37, 
                        "width": 210, 
                        "height": 26 
                    }, 
                    "contentType ": "SIGNATURE", 
                    "required": 1, 
                    "recipientIndex": 2 
                }, 
                { 
                    "contentType ": "SIGNATURE_DATE", 
                    "defaultValue": "01/02/2018", 
                    "name": "Signature Date (Applicant-8)", 
                    "locations": { 
                        "pageNumber": 3, 
                        "top": 370, 
                        "left": 300, 
                        "width": 76, 
                        "height": 26 
                    }, 
                    "required": 1, 
                    "recipientIndex": 2 
      
                } 
            ] 
        } 
    }
  5. To execute the JSON Request, click the Try It Out button.

    Webhook UI

    The correct JSON returns the response with the agreement ID.

    Webhook UI

  1. Log in to Adobe Sign.

  2. Navigate to  Account>Adobe Sign API>API Information and click REST API Method Documentation.

    Fnord.

  3. POST /transientDocuments and upload a file and create a transient Document ID.

  4. Copy the transient Document ID and use it in the POST /agreements method. Mention the following JSON request in the box:

    { 
        "options": { 
            "noChrome": true, 
            "authoringRequested": true 
        }, 
        "documentCreationInfo": { 
            "recipientSetInfos": [{ 
                    "recipientSetRole": "SIGNER", 
                    "recipientSetMemberInfos": [{ 
                        "email": "test1@gmail.com" 
                    }], 
                    "privateMessage": "Hello 1" 
                }, 
                { 
                    "recipientSetRole": "SIGNER", 
                    "recipientSetMemberInfos": [{ 
                        "email": "test2@gmail.com" 
                    }], 
                    "privateMessage": "Hello 44" 
                } 
            ], 
            "signatureType": "ESIGN", 
            "message": "Please review and sign this document.", 
            "locale": "en_US", 
            "signatureFlow": "SENDER_SIGNATURE_NOT_REQUIRED", 
            "formFieldLayerTemplates": [], 
            "name": "Adobe Sign Agreement", 
            "formFields": null, 
            "fileInfos": [{ 
                "libraryDocumentName": null, 
                "transientDocumentId": "XXXXXXXXXXXX" 
            }] 
        } 
    }
  5. To execute the JSON Request, click the Try It Out button.

    Fnord.

    The correct JSON returns the response with the agreement ID.

    Fnord.

  6. To open the agreement in Authoring Mode, copy the URL and paste it into a browser's address bar.

  7. Drag-and-drop the form-fields  at the required location.

  8. To send out the agreement for signature, click Send. 

Use POST /agreements to create an agreement. Sends it out for signatures, and returns the agreementID in the response to the client. Below is the JSON format to send agreement using Phone authentication method.

 

{

"documentCreationInfo": {

"mergeFieldInfo": null,

"recipientSetInfos": [{

"signingOrder": null,

"recipientSetRole": "SIGNER",

"recipientSetMemberInfos": [{

"securityOptions": null,

"email": "Signer@email.com"

}],

 

"privateMessage": null,

"securityOptions": [{

"authenticationMethod": "PHONE",

"phoneInfos": [{

"phone": "1111111111",

"countryCode": "+1"

}]

}]

}],

 

"signatureType": "ESIGN",

"callbackInfo": null,

"message": "Please review and sign this document.",

"locale": "en_US",

"vaultingInfo": null,

"securityOptions": null,

"reminderFrequency": null,

"ccs": null,

"postSignOptions": null,

"signatureFlow": "SENDER_SIGNATURE_NOT_REQUIRED",

"daysUntilSigningDeadline": null,

"formFieldLayerTemplates": [],

"name": "Adobe Sign Agreement-Phone authentication testing",

"formFields": null,

"fileInfos": [{

"libraryDocumentName": null,

"transientDocumentId": "3AAABLYourTransactionID",

"documentURL": null,

"libraryDocumentId": null

}]

},

 

"options": {

"autoLoginUser": true,

"authoringRequested": false,

"noChrome": true,

"sendThroughWeb": null,

"sendThroughWebOptions": null,

"locale": "en_US"

}

}

 

You can merge the data directly into the form fields by using the following methods:

  • Using a Library template:

    If you are using a library template ID under FileInfo parameter, make sure to provide exact field name and its associated data under the below section:

 

"mergeFieldInfo": [

     {

       "defaultValue": "",

       "fieldName": ""

     }

   ],

 

  • Using text tags in a document uploaded as a Transient document:

    If you upload a document that has text tags added to it as a transient document, make sure to provide the exact field name and its associated data under the below section: 

 

"mergeFieldInfo": [

     {

       "defaultValue": "",

       "fieldName": ""

     }

   ],

 

How to send an agreement using API that has prefilled values for the specific form fields (mergefield)?

Prerequisite of this call is to first complete the "Transient Upload” step and obtain a "transientDocumentId" (using: secure.na1.echosign.com/public/docs/restapi/v5#!/transientDocuments/createTransientDocument) to use here.

  • This call includes the “mergeFieldInfo” section where default values for specific form fields are given.
  • This pre-fills the data from another system in the API call.
  • These fields in the agreement are either editable or read-only.

 

Pre-requisites:

  1. Transient Document id
  2. Field names and their values

 

Sample request call:

 

Request:

POST /api/rest/v5/agreements HTTP/1.1

Host: api.na1.echosign.com (or you can specify your shard name, which you can find using the getbaseURis call: https://secure.na1.echosign.com/public/docs/restapi/v5#!/base_uris/getBaseUris

Access-Token: 2AAABLblqZhA_D1mluNKQP7py5vXtt-1UHl9NR25e_C3LnKTUH14IblbrXODbXGRozyr7ChBkJNM*

x-user-email: sender@yourdomain.com

Content-Type: application/json

Cache-Control: no-cache

 

{

   "documentCreationInfo": {

       "signatureType": "ESIGN",

       "recipientSetInfos": [

           {

               "recipientSetMemberInfos": [

                   {

                       "email": “signerEmail@domain.com"

                   }

               ],

               "recipientSetRole": "SIGNER"

           }

        ],

      

       "signatureFlow": "SENDER_SIGNATURE_NOT_REQUIRED",

       "message": "Please Sign this from us!",

       "fileInfos": [

           {

               "transientDocumentId": "3AAABLblqZhD1uP3ZnkJximC0JV1S677PR5xmybSJ-SJn6OtEy2tVqFyMN4xUAbhKTSkLw2Zb6HEF4zAGsrUd2ycoB8fFHQJhrci0O6267VztmIL4nCicSqvAjO7HckATHAsovVmuYwI9_FDDgHg0ogyti62L13HQFZIQRe9iyQMvvzbmksM7ODNK_HEepEKRCeJTtis9FOlz6uRCcIMNlbX_2GU8utWT"

           }

       ],

       "name": "MSA Edited”,

        "mergeFieldInfo": [

            {

                "fieldName": "AccountName",

                "defaultValue": "Sam's Garage"

            },

            {

                "fieldName": "AccountNumber",

                "defaultValue": "8756999"

            },

            {

                "fieldName": "Zip",

                "defaultValue": "94501"

            },

            {

                "fieldName": "City",

                "defaultValue": "CityVille"

            },

            {

                "fieldName": "State",

                "defaultValue": "CA"

            },

            {

                "fieldName": "Street",

                "defaultValue": "123 Some Road"

            },

            {

                "fieldName": "Title1",

                "defaultValue": "COO"

            },

            {

                "fieldName": "Description",

                "defaultValue": "Some new description here"

            }

        ]

   }

 

}

 

The response to this call is the “agreementId” which you need to store in your system for subsequent calls(signingUrl, status, formData etc.)

 

Response:

{

  "agreementId": "3AAABLblqZhCf_7xDcrOgKFwAabp1S-OFfvUdHf2wJsSMwlB95_x_WdUeab67jOkJi1IJzWuSJ0zdNNKugS1blZB4LT5vNVyJ"

}

 

While running the method "post /megaSigns/{megaSignId}/views", an error is shown as "Requested view is not available for the resource in the current state."

The error is shown if the name parameter value provided is invalid in the below request code:

{
  "name": " "
}

For example, if the MegaSign agreement is already "IN_PROCESS", then providing value as "AUTHORING" throws the mentioned error. Make sure the value provided is in accordance with the current state of agreement.

While running the method "put /megaSigns/{megaSignId}/state", an error is shown as "No value provided for MegaSign cancellation info."

The error is caused when the request code is missing the parameter: 

 "megaSignCancellationInfo": {
    "comment": "",
    "notifyOthers": false
  }

Instead of using the "Minimal Schema" , click "Complete Model Schema" and provide the complete request code to run the API call. 

To change the state of MegaSign agreement, use put /megaSigns/{megaSignId}/state and do the following steps:

  1. Go to REST API Documentation for V6 and select method  
    put /megaSigns/{megaSignId}/state.
  2. Provide the Authorization value and also the If-Match and megasignID.
    • To retrieve megasignID, use get /megaSigns
    • To retrieve If-Match, use get /megaSigns/{megaSignId} and under header, locate "Etag"
  3. {
      "state": "CANCELED",
      "megaSignCancellationInfo": {
       "comment": "cancel",
       "notifyOthers": false
      }

To successfully register a webhook, the webhook URL responds to this verification request with a 2XX response code and moreover, it can send back the same client id value in one of the following two ways:

  1. In a response header X-AdobeSign-ClientId. It is the same header, which is passed in the request, and be echoed back in the response.
  2. In the JSON response body with the key of X-AdobeSign-ClientId and its value being the same client ID that is sent in the request.

Adobe Sign receives the 2xx response with X-AdobeSign-ClientId. User can check whether it is configured properly in webhook or not.

The Webhook Url is not responding as per the expected behavior. For every Post notification that Adobe Sign sent, URL responds with 2XX status code and reciprocate the client ID sent in request headers(X-AdobeSign-ClientId) back in the response headers. 

For complete information, see the following link:
https://www.adobe.io/apis/documentcloud/sign/docs.html#!adobedocs/adobe-sign/master/webhooks/webhook_events.md

When the URL fails to abide by this protocol, Adobe Sign considers that it did not acknowledge the request and attempt to reschedule as per the reliable policy.

If the webhook fails to respond and either the maximum retry time or the maximum retry interval is exceeded, the webhook is disabled.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Co


Manage/Get Information about Agreements

To change the document already sent out for signature, use the method as PUT /agreements/{agreementId} with which you can update an existing agreement. Provide the transient ID along with the agreement ID in the following request code:

 

{

  "documentUpdateInfo": {

    "fileInfos": [

      {

        "agreementDocumentId": "",

        "transientDocumentId": ""

      }

    ]

  }

}

 

Following are the instructions to update state from "AUTHORING" to "IN_PROCESS" using Put /agreements/{agreementId}/state:

  1. Get the agreement ID retrieved using POST/Agreement method.

  2. Use Get /agreements/{agreementId} to retrieve latest ETag.

  3. Go to Put /agreements/{agreementId}/state and provide the following information: "state": "IN_PROCESS"

No.

There is no method in the current REST API to upload a signed copy.

The sender must upload the signed copy from the Manage page.

DELETE /agreements/ID used to allow to hide an agreement from the manage page.

Adobe has a new API PUT /agreements/ID/me/visibility to control the visibility of an agreement(in GET /agreements). In addition to the functionality provided by the DELETE /agreements/ID, the new visibility endpoint also allows a user to revert the ‘hide’ operation, that is, make the agreement visible again. 

You can also follow the detailed steps as below:

  1. Go to method get /agreements and retrieve the agreement ID.
  2. Click put /agreements/{agreementId}/me/visibility and provide the below request as sample:
    {
      "visibility": "HIDE"
    }
    The agreement ID is hidden only from get /libraryDocuments, however, it is still visible under the Manage tab UI.
Megjegyzés:

The API Retention feature is not enabled by default.

To enable the DELETE/agreements operation, contact your success manager and request that API Retention be turned on for the account.

For more information on how to enable the Retention features for your account, refer to Adobe Sign - Document Retention.

  1. Log in as an Adobe Sign admin and navigate to:  https://secure.adobesign.com/public/docs/restapi/v6

    • Click on agreeements and expand the GET /agreements method
    • Click the  OAUTH ACCESS-TOKEN button 
    • Enable the agreement_read:self scope
    • Click the Authorize button
      • If challenged, click Allow Access
    • Click the Try it out! button
    Get Agreement method

  2. The response is generated.

    The agreementId can be found in the Response Body:

    Get Agreement response

  3. DELETE /agreements/{agreementId}/documents: Deletes all the documents related to an agreement. The Agreement itself remains visible on the Manage page.

    • Select the DELETE/agreements operation that is to run.
    • Click the OAUTH ACCESS-TOKEN button and create access token with areement_retention scope.
    • Provide agreementId of agreement you want to delete.
    • Once the agreement is deleted, Response Body has 'no content'.

You get following response if the DELETE/agreements operation is not enabled:

 "code": "DYNAMIC_DOCUMENT_EXPIRATION_NOT_ENABLED",

  "message": "The operation requires some account settings to be enabled. Please contact the Adobe Sign team to enable the settings."

How to download Signed document along with Audit report and supporting document through Adobe Sign REST API rather making a separate call to download Audit report using the following method.

GET /agreements/{agreementId}/auditTrail

  1. Click GET /agreements/{agreementId}/combinedDocument.

  2. Click the oAuth Access-token button.

  3. Access token is generated automatically once its authorization is accepted.

  4. Provide the agreementId.

  5. Under attachSupportingDocuments, select true from the drop-down.

  6. Under attachAuditReport, select true from the drop-down.

  7. Click the Try it out! button.

    Get combined documents

    It downloads the combined PDF of Signed, supporting document and Audit report.

To download bulk documents, only document export tool is available and with API you can only download documents one by one. Following is the API method for same:

https://secure.na1.adobesign.com/public/docs/restapi/v5#!/agreements/getCombinedDocument


Library Templates and Web Forms

  1. Log in to Adobe Sign as an admin and navigate to: https://secure.na1.adobesign.com/public/docs/restapi/v6

    • Click on libraryDocuments and expand the GET /libraryDocuments method
    • Click the  OAUTH ACCESS-TOKEN button 
    • Enable the library_read:self scope
    • Click the Authorize button
      • If challenged, click Allow Access
    • Click the Try it out! button
    Get LibraryDocument Method

  2. The response is generated.

    The libraryDocumentId can be found in the Response Body:

    Get LibraryDocument Response

Adobe has a new API PUT/libraryDocuments/ID/me/visibility to control the visibility of an agreement(in GET /agreements). In addition to the functionality provided by the DELETE /agreements/ID, the new visibility endpoint also allows a user to revert the ‘hide’ operation, that is, make the agreement visible again.

You can follow the detailed steps as below:

  1. Go to method get /libraryDocuments and retrieve the agreement ID.
  2. Click put /libraryDocuments/{libraryDocumentId}/me/visibility and provide the below request as sample:
    {
      "visibility": "HIDE"
    }
    The library ID is hidden only from get /libraryDocuments, however, it is still visible under the Manage tab UI.
Megjegyzés:
  • Submit a request with the Support team, to get the scope enabled for Library deletion.
  • API deletes the library document. However, the agreements created using this library document are not impacted.


Generating a libraryDocumentID

  1. Go to https://secure.echosign.com/public/docs/restapi/v5.

  2. Click libraryDocuments.

  3. Click the oAuth Access-token button. 

    Authorize Access - Token for Self, Group Or Account.

  4. Select libraryTemplateType - Document Or Form_field_layer.

  5. Click Try It Out.

    You can receive a response as the following for all your templates. (Copy libraryDocumentId for the Library Template you want to delete).

    { 
      "libraryDocumentList": [ 
        { 
          "name": "testing fields", 
          "modifiedDate": "2017-08-04T01:06:05-07:00", 
          "scope": "PERSONAL", 
          "libraryDocumentId": "3AAABLblqZhAK53Dvzq88Q1Ov0TEvMAySDPpIVjF1PWgUpy0H1uYggt4iwGiRSZYlWfl9ms_AcmgZ_uZMPPN2hNT9izwaspHc", 
          "libraryTemplateTypes": [ 
            "DOCUMENT" 
          ] 
        },


Deleting Library Templates

  1. Copy libraryDocumentID from the Response Body.

  2. Go to Delete libraryDocuments.

  3. Click the oAuth Access-token button. Authorize Access - Token for Self, Group Or Account.

  4. Paste the libraryDocumentId in the Value field.

  5. Click Try it Out. 
    The template is deleted.

    You get the following Response Code: 204

Megjegyzés:

Only web forms in a Draft state can be updated.

  1. Create the widget using the post /widgets.

  2. Get the widget Id from get/widgets.

  3. Once created using the GET /widgets/{widgetId} method, fetch the Etag from the Response header.

    Foo

  4. Under put  /widgets/{widgetId}, use the Etag from GET /widgets/{widgetId}. Under the If-Match parameter, enter widgetId and widgetInfo.

    Foo

    { 
      "fileInfos": [ 
        { 
          "transientDocumentId": "******" 
        } 
      ], 
      "name": "Widht_Name", 
      "status": "DRAFT", 
      "widgetParticipantSetInfo": { 
        "memberInfos": [ 
          { 
            "email": "" 
          } 
        ], 
        "role": "SIGNER" 
      } 
    }


Use Case Examples

  1. Make a get/agreements call with the correct x-api-user.

  2. In the Response Body, locate the out for signature agreement you want to find the signing url for and note the agreement ID

  3. Make a get/agreements/{agreementId}/signingUrls call, using the agreement ID you received from the get/agreements call.

     

    Result

    The output returns the email address of the signer/s and the e-sign URL.

    Get Agreement Method

Adobe logó

Bejelentkezés a fiókba