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 name Value Description
Path parameters
accountId string

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

folderId string

The ID of the folder being accessed.

Request Body

Responses

Code Description Reference
200 OK Successful response.
400 Bad Request Error encountered.

SDK Method

Folders::moveEnvelopes

Definitions Expand All | Collapse All

Folders

Folder management

folders
[folder]

A collection of folder objects returned in a response.

errorDetails

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

errorCode string

An error code associated with the error.

message string

A short error message.

filter

actionRequired string

Access token information.

expires string
folderIds string
fromDateTime string
isTemplate string
order string

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
orderBy string
searchTarget string
searchText string
status string

Indicates the envelope status. Valid values are:

  • sent - The envelope is sent to the recipients.
  • created - The envelope is saved as a draft and can be modified and sent later.
toDateTime string

Must be set to "bearer".

folder

errorDetails errorDetails
filter filter
folderId string

The ID of the folder being accessed.

folders
[folder]

A collection of folder objects returned in a response.

name string
ownerEmail string
ownerUserId string
ownerUserName string
parentFolderId string
parentFolderUri string
type string

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

uri string

foldersRequest

envelopeIds
[string]
fromFolderId string

The folder ID the envelope is being moved from.

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>