How to get a list of agreements
This topic demonstrates how to get a list of agreements with the Agreement Manager API.
Run this code example from our Quickstart or launcher projects: Bash, C#, Java, Node.js, PowerShell.
Required data
Running the code in this how-to requires this data:
Step 1. Obtain your OAuth token
To make the API call shown in this how-to, you need a valid OAuth access token. Docusign supports access tokens for three different OAuth grant types: Authorization Code Grant, Implicit Grant, and JSON Web Token (JWT) Grant. Choose the OAuth grant type appropriate for your scenario.
Agreement Manager OAuth access tokens are the same ones used for our eSignature REST API, although you must request one or more Agreement Manager scopes to call the Agreement Manager API. The endpoint calls made in this how-to require that you request the Agreement Manager-specific adm_store_unified_repo_read scope when obtaining your access token.
See Agreement Manager Authentication for details and the full list of Agreement Manager scopes.
Step 2. Construct your API headers
After you have a valid OAuth access token, you are ready to construct the API headers that you will pass to the API call. Construct your headers like this, but make sure to substitute your valid OAuth access token for {ACCESS_TOKEN}.
Step 3. Call the Agreement Manager API
Now that you have constructed your API headers, make a GET request to the Agreements:getAgreementsList endpoint to get a list of all agreements associated with your user. Here’s how you make the call, but make sure to substitute your API account ID for {ACCOUNT_ID}. The calling user is identified by the access token used to make the API call.
View the source code for this how-to on GitHub: Bash, C#, Java, Node.js, PowerShell.
Expected response
If you run this code example from our Quickstart or launcher projects, you should see a JSON response similar to the code shown.
Next steps
- Run this code example from our Quickstart or launcher projects: Bash, C#, Java, Node.js, PowerShell.
- Learn more about Agreement Manager API use cases.
- See How to get a specific agreement.