Space Docs
API ReferenceDocument

document.create

Type: Mutation · Auth: Workspace-aware

Input

FieldTypeRequiredDefaultDescription
customerIdstringNo—ID of the associated customer
vendorIdstringNo—ID of the associated vendor
siteIdstringNo—ID of the associated site
relatedEntityTypestringNo—Related entity type
relatedEntityIdstringNo—ID of the associated related entity
documentTypeenum(proposal, contract, drawing, as_built, submittal, report, invoice, photo_set, configuration, certificate, permit, product_manual, coi_liability, coi_workers_comp, w9, other)Yes—Document type
filenamestringYes—Filename
objectStorageKeystringYes—Object storage key
mimeTypestringNo—Mime type
uploadedByUserIdstringNo—ID of the associated uploaded by user
documentDatestring.date-timeNo—Document date
versionintegerYes1Version
extractionStatusenum(pending, processing, completed, failed, not_applicable)Yes"pending"Extraction status
aiSummarystringNo—Ai summary
notestringNo—Note
classificationTagsstring[]No—Classification tags
workspaceIdstringNo—ID of the associated workspace
visibilityModeunknownNo—Visibility mode

Example

{
  "customerId": "550e8400-e29b-41d4-a716-446655440000",
  "vendorId": "550e8400-e29b-41d4-a716-446655440000",
  "siteId": "550e8400-e29b-41d4-a716-446655440000",
  "relatedEntityType": "example",
  "relatedEntityId": "550e8400-e29b-41d4-a716-446655440000",
  "documentType": "proposal",
  "filename": "example",
  "objectStorageKey": "example",
  "version": 1,
  "extractionStatus": "pending"
}

On this page