For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Contact us
DocumentationAPI Reference
DocumentationAPI Reference
  • Get started
    • Introduction
    • Authentication
    • Concepts
    • Quickstart
    • Errors
Contact us
LogoLogo
On this page
  • The hierarchy
  • Slugs come in two formats
  • Hex-encoded slugs
  • Original (raw) slugs
  • Docpaths
  • Default folder
  • Workspaces and embedding
Get started

Concepts

Slugs, docpaths, and the company/account/org hierarchy.

Was this page helpful?
Previous

Quickstart

From zero to a queryable workspace in five requests.
Next
Built with

The hierarchy

Your company (your API key — internally called a "Partner")
└── Account (X-Account-Id header)
└── Organization (orgSlug in URL)
├── Workspaces (workspace slug)
└── Documents (org-prefixed docpaths)

Every API call carries enough context to resolve a path through this tree:

LayerHow it’s identified
Your companyAPI key (Bearer token)
AccountX-Account-Id UUID header
Organization{orgSlug} in the URL path
Workspace{slug} in the URL path
DocumentOrg-prefixed docpath in request bodies

Slugs come in two formats

This is the single most common source of 400 and 404 errors. Slugs are encoded two different ways depending on where they appear:

Hex-encoded slugs

Used in URL path parameters:

  • /v1/org/{orgSlug} — {orgSlug} is hex-encoded
  • /v1/workspace/{slug} — {slug} is hex-encoded
  • /v1/org/{orgSlug}/document/... — {orgSlug} is hex-encoded

You get hex-encoded slugs from the slug field on:

  • GET /v1/orgs
  • GET /v1/org/{orgSlug}/workspaces

Original (raw) slugs

Used in:

  • URL query parameters
  • JSON request bodies
  • Multipart form fields (e.g. addToWorkspaces)
  • The leading segment of org-prefixed docpaths

You get original slugs from the originalSlug field on the same responses above.

Rule of thumb: if it’s between / and / in the URL, use the hex form. Everywhere else, use the original form.

Docpaths

A docpath identifies a document within an organization’s storage. It always has the shape:

{originalOrgSlug}/{folder}/{filename}.json

Example:

acme/custom-documents/contract.pdf-fc4beeeb-e436-454d-8bb4-e5b8979cb48f.json

Docpaths appear in:

  • adds / deletes arrays on POST /v1/workspace/{slug}/update-embeddings
  • from / to on POST /v1/org/{orgSlug}/document/move-files
  • files array on DELETE /v1/org/{orgSlug}/document/remove-files

Two important rules:

  1. The leading segment is the original org slug — not the hex-encoded one in the URL.
  2. The docpath’s org must match the org in the URL. Cross-org operations are rejected with 400.

Default folder

If you don’t specify a folder when uploading, the document lands in custom-documents/ under the org. That folder cannot be deleted — it’s the catch-all for unfiled docs.

Workspaces and embedding

Uploading a document does not automatically make it queryable. To use a document in a workspace, either:

  • Pass addToWorkspaces (comma-separated original slugs) at upload time, or
  • Call POST /v1/workspace/{slug}/update-embeddings later with the docpath in adds.

Both paths require the workspace and document to belong to the same organization.