Folders: moveEnvelopes

Moves an envelope from its current folder to the specified folder.

Note: You can use this endpoint to delete envelopes by specifying recyclebin in the folderId parameter of the endpoint. Placing an in process envelope (envelope status of sent or delivered) in the recycle bin voids the envelope. You can also use this endpoint to delete templates by specifying a template ID instead of an envelope ID in the 'envelopeIds' property and specifying recyclebin in the folderId parameter.

Request

HTTP request

PUT /v2/accounts/{accountId}/folders/{folderId}

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

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

folderIdstring

The ID of the folder being accessed.

Request Body

foldersRequest

Responses

CodeDescriptionReference
200

Successful response.

Folders
400

Error encountered.

errorDetails

SDK Method

Folders::moveEnvelopes

Definitions

errorDetails

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

errorCodestring

An error code associated with the error.

messagestring

A short error message.

filter

actionRequiredstring

Action required.

expiresstring

folderIdsstring

fromDateTimestring

isTemplatestring

orderstring

An optional value that sets the direction order used to sort the item list.

Valid values are:

  • asc = ascending sort order
  • desc = descending sort order

orderBystring

searchTargetstring

searchTextstring

statusstring

Filter status.

toDateTimestring

Latest date to filter.

folder

errorDetailserrorDetails

filterfilter

folderIdstring

The ID of the folder being accessed.

folders[folder]

A collection of folder objects returned in a response.

namestring

ownerEmailstring

ownerUserIdstring

ownerUserNamestring

parentFolderIdstring

parentFolderUristring

typestring

Type of the user. Valid values: type_owner, type_participant.

uristring

foldersRequest

envelopeIds[array]

fromFolderIdstring

The folder ID the envelope is being moved from.

Folders

Folder management

folders[folder]

A collection of folder objects returned in a response.

Examples

Generic JSON Request/Response

Request
{
  "envelopeIds": [
    "sample string 1"
  ],
  "fromFolderId": "sample string 1"
}
Response
{
  "folders": [
    {
      "ownerUserName": "sample string 1",
      "ownerEmail": "sample string 2",
      "ownerUserId": "sample string 3",
      "type": "sample string 4",
      "name": "sample string 5",
      "uri": "sample string 6",
      "parentFolderId": "sample string 7",
      "parentFolderUri": "sample string 8",
      "folderId": "sample string 9",
      "errorDetails": {
        "errorCode": "sample string 1",
        "message": "sample string 2"
      },
      "folders": [
        {}
      ],
      "filter": {
        "actionRequired": "sample string 1",
        "expires": "sample string 2",
        "isTemplate": "sample string 3",
        "status": "sample string 4",
        "fromDateTime": "sample string 5",
        "toDateTime": "sample string 6",
        "searchTarget": "sample string 7",
        "searchText": "sample string 8",
        "folderIds": "sample string 9",
        "orderBy": "sample string 10",
        "order": "sample string 11"
      }
    }
  ]
}
Generic XML Request/Response

Request
<envelopeMoveRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <envelopeIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
  </envelopeIds>
  <fromFolderId>sample string 1</fromFolderId>
</envelopeMoveRequest> 
Response
<foldersResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <folders>
    <folder>
      <errorDetails>
        <errorCode>sample string 1</errorCode>
        <message>sample string 2</message>
      </errorDetails>
      <filter>
        <actionRequired>sample string 1</actionRequired>
        <expires>sample string 2</expires>
        <folderIds>sample string 9</folderIds>
        <fromDateTime>sample string 5</fromDateTime>
        <isTemplate>sample string 3</isTemplate>
        <order>sample string 11</order>
        <orderBy>sample string 10</orderBy>
        <searchTarget>sample string 7</searchTarget>
        <searchText>sample string 8</searchText>
        <status>sample string 4</status>
        <toDateTime>sample string 6</toDateTime>
      </filter>
      <folderId>sample string 9</folderId>
      <folders>
        <folder />
      </folders>
      <name>sample string 5</name>
      <ownerEmail>sample string 2</ownerEmail>
      <ownerUserId>sample string 3</ownerUserId>
      <ownerUserName>sample string 1</ownerUserName>
      <parentFolderId>sample string 7</parentFolderId>
      <parentFolderUri>sample string 8</parentFolderUri>
      <type>sample string 4</type>
      <uri>sample string 6</uri>
    </folder>
  </folders>
</foldersResponse> 
}} />