ixsl
ixsl

Reputation: 39

From DocuSign REST API, how can I remove/delete a template completely

I'm having a look at the DocuSign eSignature REST API and in the Templates category it clearly states that

"You can: Create, list, get, update, and delete templates"

but when I had a look at the list of available methods deleting a template wasn't there.

I have tried sending a DELETE request to /v2/accounts/{accountId}/templates/{templateId} but no luck.

Can anyone confirm if this is even possible? Thanks

Upvotes: 0

Views: 884

Answers (1)

Amit K Bist
Amit K Bist

Reputation: 6818

You cannot delete directly, instead you will move the template to Deleted/Recyclebin Folder and DocuSign will delete it permanently after sometime from the Deleted folder. To move the template to Deleted folder, you need to make below call:

URI:

PUT /restapi/v2/accounts/{accountId}/folders/recyclebin

Body:

{"envelopeIds":["templateId"]}

Body is having envelopeIds, but value of this will be your array of templateIds which you need to move to Deleted folder.

Upvotes: 2

Related Questions