Users: delete

Closes one or more user records in the account. Users are never deleted from an account, but closing a user prevents them from using account functions.

The response whether whether the API execution succeeded (200 - OK) or failed (400 - Error). The response contains a user structure similar to the request and includes the user changes. If an error occurred during the DELETE operation for any of the users, the response for that user contains an errorDetails node with errorCode and message properties.

Request

HTTP request

DELETE /v2.1/accounts/{accountId}/users

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

The external account number (int) or account ID GUID.

Optional Query Parameters
deletestring

ID of the user to delete.

Request Body

userInfoList

Responses

CodeDescriptionReference
200

Successful response.

GroupUsers
400

Error encountered.

errorDetails

SDK Method

Users::delete

Definitions

errorDetails

This object describes errors that occur. It is only valid for responses, and ignored in requests.

errorCodestring

A code associated with the error condition.

messagestring

A brief message describing the error condition.

userInfo

accountIdstring

The external account number (int) or account ID GUID.

accountNamestring

The name of the account associated with the current workspace user.

activationAccessCodestring

Access code provided to the user to activate the account.

emailstring

Filters returned user records by the specified email address.

errorDetailserrorDetails

Object that describes errors that occur. Only valid for responses; ignored in requests.

loginStatusstring

Boolean value that indicates whether the user is currently logged in or not.

membershipIdstring

The user's membership ID.

sendActivationEmailstring

When set to true, specifies that an activation email be sent to the user.

uristring

URI containing the user ID.

userIdstring

The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Administrator on the account, this can be another user the Admin user is accessing. Note: For Envelopes:listStatusChanges (GET /v2.1/accounts/{accountId}/envelopes), the user_id query parameter is not implemented and should not be used.

userNamestring

The name of the user.

userStatusstring

Status of the user's account. One of:

  • ActivationRequired
  • ActivationSent
  • Active
  • Closed
  • Disabled

userTypestring

The type of user, for example CompanyUser.

userInfoList

users[userInfo]

An array of userInfo objects containing information about the users in the group.

GroupUsers

Groups' users

endPositionstring

The last position in the result set.

nextUristring

The URI for the next chunk of records based on the search request. It is null if this is the last set of results for the search.

previousUristring

The URI for the prior chunk of records based on the search request. It is null if this is the first set of results for the search.

resultSetSizestring

The number of results returned in this response.

startPositionstring

Starting position of the current result set.

totalSetSizestring

The total number of items in the search's result set. It will always be greater than or equal to the value of the resultSetSize field.

users[userInfo]

An array of userInfo objects containing information about the users in the group.

Examples

Generic JSON Request/Response

Request
{
  "users": [
    {
      "userName": "sample string 1",
      "userId": "sample string 2",
      "email": "sample string 3",
      "userType": "sample string 4",
      "userStatus": "sample string 5",
      "uri": "sample string 6",
      "loginStatus": "sample string 7",
      "sendActivationEmail": "sample string 8",
      "activationAccessCode": "sample string 9"
    }
  ]
}
Response
{
  "users": [
    {
      "userName": "sample string 1",
      "userId": "sample string 2",
      "email": "sample string 3",
      "userType": "sample string 4",
      "userStatus": "sample string 5",
      "uri": "sample string 6",
      "loginStatus": "sample string 7",
      "sendActivationEmail": "sample string 8",
      "activationAccessCode": "sample string 9",
      "errorDetails": {
        "errorCode": "sample string 1",
        "message": "sample string 2"
      }
    }
  ],
  "resultSetSize": "sample string 1",
  "totalSetSize": "sample string 2",
  "startPosition": "sample string 3",
  "endPosition": "sample string 4",
  "nextUri": "sample string 5",
  "previousUri": "sample string 6"
}
Generic XML Request/Response

Request
<userInfoList xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <users>
    <userInfo>
      <activationAccessCode>sample string 9</activationAccessCode>
      <email>sample string 3</email>
      <loginStatus>sample string 7</loginStatus>
      <sendActivationEmail>sample string 8</sendActivationEmail>
      <uri>sample string 6</uri>
      <userId>sample string 2</userId>
      <userName>sample string 1</userName>
      <userStatus>sample string 5</userStatus>
      <userType>sample string 4</userType>
    </userInfo>
  </users>
</userInfoList> 
Response
<usersResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <endPosition>sample string 4</endPosition>
  <nextUri>sample string 5</nextUri>
  <previousUri>sample string 6</previousUri>
  <resultSetSize>sample string 1</resultSetSize>
  <startPosition>sample string 3</startPosition>
  <totalSetSize>sample string 2</totalSetSize>
  <users>
    <userInfo>
      <activationAccessCode>sample string 9</activationAccessCode>
      <email>sample string 3</email>
      <errorDetails>
        <errorCode>sample string 1</errorCode>
        <message>sample string 2</message>
      </errorDetails>
      <loginStatus>sample string 7</loginStatus>
      <sendActivationEmail>sample string 8</sendActivationEmail>
      <uri>sample string 6</uri>
      <userId>sample string 2</userId>
      <userName>sample string 1</userName>
      <userStatus>sample string 5</userStatus>
      <userType>sample string 4</userType>
    </userInfo>
  </users>
</usersResponse> 
}} />