Skip to content

Spaces

There are two concepts we use to organize documents:

  • Spaces: A collection of documents
  • SpaceFile: A single file within a space

Spaces

Spaces are similar to an S3 Bucket or a Google Drive. You can logically separate files into collections however makes sense to you.

{
"createdAt": "2024-05-29T21:41:58.229Z",
"updatedAt": "2024-05-29T21:41:58.230Z",
"id": "clwscuwo1000008i63w060d29",
"organizationId": "clwscv3dg000108i64rpw9yn0",
"name": "My Awesome name"
}

The name field must be unique within your organization. You can use it for friendly names, URIs, or to store your own unique IDs.

SpaceFile

These contain metadata about an uploaded file. They exist within a single Space.

{
"createdAt": "2024-05-29T21:53:47.008Z",
"updatedAt": "2024-05-29T21:53:47.008Z",
"id": "pvlanjb5moh57xpzq6ym76cz",
"originalMimeType": "application/pdf",
"spaceId": "qabqfp66eeiznrf078h4c94t",
"path": "/foo/bar.pdf",
"status": "Pending"
}

SpaceFile path

The path of a SpaceFile can contain any string. It does not need to conform to any pattern, or even have an extension. We usually recommend following a folder-like structure, but feel free to put ids, URIs, or anything else that makes sense for your use case.

Supported MimeTypes

Because paths are so flexible, we use the MimeType to determine how to process the file. If you tell us it’s a PDF, we’ll believe you, regardless of what’s in the path.

We currently support:

  • application/pdf
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • application/msword
  • application/vnd.openxmlformats-officedocument.presentationml.presentation
  • application/vnd.openxmlformats-officedocument.presentationml.slideshow
  • application/vnd.ms-powerpoint

We have plans to support many more, so let us know if there’s one that’s a priority for you!