DocuSign: Creates a workspace file
DocuSign esignature.esignatureWorkspaceFilePostWorkspaceFiles: arguments, response, policy and SDK examples.
← Esignature operations · Get started
Operation docusign.esignature_workspacefile_postworkspacefiles
Provider route: POST /restapi/v2.1/accounts/{accountId}/workspaces/{workspaceId}/folders/{folderId}/files. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/docusign with npm, or alter-sdk-docusign with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { DocuSignIntegration } from "@alter-ai/docusign";
async function execute(input: Parameters<DocuSignIntegration["esignature"]["esignatureWorkspaceFilePostWorkspaceFiles"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new DocuSignIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.esignature.esignatureWorkspaceFilePostWorkspaceFiles(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_docusign import DocuSignIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = DocuSignIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.esignature.esignature_workspace_file_post_workspace_files(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.accountId | string | Required within parent | |
path.folderId | string | Required within parent | |
path.workspaceId | string | Required within parent |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Creates a workspace file — response body |
Referenced models: Creates a workspace file — response body
Schemas
Section titled “Schemas”Creates a workspace file — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | This object represents an item in a workspace, which can be either a file or folder. |
callerAuthorization | Model | Optional | Expand Creates a workspace file — response body — user Authorization |
contentType | string | Optional | If the item is a file, this property specifies the content type of the file. |
created | string | Optional | The UTC DateTime when the workspace item was created. |
createdById | string | Optional | The ID of the user who created the workspace item. |
createdByInformation | Model | Optional | Expand Get Workspace — response body — caller Information Details about the user who created the workspace item. |
extension | string | Optional | The file extension of a file item. |
fileSize | string | Optional | The size of the file in bytes. |
fileUri | string | Optional | The URI for retrieving the file. |
id | string | Optional | A unique ID for the Salesforce object. |
isPublic | string | Optional | When **true,** the item is public. |
lastModified | string | Optional | The UTC date and time that the comment was last updated. **Note:** This can only be done by the creator. |
lastModifiedById | string | Optional | The ID of the user who last modified the item. |
lastModifiedByInformation | Model | Optional | Expand Get Workspace — response body — caller Information Details about the user who last modified the workspace item. |
name | string | Optional | The name of the file or folder. |
pageCount | string | Optional | The number of pages in a file. |
parentFolderId | string | Optional | The ID of the parent folder, or the special value `root` for the root folder. |
parentFolderUri | string | Optional | The URI of the parent folder. |
sha256 | string | Optional | A 64-byte, Secure Hash Algorithm 256 (SHA256) checksum that the caller computes across the entirety of the original content of a file. Docusign compares this value to its own computation. If the two values are not equal, the original content and received content are not the same and the upload is refused. |
thumbHeight | string | Optional | The height of the thumbnail image. |
thumbWidth | string | Optional | The width of the thumbnail image. |
thumbnail | Model | Optional | Expand Creates a workspace file — response body — thumbnail |
type | string | Optional | The type of the workspace item. Valid values are file, folder. |
uri | string | Optional | A URI containing the user ID. |
userAuthorization | Model | Optional | Expand Creates a workspace file — response body — user Authorization |
Referenced models: Creates a workspace file — response body — thumbnail, Get Workspace — response body — caller Information, Creates a workspace file — response body — user Authorization
Creates a workspace file — response body — thumbnail
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Description of a page of a document. |
dpi | string | Optional | The number of dots per inch used for the page image. |
errorDetails | Model | Optional | Expand Locks a template — response body — error Details If an error occurs, this property describes the error. |
height | string | Optional | The height of the page in pixels. Must be an integer. |
imageBytes | string | Optional | The number of image bytes. |
mimeType | string | Optional | The MIME type. |
pageId | string | Optional | The ID of the page. |
sequence | string | Optional | The sequence of the page in the document, or page number. |
width | string | Optional | The width of the page in pixels. Must be an integer. |
Referenced models: Locks a template — response body — error Details
Get Workspace — response body — caller Information
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | This object represents the workspace user. This property is only returned in response to user specific GET call. |
accountId | string | Optional | The account ID associated with the workspace user. |
accountName | string | Optional | The name of the account that the workspace user belongs to. |
activeSince | string | Optional | The UTC DateTime when the user joined the workspace. |
created | string | Optional | The UTC DateTime when the workspace user was created. |
createdById | string | Optional | The ID of the user who created this workspace user. |
email | string | Optional | The workspace user's email address. |
errorDetails | Model | Optional | Expand Locks a template — response body — error Details This object describes errors that occur. It is only valid for responses and ignored in requests. |
invitationEmailBlurb | string | Optional | The text of the workspace invitation email message sent to the user. |
invitationEmailSubject | string | Optional | The subject line of the workspace invitation email message sent to the user. |
lastModified | string | Optional | The UTC DateTime that the workspace user was last modified. |
lastModifiedById | string | Optional | The ID of the user who last modified the workspace user. |
status | string | Optional | Filters the results by user status. You can specify a comma-separated list of the following statuses: * ActivationRequired * ActivationSent * Active * Closed * Disabled |
type | string | Optional | Type of the user. Valid values: type_owner, type_participant. |
userId | string | Optional | The ID of the workspace user. |
userName | string | Optional | The name of workspace user. |
workspaceId | string | Optional | The ID of the workspace. |
workspaceUserBaseUrl | string | Optional | The URL for accessing the workspace user. |
workspaceUserId | string | Optional | The ID of the workspace user. |
workspaceUserUri | string | Optional | The URI for accessing the workspace user. |
Referenced models: Locks a template — response body — error Details
Creates a workspace file — response body — user Authorization
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Provides properties that describe user authorization to a workspace. |
canDelete | string | Optional | When **true,** the workspace user can delete items from the workspace. |
canMove | string | Optional | When **true,** the workspace user can move the items in the workspace. |
canTransact | string | Optional | When **true,** the workspace user can create transactions from the workspace. |
canView | string | Optional | When **true,** the workspace user can view the items in the workspace. |
created | string | Optional | The UTC DateTime when the workspace user authorization was created. |
createdById | string | Optional | The ID of the user who created the workspace user authorization. |
errorDetails | Model | Optional | Expand Locks a template — response body — error Details This object describes errors that occur. It is only valid for responses and ignored in requests. |
modified | string | Optional | The UTC DateTime when the workspace user authorization was last modified. |
modifiedById | string | Optional | The ID of the user who last modified the workspace user authorization. |
workspaceUserId | string | Optional | The ID of the workspace user. |
workspaceUserInformation | Model | Optional | Expand Get Workspace — response body — caller Information An object that provides details about the workspace user. |
Referenced models: Locks a template — response body — error Details, Get Workspace — response body — caller Information
Locks a template — response body — error Details
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | This object describes errors that occur. It is only valid for responses and ignored in requests. |
errorCode | string | Optional | The code associated with the error condition. |
message | string | Optional | A brief message describing the error condition. |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: docusign.esignature_workspacefile_postworkspacefiles. Catalog operation: esignature:WorkspaceFile_PostWorkspaceFiles. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.