Core Concepts
Spaces, collections, sources, and artifacts in Ctxfy.
Overview
Ctxfy turns raw AI conversations and documents into reusable context. Organize work in Spaces → Collections → Sources → Artifacts. 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.
| Method | Path | Description |
|---|---|---|
| POST | /v1/spaces | Create space |
| GET | /v1/spaces | List user's spaces |
| GET | /v1/spaces/:spaceId | Get space |
| PUT | /v1/spaces/:spaceId | Update space |
| DELETE | /v1/spaces/:spaceId | Delete 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).
| Method | Path | Description |
|---|---|---|
| POST | /v1/spaces/:spaceId/collections | Create collection |
| GET | /v1/spaces/:spaceId/collections | Get 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:
| Type | Description | initial_data |
|---|---|---|
| URI | Web URL | url or uri (required) |
| FILE | Uploaded file | data — fileKey from POST /v1/upload/s3 response |
| CONTENT | Pasted content (e.g. AI conversation) | data |
| COMPOSITION | Combined sources | source_ids (array) |
Source status
CREATED → PENDING → PROCESSING → COMPLETED | FAILED | CANCELED
Source actions
| Action | Path | Description |
|---|---|---|
| Create | POST /v1/spaces/:spaceId/sources | Create source |
| Get | GET /v1/sources/:sourceId | Get source |
| Update | PATCH /v1/sources/:sourceId | Patch metadata |
| Delete | DELETE /v1/sources/:sourceId | Soft delete |
| Pin | PATCH /v1/sources/:sourceId/toggle-pin | Toggle pin |
| Restore | POST /v1/sources/:sourceId/restore | Restore deleted |
| Reprocess | POST /v1/sources/:sourceId/reprocess | Re-run pipeline (COMPLETED/FAILED) |
| Cancel | POST /v1/sources/:sourceId/cancel | Cancel processing |
| Refresh | POST /v1/sources/:sourceId/refresh | Re-fetch (URI/FILE only) |
| Fast-forward | POST /v1/sources/:sourceId/fast-forward | Update 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.
| Method | Path | Description |
|---|---|---|
| GET | /v1/spaces/:spaceId/artifacts | List artifacts |
| PUT | /v1/source-artifact/:artifactId/process | Start processing |
| PUT | /v1/source-artifact/:artifactId/promote | Promote to space (optional: title, description) |
| DELETE | /v1/source-artifact/:artifactId | Soft-delete source artifact |
S3 Upload
For file-based sources, use the presigned upload flow:
POST /v1/upload/s3withfilename,contentType,size- Receive
uploadUrl,publicUrl,fileKey PUTfile touploadUrl- Create source with type
FILEandinitial_data: { "data": "<fileKey>" }
Requires API key authentication. Rate limits apply (Free: 10/min, Pro: 100/min).
Last updated Feb 19, 2026
Built with Documentation.AI