How to bulk upload agreements
This topic demonstrates how to bulk upload agreements using Agreement Manager API.
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. Create bulk upload job and extract upload URLs
After you have a valid OAuth access token, you are ready to create a new bulk upload job. Make sure to substitute your valid OAuth access token for {ACCESS_TOKEN}, and to provide your base path and account ID for {base_path} and {account_id}. This example uses 5 included documents; after the bulk upload job is created, one upload URL will be returned for each. Record these upload URLs and the bulk upload job ID, which will be needed for the next step.
Step 3. Upload documents
Once the bulk upload job is created, you can begin adding documents by making PUT requests with the file binaries to the upload URLs returned in the previous step’s response.
Step 4. Mark the bulk upload job complete
After uploading each document to the bulk upload job, call the POST BulkJob: uploadCompleteBulkJob endpoint to trigger ingestion of the documents and AI extraction.
View the source code for this how-to on GitHub: Bash, C#, Java, 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
- Learn how to Unlock Your Historical Agreements: Agreement Manager API Bulk Ingestion Made Simple.
- See the Agreement Manager Bulk Jobs API reference.
- Learn about concepts of bulk upload in Agreement Manager API.