Start HereCore Concepts

Core Concepts

Spaces, collections, sources, and artifacts in Ctxfy.

Overview

Ctxfy turns raw AI conversations and documents into reusable context. Organize work in SpacesCollectionsSourcesArtifacts. Upload raw input, extract structured context and artifacts, use across projects. Measurable benefits from day one—see Why Ctxfy?.

Spaces

A space is a project container. Use spaces to organize snapshots and keep context isolated. Each user owns spaces and can create, list, update, and delete them. All other resources (collections, sources, artifacts) belong to a space.

MethodPathDescription
POST/v1/spacesCreate space
GET/v1/spacesList user's spaces
GET/v1/spaces/:spaceIdGet space
PUT/v1/spaces/:spaceIdUpdate space
DELETE/v1/spaces/:spaceIdDelete space

Collections

Collections provide hierarchical organization inside a space. They form a tree via parentId. Use them to group sources (e.g. by project, topic, or folder).

MethodPathDescription
POST/v1/spaces/:spaceId/collectionsCreate collection
GET/v1/spaces/:spaceId/collectionsGet collection tree

Sources

A source is raw input you upload for processing—AI conversations, documents, URLs, or files. It has a type, processing status, and optional collectionId. Types:

TypeDescriptioninitial_data
URIWeb URLurl or uri (required)
FILEUploaded filedata — fileKey from POST /v1/upload/s3 response
CONTENTPasted content (e.g. AI conversation)data
COMPOSITIONCombined sourcessource_ids (array)

Source status

CREATEDPENDINGPROCESSINGCOMPLETED | FAILED | CANCELED

Source actions

ActionPathDescription
CreatePOST /v1/spaces/:spaceId/sourcesCreate source
GetGET /v1/sources/:sourceIdGet source
UpdatePATCH /v1/sources/:sourceIdPatch metadata
DeleteDELETE /v1/sources/:sourceIdSoft delete
PinPATCH /v1/sources/:sourceId/toggle-pinToggle pin
RestorePOST /v1/sources/:sourceId/restoreRestore deleted
ReprocessPOST /v1/sources/:sourceId/reprocessRe-run pipeline (COMPLETED/FAILED)
CancelPOST /v1/sources/:sourceId/cancelCancel processing
RefreshPOST /v1/sources/:sourceId/refreshRe-fetch (URI/FILE only)
Fast-forwardPOST /v1/sources/:sourceId/fast-forwardUpdate with new data (URI/FILE/CONTENT)

Postbacks

When creating a source, you can pass postback_url inside instructions to receive an HTTP POST when processing completes. See Postbacks for details.

Artifacts

Artifacts are extracted outputs from sources—code, schemas, diagrams, and structured context. They have status: CREATED, PENDING, PROCESSING, REVIEW, COMPLETED, FAILED.

MethodPathDescription
GET/v1/spaces/:spaceId/artifactsList artifacts
PUT/v1/source-artifact/:artifactId/processStart processing
PUT/v1/source-artifact/:artifactId/promotePromote to space (optional: title, description)
DELETE/v1/source-artifact/:artifactIdSoft-delete source artifact

S3 Upload

For file-based sources, use the presigned upload flow:

  1. POST /v1/upload/s3 with filename, contentType, size
  2. Receive uploadUrl, publicUrl, fileKey
  3. PUT file to uploadUrl
  4. Create source with type FILE and initial_data: { "data": "<fileKey>" }

Requires API key authentication. Rate limits apply (Free: 10/min, Pro: 100/min).