File Uploads

Upload and attach files to any entity. The Filesystem module handles storage, and files can be linked to products, leads, people, messages, and more.

Filesystem Entity

FieldTypeDescription
id / uuidID!Unique identifiers
nameString!File name
urlString!Public URL
typeString!MIME type
sizeIntFile size in bytes
field_nameStringField name for categorization
attributesMixedAdditional metadata
created_atDateTimeUpload timestamp

Upload a File

mutation($file: Upload!) {
  upload(file: $file) {
    id uuid name url type size
  }
}

Attach to Entities

# Attach to a lead
mutation {
  attachFileToLead(lead_id: 1, filesystem_id: 1, field_name: "contract") {
    id files { url name }
  }
}

# Upload directly to a product
mutation($file: Upload!) {
  uploadFileToProduct(product_id: 1, file: $file) {
    id files { url name type }
  }
}

# Attach to a person
mutation {
  attachFileToPeople(people_id: 1, filesystem_id: 1) {
    id files { url name }
  }
}

Create from URL

mutation {
  createFileSystem(input: {
    url: "https://example.com/document.pdf"
    name: "Contract Document"
  }) {
    id uuid url name
  }
}