Skip to main content
POST
/
api
/
spaces
/
coworkerdatafiles
{
  "Status": 123,
  "Message": "<string>",
  "Value": "<any>",
  "WasSuccessful": true,
  "Errors": [
    {
      "AttemptedValue": "<any>",
      "Message": "<string>",
      "PropertyName": "<string>"
    }
  ]
}
A CoworkerDataFile is a file attached to a customer’s record. Files can be kept internal or shared with the customer on the Members Portal. When a file is shared (AvailableToUser = true), the customer receives an email notification and can view or download the file from the Files tab under My Activity on the Members Portal. You can request a digital signature (RequestDigitalSignature = true) — once the customer signs the document, a signed copy is automatically stored in SignedFileDataFileName. The notes in Description are included in the email notification sent to the customer. Supported formats include .pdf, .docx, .xlsx, .jpg, .png, and other common types (max 10 MB). Files can be linked to a document template, a proposal, or a coworker contract via the respective GUID fields.

Authentication

This endpoint requires OAuth2 authentication. Include a valid bearer token in the Authorization header. The authenticated user must be a full unrestricted administrator or have the CoworkerDataFile-Create role.

Request Body

Required Fields

BusinessId
integer
required
Location ID.
CoworkerId
integer
required
ID of the customer this file belongs to.
Name
string
required
Name of the file or document.

Optional Fields

Description
string
Notes included in the email notification sent to the customer when the file is shared.
AvailableToUser
boolean
Whether the file is shared with the customer and visible on the Members Portal.
RequestDigitalSignature
boolean
Whether to request a digital signature from the customer.
NewFileDataUrl
string
URL of a new file to upload (replaces the existing file).
ClearFileDataFile
boolean
Set to true to remove the existing uploaded file.
NewSignedFileDataUrl
string
URL of a new signed file to upload (replaces the existing signed copy).
ClearSignedFileDataFile
boolean
Set to true to remove the existing signed copy.
Extension
string
File extension (e.g. pdf, docx, jpg).
Billed
boolean
Whether the customer has been billed for this file.
Signed
boolean
Whether the customer has signed this document.
EsignIdentifier
string
Identifier used by the digital signature provider to track this document.
DocumentTemplateGuid
string
GUID of the document template used to generate this file.
NotifyWhenSignedEmail
string
Email address to notify when the customer signs the document.
ProposalGuid
string
GUID of the proposal linked to this file.
CoworkerContractGuid
string
GUID of the coworker contract linked to this file.

Code Examples

curl -X POST \
  "https://spaces.nexudus.com/api/spaces/coworkerdatafiles" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "BusinessId": 0,
    "CoworkerId": 0,
    "Name": ""
}'

Response

200

Status
integer
HTTP status code. 200 on success.
Message
string
A human-readable message confirming the creation.
Value
object
Contains the Id of the newly created record.
WasSuccessful
boolean
true if the coworkerdatafile was created successfully.
Errors
array
null on success.
Example Response
{
  "Status": 200,
  "Message": "CoworkerDataFile was successfully created.",
  "Value": {
    "Id": 87654321
  },
  "OpenInDialog": false,
  "OpenInWindow": false,
  "RedirectURL": null,
  "JavaScript": null,
  "UpdatedOn": "2025-01-15T10:30:00Z",
  "UpdatedBy": "admin@example.com",
  "Errors": null,
  "WasSuccessful": true
}

400

Message
string
A summary of the validation error(s), in the format PropertyName: error message.
Value
any
null on validation failure.
Errors
object[]
Array of validation errors.
WasSuccessful
boolean
false when the request fails validation.
Example Response
{
  "Message": "Name: is a required field",
  "Value": null,
  "Errors": [
    {
      "AttemptedValue": null,
      "Message": "is a required field",
      "PropertyName": "Name"
    }
  ],
  "WasSuccessful": false
}