DocuSign Services REST API
Basics
The DocuSign Services API follows a microservice architecture that enables DocuSign into any part of an application and is built on the JSON API specification, follows predictable REST URLs, and supports cross-origin resource sharing.
Endpoint
The DocuSign Services API is installed with the DocuSign managed package and can be exposed to external applications via a Salesforce site or community.
|
You must replace this path {testmanaged–clmauto3.my.salesforce.com} with your Salesforce org path.
Versions
The DocuSign Services API ensures backward compatibility by properly versioning any changes to the APIs. Should changes to the API structure need to be made, it will occur within a new version and older functionality will be preserved.
Content Type
Requests made to the API must be encoded as JSON and contain the header
|
Includes
You can easily include resource relationships on most top-level resources. Multiple includes are defined using comma-delimited values.
Caching
Server side caching is used and can be configured per request using the cacheStrategy query parameter.
Errors
Any request that returns an error follows a standard format. The DocuSign Services API will return an array of errors that contains objects containing the status, title, and data with the error details.
Code |
Response |
---|---|
200 |
Success |
400 |
Invalid JSON |
500 |
Something went wrong on our end |
{ "openapi": "3.0.0", "info": { "title": " ", "contact": {}, "version": "1.0" }, "paths": { "/envelopes/:agreementId/sendForESignature": { "post": { "tags": [ "DocuSign Rest API" ], "summary": "sendForEsignature", "description": "Sends a document out for eSignature", "operationId": "sendForEsignature", "parameters": [], "requestBody": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Request" }, "example": { "Recipients": [ { "Name": "Bob", "Email": "Bob@email.com", "SignerType": "Signers", "SignerRole": "Signer 1", "OrderNumber": "1", "ObjectType": "User" } ], "FileIds": [ "0692f000001HVlGAAW" ], "ReminderDelay": 2, "ReminderFrequency": 3, "ExpireAfter": 1, "ExpireWarn": 8 } } }, "required": true }, "responses": { "200": { "description": "OK", "headers": {}, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" }, "example": { "title": "success", "status": 200, "data": true } } } } }, "deprecated": false } } }, "components": { "schemas": { "Request": { "title": "Request", "required": [ "Recipients", "FileIds" ], "type": "object", "properties": { "Recipients": { "type": "array", "items": { "$ref": "#/components/schemas/Recipient" }, "description": "" }, "FileIds": { "type": "array", "items": { "type": "string" }, "description": "" }, "ReminderDelay": { "type": "integer", "format": "int32" }, "ReminderFrequency": { "type": "integer", "format": "int32" }, "ExpireAfter": { "type": "integer", "format": "int32" }, "ExpireWarn": { "type": "integer", "format": "int32" } }, }, "Recipient": { "title": "Recipient", "required": [ "Name", "Email", "SignerType", "SignerRole", "OrderNumber", "ObjectType" ], "type": "object", "properties": { "Name": { "type": "string" }, "Email": { "type": "string" }, "SignerType": { "type": "string" }, "SignerRole": { "type": "string" }, "OrderNumber": { "type": "integer", "format": "int32" }, "ObjectType": { "type": "string" } }, }, "Response": { "title": "Response", "required": [ "title", "status", "data" ], "type": "object", "properties": { "title": { "type": "string" }, "status": { "type": "integer", "format": "int32" }, "data": { "type": "boolean" } }, } }, "securitySchemes": { "oauth2": { "type": "oauth2", "flows": { "implicit": { "authorizationUrl": "https://test.salesforce.com/services/oauth2/authorize", "scopes": {} } } } } }, "security": [ { "oauth2": [] } ], }