Rav
Rav

Reputation: 123

Docusign REST API , USER delete

I wanted to delete a user from docuSign, I have tried few steps below,

This returns all the users info from Docusign : 1.GET https://{{hostenv}}/restapi/{{apiVersion}}/accounts/1119416/users?additional_info=true

This returns single user info :

2.GET https://{{hostenv}}/restapi/{{apiVersion}}/accounts/1119416/[email protected]

Response :

{
"users": [
    {
        "userName": "Ravi -DocuSign API test",
        "userId": "2a441d45-ffc6-4f66-9383-816d0c11fda6",
        "userType": "CompanyUser",
        "isAdmin": "False",
        "userStatus": "Active",
        "uri": "/users/2a441d45-ffc6-4f66-9383-816d0c11fda6",
        "email": "[email protected]",
        "createdDateTime": "2017-09-22T17:16:54.0670000Z",
        "permissionProfileId": "869172",
        "permissionProfileName": "DocuSign Sender"
    }
],
"resultSetSize": "1",
"totalSetSize": "1",
"startPosition": "0",
"endPosition": "0"

}

My challenge here is to DELETE this user with REST API CALL?

I am trying to use :

DELETE https://{{hostenv}}/restapi/{{apiVersion}}/accounts/1119416/users/2a441d45-ffc6-4f66-9383-816d0c11fda6

But i am getting response as :

404 The URL provided does not resolve to a resource.

Please help me to resolve this problem.

Upvotes: 1

Views: 408

Answers (1)

Drew
Drew

Reputation: 5029

As per the API documentation: https://docs.docusign.com/esign/restapi/Users/Users/delete/

You'll need to format your call differently. Instead of targeting the user directly through the URL, you need to target DELETE https://{{hostenv}}/restapi/{{apiVersion}}/accounts/{{account}}/users and include the user ID in the call body.

I was able to close a user with this call: DELETE {{vx}}/accounts/{{accountid}}/users

{
"users":[
    {
        "userId": "25bc029d-xxxx-xxxx-xxxx-407676d57bfb"
    }
    ]
}

Upvotes: 2

Related Questions