WorkspaceItems: createFIle

Request

HTTP request

POST /v2/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}/files

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

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

folderIdstring

The ID of the folder being accessed.

workspaceIdstring

Specifies the workspace ID GUID.

Responses

CodeDescriptionReference
201

Successful response.

WorkspaceItems
400

Error encountered.

errorDetails

SDK Method

Workspaces::createWorkspaceFile

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.

workspaceUser

A workspaceUser representing the user. This property is only returned in response to user specific GET call.

accountIdstring

The account ID associated with the envelope.

accountNamestring

The name of the account that the workspace user belongs to.

activeSincestring

createdstring

The UTC DateTime when the workspace user was created.

createdByIdstring

emailstring

errorDetailserrorDetails

lastModifiedstring

Utc date and time the comment was last updated (can only be done by creator.)

lastModifiedByIdstring

statusstring

Filters the results by user status. You can specify a comma-separated list of the following statuses:

  • ActivationRequired
  • ActivationSent
  • Active
  • Closed
  • Disabled

typestring

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

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 Admin on the account, this may be another user the Admin user is accessing. Note: For GET /v2/accounts/{accountId}/envelopes user_id query parameter is not implemented and should not be used.

userNamestring

workspaceIdstring

Specifies the workspace ID GUID.

workspaceUserBaseUrlstring

The relative URI that may be used to access a workspace user.

workspaceUserIdstring

workspaceUserAuthorization

Provides properties that describe user authorization to a workspace.

canDeletestring

canMovestring

canTransactstring

canViewstring

createdstring

The UTC DateTime when the workspace user authorization was created.

createdByIdstring

errorDetailserrorDetails

modifiedstring

modifiedByIdstring

workspaceUserIdstring

workspaceUserInformationworkspaceUser

WorkspaceItems

callerAuthorizationworkspaceUserAuthorization

contentTypestring

createdstring

The UTC DateTime when the workspace item was created.

createdByIdstring

createdByInformationworkspaceUser

extensionstring

fileSizestring

fileUristring

idstring

isPublicstring

If true, this supersedes need for bit mask permission with workspaceUserAuthorization

lastModifiedstring

Utc date and time the comment was last updated (can only be done by creator.)

lastModifiedByIdstring

Utc date and time the comment was last updated (can only be done by creator)

lastModifiedByInformationworkspaceUser

namestring

A simple string description of the item, such as a file name or a folder name.

pageCountstring

parentFolderIdstring

The ID of the parent folder. This is the GUID of the parent folder, or the special value 'root' for the root folder.

parentFolderUristring

typestring

The type of the workspace item. Valid values are file, folder.

uristring

Examples

Generic JSON Response

Response
{
  "id": "sample string 1",
  "parentFolderId": "sample string 2",
  "parentFolderUri": "sample string 3",
  "name": "sample string 4",
  "type": "sample string 5",
  "uri": "sample string 6",
  "extension": "sample string 7",
  "contentType": "sample string 8",
  "pageCount": "sample string 9",
  "fileSize": "sample string 10",
  "fileUri": "sample string 11",
  "isPublic": "sample string 12",
  "callerAuthorization": {
    "workspaceUserId": "sample string 1",
    "workspaceUserInformation": {
      "workspaceUserId": "sample string 1",
      "status": "sample string 2",
      "type": "sample string 3",
      "workspaceId": "sample string 4",
      "accountId": "sample string 5",
      "userId": "sample string 6",
      "accountName": "sample string 7",
      "userName": "sample string 8",
      "email": "sample string 9",
      "workspaceUserBaseUrl": "sample string 10",
      "created": "sample string 11",
      "createdById": "sample string 12",
      "lastModified": "sample string 13",
      "lastModifiedById": "sample string 14",
      "activeSince": "sample string 15",
      "errorDetails": {
        "errorCode": "sample string 1",
        "message": "sample string 2"
      }
    },
    "canView": "sample string 2",
    "canTransact": "sample string 3",
    "canMove": "sample string 4",
    "canDelete": "sample string 5",
    "createdById": "sample string 6",
    "created": "sample string 7",
    "modifiedById": "sample string 8",
    "modified": "sample string 9",
    "errorDetails": {
      "errorCode": "",
      "message": ""
    }
  },
  "created": "sample string 13",
  "createdById": "sample string 14",
  "createdByInformation": {},
  "lastModified": "sample string 15",
  "lastModifiedById": "sample string 16",
  "lastModifiedByInformation": {}
}
Generic XML Response

Response
<workspaceItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <callerAuthorization>
    <canDelete>sample string 5</canDelete>
    <canMove>sample string 4</canMove>
    <canTransact>sample string 3</canTransact>
    <canView>sample string 2</canView>
    <created>sample string 7</created>
    <createdById>sample string 6</createdById>
    <errorDetails>
      <errorCode></errorCode>
      <message></message>
    </errorDetails>
    <modified>sample string 9</modified>
    <modifiedById>sample string 8</modifiedById>
    <workspaceUserId>sample string 1</workspaceUserId>
    <workspaceUserInformation>
      <accountId>sample string 5</accountId>
      <accountName>sample string 7</accountName>
      <activeSince>sample string 15</activeSince>
      <created>sample string 11</created>
      <createdById>sample string 12</createdById>
      <email>sample string 9</email>
      <errorDetails>
        <errorCode>sample string 1</errorCode>
        <message>sample string 2</message>
      </errorDetails>
      <lastModified>sample string 13</lastModified>
      <lastModifiedById>sample string 14</lastModifiedById>
      <status>sample string 2</status>
      <type>sample string 3</type>
      <userId>sample string 6</userId>
      <userName>sample string 8</userName>
      <workspaceId>sample string 4</workspaceId>
      <workspaceUserBaseUrl>sample string 10</workspaceUserBaseUrl>
      <workspaceUserId>sample string 1</workspaceUserId>
    </workspaceUserInformation>
  </callerAuthorization>
  <contentType>sample string 8</contentType>
  <created>sample string 13</created>
  <createdById>sample string 14</createdById>
  <createdByInformation />
  <extension>sample string 7</extension>
  <fileSize>sample string 10</fileSize>
  <fileUri>sample string 11</fileUri>
  <id>sample string 1</id>
  <isPublic>sample string 12</isPublic>
  <lastModified>sample string 15</lastModified>
  <lastModifiedById>sample string 16</lastModifiedById>
  <lastModifiedByInformation />
  <name>sample string 4</name>
  <pageCount>sample string 9</pageCount>
  <parentFolderId>sample string 2</parentFolderId>
  <parentFolderUri>sample string 3</parentFolderUri>
  <type>sample string 5</type>
  <uri>sample string 6</uri>
</workspaceItem> 
}} />