Skip to content

Sync Workspace API (1.0.0)

Sync Workspace API

Workspace-specific services for content management, project organization, and file processing.

Workspace Services

The Workspace APIs allow access to the resources contained within Workspaces and Dataspaces. Although Workspaces and Dataspaces are distinct, Dataspaces have no compute of their own, so operations on Dataspace resources must always be performed through a chosen workspace. Workspaces are bundled, fully-managed computational services used to: - Upload, process, and manage content files - Search and retrieve content with advanced filtering - Query content using AI with library citations and web search integration - Run AI workflows on the content - Organize content into projects according to business workflows - Generate file derivatives (images, thumbnails) and extract metadata - Handle content indexing with automated categorization

Content Processing

When files are uploaded, they undergo asynchronous processing which may include: - Virus scanning and security validation - File format conversion and derivative generation (TIFF, JPEG thumbnails) - Automated metadata extraction using AI - Content categorization and indexing according to dataspace ontology Processing status can be tracked using the Workflow Execution API.

Projects vs Content Organization

  • Content: Individual files with metadata, organized by categories defined in the dataspace ontology - Projects: Business workflow containers that group disparate content items according to business rules (e.g., application packets, case files)

Authentication

All endpoints require authentication using a bearer token.

Overview
License
Languages
Servers
Mock server
https://docs.syncdocs.ai/_mock/api/workspace-openapi/
Production - Workspace Services
https://{workspaceId}.syncdocs.ai/api/
Development server
https://docs.syncdocs.ai/api/

Content

Content management operations. Handle file uploads, processing, metadata extraction, and content retrieval with advanced filtering capabilities.

Operations

Associate content with a project

Request

Security
bearerAuth
Path
dataspaceIdstring^sds-[a-z0-9]{8}$required

Short dataspace ID with sds- prefix

projectIdstring(uuid)required

UUID of the project

contentIdstring(uuid)required

UUID of the content

curl -i -X PUT \
  'https://docs.syncdocs.ai/_mock/api/workspace-openapi/projects/{dataspaceId}/{projectId}/content/{contentId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Content associated successfully

Dissociate content from a project

Request

Security
bearerAuth
Path
dataspaceIdstring^sds-[a-z0-9]{8}$required

Short dataspace ID with sds- prefix

projectIdstring(uuid)required

UUID of the project

contentIdstring(uuid)required

UUID of the content

curl -i -X DELETE \
  'https://docs.syncdocs.ai/_mock/api/workspace-openapi/projects/{dataspaceId}/{projectId}/content/{contentId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Content dissociated successfully

Get all content associated with a project

Request

Security
bearerAuth
Path
dataspaceIdstring^sds-[a-z0-9]{8}$required

Short dataspace ID with sds- prefix

projectIdstring(uuid)required

UUID of the project

curl -i -X GET \
  'https://docs.syncdocs.ai/_mock/api/workspace-openapi/projects/{dataspaceId}/{projectId}/content' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

List of content IDs associated with the project

Bodyapplication/json
contentIdsArray of strings(uuid)required
Response
application/json
{ "contentIds": [ "497f6eca-6276-4993-bfeb-53cbbbba6f08" ] }

Create new content

Request

Upload files using multipart/form-data to directly upload files. Comprehensive Validation System: The content creation endpoint performs multiple layers of validation to ensure data integrity: 1. Schema Validation: - categoryId: Must be a valid UUID - metadata: Must be a valid JSON object (if provided) - fileFormat: Required string specifying the file's MIME type - fileName: Optional string for the file name 2. Business Logic Validation: - Category Existence: Validates that the specified categoryId exists in the dataspace's ontology - Metadata Query Binding: Ensures all provided metadata queries are bound to the specified category - Data Type Validation: Verifies that metadata values match the expected data types (STRING, SHORT_STRING, NUMBER, BOOLEAN, DATE) 3. Required Metadata Validation: - Default Behavior: validateRequiredMetadata defaults to true when not specified - When enabled (default): Enforces that all required metadata queries and unique index elements are provided - When disabled (validateRequiredMetadata=false): Allows content creation without required metadata queries 4. File Upload Validation: - File must be provided in the multipart form data - File format fallback: Uses detected MIME type if fileFormat not specified - File name fallback: Uses original filename if fileName not specified Query Parameters: - validateRequiredMetadata: Optional boolean (defaults to true) - Set to "false" to skip required metadata validation - Set to "true" or omit to enforce required metadata validation Error Scenarios: - 400 Bad Request: Invalid schema, category not found, unbound metadata queries, type mismatches, missing required metadata - 401 Unauthorized: Invalid or missing authentication - 404 Not Found: Dataspace not found

Security
bearerAuth
Path
dataspaceIdstring^sds-[a-z0-9]{8}$required

Short dataspace ID with sds- prefix

Example: sds-abc12345
Query
validateRequiredMetadatastring

Whether to validate that all required metadata queries are provided (defaults to true when not specified)

Bodymultipart/form-data
categoryIdstring(uuid)

UUID of the category

Example: "123e4567-e89b-12d3-a456-426614174001"
metadataobject

Optional metadata for the content item

Example: {"author":"John Doe","category":"research"}
fileFormatstringrequired

Format of the file

Example: "application/pdf"
fileNamestring

Name of the file

Example: "document.pdf"
filestring(binary)

The file to upload

curl -i -X POST \
  'https://docs.syncdocs.ai/_mock/api/workspace-openapi/content/sds-abc12345?validateRequiredMetadata=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: multipart/form-data' \
  -F categoryId=123e4567-e89b-12d3-a456-426614174001 \
  -F 'metadata[author]=John Doe' \
  -F 'metadata[category]=research' \
  -F fileFormat=application/pdf \
  -F fileName=document.pdf

Responses

Content created successfully

Bodyapplication/json
contentIdstring(uuid)required
Example: "123e4567-e89b-12d3-a456-426614174000"
categoryIdstring(uuid)required
Example: "123e4567-e89b-12d3-a456-426614174001"
dataspaceIdstring(uuid)required
Example: "123e4567-e89b-12d3-a456-426614174002"
fileFormatstringrequired
Example: "application/pdf"
metadataobject

Optional metadata for the content item

Example: {"category":"documents","priority":1}
inferenceTaskExecutionsobject

Optional record of inference task executions that modified this content

Example: {"categoryId":"789e0123-e89b-12d3-a456-426614174002"}
vectorStoreFileIdstring or null

OpenAI vector store file ID (generated internally)

Example: "file-abc123xyz789"
createdAtstring(date-time)required
Example: "2024-01-15T10:30:00Z"
updatedAtstring or null(date-time)required
Example: "2024-01-15T14:30:00Z"
Response
application/json
{ "contentId": "123e4567-e89b-12d3-a456-426614174000", "categoryId": "123e4567-e89b-12d3-a456-426614174001", "dataspaceId": "123e4567-e89b-12d3-a456-426614174002", "fileFormat": "application/pdf", "metadata": { "category": "documents", "priority": 1 }, "inferenceTaskExecutions": { "categoryId": "789e0123-e89b-12d3-a456-426614174002" }, "vectorStoreFileId": "file-abc123xyz789", "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T14:30:00Z" }

Get content by ID

Request

Security
bearerAuth
Path
dataspaceIdstring^sds-[a-z0-9]{8}$required

Short dataspace ID with sds- prefix

Example: sds-abc12345
contentIdstring(uuid)required

UUID of the content item

Example: 123e4567-e89b-12d3-a456-426614174000
curl -i -X GET \
  https://docs.syncdocs.ai/_mock/api/workspace-openapi/content/sds-abc12345/123e4567-e89b-12d3-a456-426614174000 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Content details

Bodyapplication/json
contentIdstring(uuid)required
Example: "123e4567-e89b-12d3-a456-426614174000"
categoryIdstring(uuid)required
Example: "123e4567-e89b-12d3-a456-426614174001"
dataspaceIdstring(uuid)required
Example: "123e4567-e89b-12d3-a456-426614174002"
fileFormatstringrequired
Example: "application/pdf"
metadataobject

Optional metadata for the content item

Example: {"category":"documents","priority":1}
inferenceTaskExecutionsobject

Optional record of inference task executions that modified this content

Example: {"categoryId":"789e0123-e89b-12d3-a456-426614174002"}
vectorStoreFileIdstring or null

OpenAI vector store file ID (generated internally)

Example: "file-abc123xyz789"
createdAtstring(date-time)required
Example: "2024-01-15T10:30:00Z"
updatedAtstring or null(date-time)required
Example: "2024-01-15T14:30:00Z"
Response
application/json
{ "contentId": "123e4567-e89b-12d3-a456-426614174000", "categoryId": "123e4567-e89b-12d3-a456-426614174001", "dataspaceId": "123e4567-e89b-12d3-a456-426614174002", "fileFormat": "application/pdf", "metadata": { "category": "documents", "priority": 1 }, "inferenceTaskExecutions": { "categoryId": "789e0123-e89b-12d3-a456-426614174002" }, "vectorStoreFileId": "file-abc123xyz789", "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T14:30:00Z" }

Update content

Request

Security
bearerAuth
Path
dataspaceIdstring^sds-[a-z0-9]{8}$required

Short dataspace ID with sds- prefix

Example: sds-abc12345
contentIdstring(uuid)required

UUID of the content item

Example: 123e4567-e89b-12d3-a456-426614174000
Bodyapplication/json
categoryIdstring(uuid)

UUID of the category

Example: "123e4567-e89b-12d3-a456-426614174001"
metadataobject

Optional metadata for the content item

Example: {"status":"updated","version":2}
inferenceTaskExecutionsobject

Optional record of inference task executions that modified this content

Example: {"categoryId":"789e0123-e89b-12d3-a456-426614174002"}
curl -i -X PUT \
  https://docs.syncdocs.ai/_mock/api/workspace-openapi/content/sds-abc12345/123e4567-e89b-12d3-a456-426614174000 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "categoryId": "123e4567-e89b-12d3-a456-426614174001",
    "metadata": {
      "status": "updated",
      "version": 2
    },
    "inferenceTaskExecutions": {
      "categoryId": "789e0123-e89b-12d3-a456-426614174002"
    }
  }'

Responses

Content updated successfully

Bodyapplication/json
contentIdstring(uuid)required
Example: "123e4567-e89b-12d3-a456-426614174000"
categoryIdstring(uuid)required
Example: "123e4567-e89b-12d3-a456-426614174001"
dataspaceIdstring(uuid)required
Example: "123e4567-e89b-12d3-a456-426614174002"
fileFormatstringrequired
Example: "application/pdf"
metadataobject

Optional metadata for the content item

Example: {"category":"documents","priority":1}
inferenceTaskExecutionsobject

Optional record of inference task executions that modified this content

Example: {"categoryId":"789e0123-e89b-12d3-a456-426614174002"}
vectorStoreFileIdstring or null

OpenAI vector store file ID (generated internally)

Example: "file-abc123xyz789"
createdAtstring(date-time)required
Example: "2024-01-15T10:30:00Z"
updatedAtstring or null(date-time)required
Example: "2024-01-15T14:30:00Z"
Response
application/json
{ "contentId": "123e4567-e89b-12d3-a456-426614174000", "categoryId": "123e4567-e89b-12d3-a456-426614174001", "dataspaceId": "123e4567-e89b-12d3-a456-426614174002", "fileFormat": "application/pdf", "metadata": { "category": "documents", "priority": 1 }, "inferenceTaskExecutions": { "categoryId": "789e0123-e89b-12d3-a456-426614174002" }, "vectorStoreFileId": "file-abc123xyz789", "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T14:30:00Z" }

Delete content

Request

Security
bearerAuth
Path
dataspaceIdstring^sds-[a-z0-9]{8}$required

Short dataspace ID with sds- prefix

Example: sds-abc12345
contentIdstring(uuid)required

UUID of the content item

Example: 123e4567-e89b-12d3-a456-426614174000
curl -i -X DELETE \
  https://docs.syncdocs.ai/_mock/api/workspace-openapi/content/sds-abc12345/123e4567-e89b-12d3-a456-426614174000 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Content deleted successfully

Download content file

Request

Download the actual file associated with the content item

Security
bearerAuth
Path
dataspaceIdstring^sds-[a-z0-9]{8}$required

Short dataspace ID with sds- prefix

Example: sds-abc12345
contentIdstring(uuid)required

UUID of the content item

Example: 123e4567-e89b-12d3-a456-426614174000
curl -i -X GET \
  https://docs.syncdocs.ai/_mock/api/workspace-openapi/content/sds-abc12345/123e4567-e89b-12d3-a456-426614174000/download \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

File download

Bodyapplication/octet-stream
string(binary)

Count content items

Request

Returns the total count of content items in a dataspace with optional filtering. Filtering Options: - categoryId: Filter by specific category UUID - fileFormat: Filter by file format/MIME type - dateFrom: Filter by creation date from (ISO 8601 format) - dateTo: Filter by creation date to (ISO 8601 format) Features: - Efficient counting using SQL COUNT queries - Multiple filter combinations supported - Date range filtering for temporal analysis - Category-specific content counting - File format filtering for content type analysis Example Usage: - Count all content: GET /content/sds-12345678/count - Count by category: GET /content/sds-12345678/count?categoryId=123e4567-e89b-12d3-a456-426614174001 - Count PDFs: GET /content/sds-12345678/count?fileFormat=application/pdf - Count recent content: GET /content/sds-12345678/count?dateFrom=2024-01-01T00:00:00Z - Combined filters: GET /content/sds-12345678/count?categoryId=123e4567-e89b-12d3-a456-426614174001&fileFormat=application/pdf Performance: - Optimized for large datasets using database indexes - Returns exact counts without loading content items into memory - Suitable for dashboard statistics and analytics

Security
bearerAuth
Path
dataspaceIdstring^sds-[a-z0-9]{8}$required

Short dataspace ID with sds- prefix

Example: sds-abc12345
Query
categoryIdstring(uuid)

Filter by category ID

Example: categoryId=123e4567-e89b-12d3-a456-426614174001
fileFormatstring

Filter by file format

Example: fileFormat=application/pdf
dateFromstring

Filter by date from (ISO 8601 format)

Example: dateFrom=2024-01-01T00:00:00Z
dateTostring

Filter by date to (ISO 8601 format)

Example: dateTo=2024-12-31T23:59:59Z
curl -i -X GET \
  'https://docs.syncdocs.ai/_mock/api/workspace-openapi/content/sds-abc12345/count?categoryId=123e4567-e89b-12d3-a456-426614174001&fileFormat=application%2Fpdf&dateFrom=2024-01-01T00%3A00%3A00Z&dateTo=2024-12-31T23%3A59%3A59Z' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Content count retrieved successfully

Bodyapplication/json
countinteger>= 0required

Total number of content items matching the filters

Example: 42
Response
application/json
{ "count": 42 }

Fetch content with advanced filtering, pagination, and version grouping

Request

Retrieves a list of content items with comprehensive filtering capabilities and optional version grouping. Top-level Field Filtering: - contentId, categoryId, fileName, fileFormat, createdAt, updatedAt Metadata Field Filtering: - Filter on any metadata query using nested structure: metadata: { "keyName": value } Advanced Operators: - eq, ne - Equality/inequality - gt, gte, lt, lte - Comparison (dates/numbers) - between - Range filtering: [min, max] - in, nin - Array membership - contains, startsWith, endsWith - String operations - exists - Field presence check Version Grouping: - groupByVersion: When true, groups content by version strings and returns only the most recent item per version - Version strings are calculated from category name + metadata values where uniqueIndexElement is true - Format: "category_name_value1_value2" (lowercase, underscore-separated) - Returns relatedVersions array containing objects with id, filename, and created_at for other content items sharing the same version - When false or omitted, relatedVersions is null and all content is returned - Special case: When filtering by contentId AND groupByVersion is true, returns the specified content item with all its related versions attached Logging Control: - disabledLogging: When true, disables query logging for this request (both console logs and database query logs) - When false or omitted, normal logging behavior is maintained - Useful for high-frequency operations or when logging is not desired Features: - Cursor-based pagination with pageSize and cursor - Field selection with fields parameter - Mixed filtering (combine top-level and metadata filters) - Version grouping for content deduplication - Optional logging control for performance optimization - Backward compatible with empty filters Example Request (with version grouping and disabled logging): json { "query": "annual report", "groupByVersion": true, "disabledLogging": false, "filters": { "fileFormat": { "in": ["application/pdf"] }, "createdAt": { "gte": "2025-01-01T00:00:00Z" }, "metadata": { "Status": { "ne": "Archived" }, "Business Type": { "in": ["Restaurant", "Retail"] } } } } Example Response (with version grouping): json { "contentItems": [ { "contentId": "123e4567-e89b-12d3-a456-426614174000", "categoryId": "456e7890-e89b-12d3-a456-426614174001", "fileName": "license_v2.pdf", "createdAt": "2025-01-15T10:30:00Z", "relatedVersions": [ { "id": "789e0123-e89b-12d3-a456-426614174002", "filename": "license_v1.pdf", "created_at": "2025-01-14T09:15:00Z" } ] } ] }

Security
bearerAuth
Path
dataspaceIdstring^sds-[a-z0-9]{8}$required

Short dataspace ID with sds- prefix

Example: sds-abc12345
Query
cursorstring(uuid)

Cursor for pagination

Example: cursor=123e4567-e89b-12d3-a456-426614174000
pageSizeinteger[ 1 .. 100 ]required

Number of items per page

Example: pageSize=20
fieldsstring

Comma-separated list of fields to include

Example: fields=contentId,categoryId,fileName
Bodyapplication/json
querystring

Text query for full-text search across content metadata (filename, metadata query/values, categories, etc.) - does not search the actual content body

Example: "annual report 2024"
groupByVersionboolean

Group content by version (category name + unique index metadata values)

Default false
Example: false
filtersobject
curl -i -X POST \
  'https://docs.syncdocs.ai/_mock/api/workspace-openapi/content/sds-abc12345/fetch?cursor=123e4567-e89b-12d3-a456-426614174000&pageSize=20&fields=contentId%2CcategoryId%2CfileName' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "annual report 2024",
    "groupByVersion": false,
    "filters": {
      "contentId": "example-value",
      "categoryId": "example-value",
      "fileName": "example-value",
      "fileFormat": "example-value",
      "createdAt": "example-value",
      "updatedAt": "example-value",
      "metadata": {
        "property1": "example-value",
        "property2": "example-value"
      }
    }
  }'

Responses

Content items fetched successfully

Bodyapplication/json
contentItemsArray of objectsrequired
contentItems[].​contentIdstring(uuid)required
Example: "123e4567-e89b-12d3-a456-426614174000"
contentItems[].​categoryIdstring or null(uuid)
Example: "123e4567-e89b-12d3-a456-426614174001"
contentItems[].​dataspaceIdstring^sds-[a-z0-9]{8}$

Short dataspace ID with sds- prefix

Example: "sds-abc12345"
contentItems[].​metadataobject

Optional metadata for the content item

Example: {"category":"research","priority":1}
contentItems[].​inferenceTaskExecutionsobject

Optional record of inference task executions that modified this content

Example: {"categoryId":"789e0123-e89b-12d3-a456-426614174002"}
contentItems[].​fileFormatstring
Example: "application/pdf"
contentItems[].​fileNamestring
Example: "document.pdf"
contentItems[].​createdAtstring(date-time)
Example: "2024-01-15T10:30:00Z"
contentItems[].​updatedAtstring or null(date-time)
Example: "2024-01-15T14:30:00Z"
contentItems[].​relatedVersionsArray of objects or null

Related content versions that share the same version string (null when groupByVersion is false)

Example: [{"id":"456e7890-e89b-12d3-a456-426614174001","filename":"document_v1.pdf","created_at":"2024-01-15T10:30:00Z"},{"id":"789e0123-e89b-12d3-a456-426614174002","filename":"document_v2.pdf","created_at":"2024-01-16T14:20:00Z"}]
nextCursorstring(uuid)
Example: "123e4567-e89b-12d3-a456-426614174001"
totalItemsintegerrequired
Example: 42
Response
application/json
{ "contentItems": [ {} ], "nextCursor": "123e4567-e89b-12d3-a456-426614174001", "totalItems": 42 }

Ingest content with a workflow

Request

Triggers workflow execution for a specific content item and returns the complete workflow execution object. The system automatically selects the first available agent for the user's account. Workflow Ingestion Process: 1. Validates that the content item exists 2. Validates that the specified workflow exists 3. Automatically selects the first available agent for the user's account 4. Creates a workflow execution record 5. Executes all tasks in the workflow sequentially in the background using the selected agent 6. Returns the complete workflow execution object immediately Response Object: The endpoint returns a complete workflow execution object containing: - id: Unique identifier for this workflow execution - workflowId: ID of the workflow being executed - contentId: ID of the content being processed - dataspaceId: ID of the dataspace - status: Current status ('started', 'completed', or 'failed') - startedAt: Timestamp when execution began - completedAt: Timestamp when execution finished (null if still running) - errorMessage: Error details if execution failed (null if successful) Features: - Asynchronous workflow execution - Comprehensive validation before execution - Automatic agent selection for the user's account - Detailed logging and error handling - Database tracking of workflow and task executions - Complete workflow execution object response Example Usage: POST /api/content/sds-12345678/550e8400-e29b-41d4-a716-446655440000/ingest?workflowId=8a0667a8-a35e-4b0a-8a95-07b4fd5ac7de The workflow will execute in the background, and you can monitor its progress using the returned workflow execution object.

Security
bearerAuth
Path
dataspaceIdstring^sds-[a-z0-9]{8}$required

Dataspace ID with sds- prefix

Example: sds-abc12345
contentIdstring(uuid)required

UUID of the content item

Example: 123e4567-e89b-12d3-a456-426614174000
Query
workflowIdstring(uuid)required

UUID of the workflow to execute

Example: workflowId=123e4567-e89b-12d3-a456-426614174002
curl -i -X POST \
  'https://docs.syncdocs.ai/_mock/api/workspace-openapi/content/sds-abc12345/123e4567-e89b-12d3-a456-426614174000/ingest?workflowId=123e4567-e89b-12d3-a456-426614174002' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Workflow ingestion started successfully

Bodyapplication/json
idstring(uuid)required
Example: "123e4567-e89b-12d3-a456-426614174000"
workflowIdstring(uuid)required
Example: "987fcdeb-51a2-43d1-9c4e-5f6e7d8c9a0b"
primaryScopeObjectIdstring(uuid)required
Example: "456e7890-e89b-12d3-a456-426614174001"
primaryScopeDataspaceIdstring^sds-[a-z0-9]{8}$required

Short dataspace ID with sds- prefix

Example: "sds-abc12345"
statusstringrequired
Enum"started""completed""failed"
Example: "completed"
startedAtstring(date-time)required
Example: "2025-01-15T10:30:00Z"
completedAtstring or null(date-time)required
Example: "2025-01-15T10:35:00Z"
errorMessagestring or nullrequired
Example: "Workflow execution failed at step 3"
Response
application/json
{ "id": "123e4567-e89b-12d3-a456-426614174000", "workflowId": "987fcdeb-51a2-43d1-9c4e-5f6e7d8c9a0b", "primaryScopeObjectId": "456e7890-e89b-12d3-a456-426614174001", "primaryScopeDataspaceId": "sds-abc12345", "status": "completed", "startedAt": "2025-01-15T10:30:00Z", "completedAt": "2025-01-15T10:35:00Z", "errorMessage": "Workflow execution failed at step 3" }

Query content using AI assistant with vector store access

Request

Performs intelligent queries on content using OpenAI's assistant with vector store access. Query Process: 1. Agent Selection: Uses the specified agent's instructions as the system prompt, or defaults to research assistant instructions 2. Content Filtering: Uses the provided filters to select relevant content items from the dataspace 3. Vector Store Access: Retrieves the dataspace's vector store containing document embeddings 4. AI Assistant Creation: Creates a temporary OpenAI assistant with access to the vector store 5. Query Execution: Processes the user's query against the filtered content using the AI assistant 6. Citation Parsing: Extracts file IDs from the AI response citations 7. Content Retrieval: Fetches full content objects for all cited documents Agent System: - Optional Agent ID: Provide an agentId to use custom agent instructions as the system prompt - Default Behavior: Without an agent ID, uses built-in research assistant instructions - Agent Instructions: The agent's instructions field becomes the system prompt for the AI assistant - Research Agent: Look for an agent named "Research Assistant Agent" for the default research experience Request Body: - filters: Advanced filtering options to select specific content (uses unified ContentFiltersSchema) - query: The question or query to ask about the filtered content - agentId: (Optional) UUID of the agent whose instructions to use as system prompt Response Fields: - query: The original user query - response: AI assistant's response with citations in simplified format - analyzedDocumentCount: Number of documents that were analyzed and available for querying - citedContent: Array of full content objects that were actually cited in the AI response Citation Format: The AI response includes citations in simplified format: 【0】, 【1】, etc., where numbers reference the citedContent array indices. Performance Notes: - Creates and destroys a temporary OpenAI assistant for each query - Processes up to 9999 content items for analysis - Response time depends on query complexity and document count - Agent lookup adds minimal overhead when agent ID is provided

Security
bearerAuth
Path
dataspaceIdstring^sds-[a-z0-9]{8}$required

Short dataspace ID with sds- prefix

Example: sds-abc12345
Bodyapplication/json
querystringnon-emptyrequired

The question or query to ask about the filtered content

Example: "What are the main themes discussed in these documents?"
agentIdstring

Optional agent ID to use for the query. If provided, the agent's instructions will be used as the system prompt.

Example: "01234567-89ab-cdef-0123-456789abcdef"
contextobject

Optional context configuration for content sources and filters

curl -i -X POST \
  https://docs.syncdocs.ai/_mock/api/workspace-openapi/content/sds-abc12345/query \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "What are the main themes discussed in these documents?",
    "agentId": "01234567-89ab-cdef-0123-456789abcdef",
    "context": {
      "contentFilters": {
        "contentId": "example-value",
        "categoryId": "example-value",
        "fileName": "example-value",
        "fileFormat": "example-value",
        "createdAt": "example-value",
        "updatedAt": "example-value",
        "metadata": {
          "property1": "example-value",
          "property2": "example-value"
        }
      },
      "libraries": [
        "01234567-89ab-cdef-0123-456789abcdef"
      ],
      "includeWebSearchResults": false
    }
  }'

Responses

Successfully queried content using AI assistant

Bodyapplication/json
querystringrequired

The original query that was asked

Example: "What are the main themes discussed in these documents?"
responsestringrequired

The AI assistant's response to the query

Example: "Based on the documents in your collection, the main themes include..."
analyzedDocumentCountintegerrequired

Number of documents that were analyzed and available for querying

Example: 15
citedContentArray of objectsrequired

Array of content items that were cited in the AI response, including citation numbers

Example: []
citedContent[].​contentIdstring(uuid)required

Unique identifier for the content item

Example: "123e4567-e89b-12d3-a456-426614174000"
citedContent[].​dataspaceIdstring^sds-[a-z0-9]{8}$required

Short dataspace ID with sds- prefix

Example: "sds-abc12345"
citedContent[].​fileNamestringrequired

Name of the uploaded file

Example: "document.pdf"
citedContent[].​fileFormatstringrequired

MIME type of the file

Example: "application/pdf"
citedContent[].​createdAtstring(date-time)required

ISO timestamp when the content was created

Example: "2024-01-15T10:30:00Z"
citedContent[].​updatedAtstring(date-time)required

ISO timestamp when the content was last updated

Example: "2024-01-15T14:30:00Z"
citedContent[].​categoryIdstring or null(uuid)

UUID of the category this content belongs to

Example: "123e4567-e89b-12d3-a456-426614174001"
citedContent[].​metadataobject or null

Optional metadata for the content item

Example: {"author":"John Doe","version":1,"published":true}
citedContent[].​inferenceTaskExecutionsobject or null

Record of inference task executions that modified this content, mapping inference type to task execution ID

Example: {"categoryId":"789e0123-e89b-12d3-a456-426614174002"}
citedContent[].​versionStringstring or null

Version identifier based on category and unique metadata

Example: "research_v2_final"
citedContent[].​fileUrlstring or null(uri)

Public URL to access the file

Example: "https://api.example.com/files/sds-abc12345/content/123e4567-e89b-12d3-a456-426614174000/document.pdf"
citedContent[].​fileSizeinteger or null

Size of the file in bytes

Example: 2048576
citedContent[].​taskExecutionDetailsobject or null

Detailed information about task executions

Example: {"categoryId":{"status":"completed","confidence":"high"}}
citedContent[].​relatedVersionsArray of objects or null

Related content items with the same version string

Example: []
citedContent[].​citationNumberinteger>= 1

Citation number used in the AI response (e.g., [1], [2], etc.)

Example: 1
webSearchResultsArray of objectsrequired

Array of web search results that were included in the AI response

Example: []
webSearchResults[].​titlestringrequired

Title of the web search result

Example: "Sample Article Title"
webSearchResults[].​urlstring(uri)required

URL of the web search result

Example: "https://example.com/article"
webSearchResults[].​snippetstringrequired

Snippet/preview text from the web search result

Example: "This article discusses..."
webSearchResults[].​relevanceScorenumber[ 0 .. 1 ]required

Relevance score from 0 to 1

Example: 0.85
webSearchResults[].​citationNumberinteger>= 1

Citation number used in the AI response (e.g., [100], [101], etc.)

Example: 100
citedLibraryPagesArray of objectsrequired

Array of library pages that were cited in the AI response

Example: []
citedLibraryPages[].​idstring(uuid)required

Unique identifier for the source file

Example: "01234567-89ab-cdef-0123-456789abcdef"
citedLibraryPages[].​libraryIdstring(uuid)required

ID of the library this page belongs to

Example: "01234567-89ab-cdef-0123-456789abcdef"
citedLibraryPages[].​urlstring(uri)required

URL of the original web page

Example: "https://example.com/page"
citedLibraryPages[].​titlestring

Title of the web page

Example: "Example Page Title"
citedLibraryPages[].​domainstring

Domain of the web page

Example: "example.com"
citedLibraryPages[].​contentTypestring

Content type of the page

Example: "text/html"
citedLibraryPages[].​scrapedAtstring

When the page was scraped

Example: "2024-01-01T00:00:00Z"
citedLibraryPages[].​relevanceScorenumber[ 0 .. 1 ]

Relevance score for this citation

Example: 0.92
citedLibraryPages[].​citationNumberinteger>= 1

Citation number used in the AI response

Example: 2
Response
application/json
{ "query": "What are the main themes discussed in these documents?", "response": "Based on the documents in your collection, the main themes include...", "analyzedDocumentCount": 15, "citedContent": [], "webSearchResults": [], "citedLibraryPages": [] }

Projects

Project management operations. Projects group content items according to business workflows and processes.

Operations

Workflow Executions

Workflow execution monitoring operations. Track the status and progress of AI workflow executions on content.

Operations

Batch Workflow Executions

Batch workflow execution operations. Execute workflows on multiple content items based on filters across multiple dataspaces.

Operations

Task Executions

Task execution monitoring operations. Track individual task executions within workflows and retrieve their outputs.

Operations

Task Execution Outputs

Task execution output retrieval operations. Access the results and outputs generated by completed task executions.

Operations

Registered Workflows

Registered workflow operations. Access workflows cached from sync-apis for fast lookup during workflow execution.

Operations

Query Logs

Query logging and retrieval operations. Track and analyze API operations performed on resources with detailed audit trails.

Operations

Content Upload Sessions

Content upload session management operations. Handle reliable file uploads through chunked upload sessions with progress tracking.

Operations