Account management operations. Each account represents a unique enterprise customer with isolated resources.
SyncDocs Admin API (1.0.0)
Complete enterprise content management system (ECM) core APIs for accessing ECM functionality programmatically.
When you start with Sync, you are assigned an Account with a unique ID. Each account can have:
- Dataspaces: Fully isolated data segments within an account, similar to separate databases. Each dataspace is used to isolate different business use cases within a single enterprise. - Workspaces: Virtual computing resources for storing, retrieving and manipulating content (managed separately via Workspace APIs) - Libraries: External content sources that can be scraped and indexed for use as citation sources in AI queries - Users and Agents: Can interact with Dataspaces/Workspaces with assigned roles - Ontologies: Define how content is organized within dataspaces
Each Dataspace contains: - A unique Ontology that defines the business-purpose categorization and metadata structure - Categories: Represent the grouping or classification of content (taxonomy) - Metadata Queries: Specific metadata fields that can be associated with content and bound to categories - A collection of Content and Projects (managed via Workspace APIs)
Metadata Queries can be bound to Categories to indicate required attributes for content in that category. When binding, you can specify: - Whether the attribute is required/mandatory for every Content item in that category - Whether the attribute should be part of the Unique Index (content with same unique index values are considered versions of the same content)
Data type of the metadata query
- Mock serverhttps://docs.syncdocs.ai/_mock/api/sync-cloud-openapi/accounts/{accountId}/ontologies/{ontologyId}/metadata-queries
- Production - Sync Cloud Admin Serviceshttps://cloud.syncdocs.ai/api/accounts/{accountId}/ontologies/{ontologyId}/metadata-queries
- Development serverhttps://docs.syncdocs.ai/api/accounts/{accountId}/ontologies/{ontologyId}/metadata-queries
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.syncdocs.ai/_mock/api/sync-cloud-openapi/accounts/scd-k2j8n4m1/ontologies/123e4567-e89b-12d3-a456-426614174001/metadata-queries \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Author Name",
"description": "The name of the document author",
"dataType": "STRING",
"instructions": "Extract the full name of the primary author from the document header or byline"
}'{ "id": "123e4567-e89b-12d3-a456-426614174001", "name": "Author Name", "description": "The name of the document author", "dataType": "STRING", "instructions": "Extract the full name of the primary author from the document header or byline", "ontologyId": "987fcdeb-51a2-43d1-9c4e-5f6e7d8c9a0b", "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T14:30:00Z" }
- Mock serverhttps://docs.syncdocs.ai/_mock/api/sync-cloud-openapi/accounts/{accountId}/ontologies/{ontologyId}/metadata-queries
- Production - Sync Cloud Admin Serviceshttps://cloud.syncdocs.ai/api/accounts/{accountId}/ontologies/{ontologyId}/metadata-queries
- Development serverhttps://docs.syncdocs.ai/api/accounts/{accountId}/ontologies/{ontologyId}/metadata-queries
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://docs.syncdocs.ai/_mock/api/sync-cloud-openapi/accounts/scd-k2j8n4m1/ontologies/123e4567-e89b-12d3-a456-426614174001/metadata-queries \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'List of metadata queries with category bindings
List of categories this metadata query is bound to with binding properties
The ID of the category this metadata query is bound to
The name of the category this metadata query is bound to
Whether this metadata query is required for this category
[ { "id": "e81bb521-4b01-45ca-a74e-c52c52363181", "name": "Permit Number", "description": "The official permit number assigned by the city", "dataType": "SHORT_STRING", "instructions": "Extract the permit number from the document header or official stamp", "ontologyId": "987fcdeb-51a2-43d1-9c4e-5f6e7d8c9a0b", "createdAt": "2025-01-15T10:30:00Z", "updatedAt": null, "categoryBindings": [ … ] }, { "id": "6bbda475-2aa6-4e36-966c-40f161cce13d", "name": "Inspector Name", "description": "Name of the assigned inspector", "dataType": "STRING", "instructions": "Please extract the full name of the inspector from this document.", "ontologyId": "987fcdeb-51a2-43d1-9c4e-5f6e7d8c9a0b", "createdAt": "2025-01-15T10:32:00Z", "updatedAt": "2025-01-16T14:20:00Z", "categoryBindings": [ … ] } ]
- Mock serverhttps://docs.syncdocs.ai/_mock/api/sync-cloud-openapi/accounts/{accountId}/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}
- Production - Sync Cloud Admin Serviceshttps://cloud.syncdocs.ai/api/accounts/{accountId}/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}
- Development serverhttps://docs.syncdocs.ai/api/accounts/{accountId}/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.syncdocs.ai/_mock/api/sync-cloud-openapi/accounts/scd-k2j8n4m1/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Metadata key details with category bindings
List of categories this metadata query is bound to with binding properties
The ID of the category this metadata query is bound to
The name of the category this metadata query is bound to
Whether this metadata query is required for this category
{ "id": "e81bb521-4b01-45ca-a74e-c52c52363181", "name": "Permit Number", "description": "The official permit number assigned by the city", "dataType": "SHORT_STRING", "instructions": "Extract the permit number from the document header or official stamp", "ontologyId": "987fcdeb-51a2-43d1-9c4e-5f6e7d8c9a0b", "createdAt": "2025-01-15T10:30:00Z", "updatedAt": null, "categoryBindings": [ { … }, { … } ] }
Description of the metadata query
Data type of the metadata query
- Mock serverhttps://docs.syncdocs.ai/_mock/api/sync-cloud-openapi/accounts/{accountId}/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}
- Production - Sync Cloud Admin Serviceshttps://cloud.syncdocs.ai/api/accounts/{accountId}/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}
- Development serverhttps://docs.syncdocs.ai/api/accounts/{accountId}/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://docs.syncdocs.ai/_mock/api/sync-cloud-openapi/accounts/scd-k2j8n4m1/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Updated Author Name",
"description": "Updated description of the author field",
"dataType": "STRING",
"instructions": "Extract the full name of the primary author from the document header or byline"
}'{ "id": "123e4567-e89b-12d3-a456-426614174001", "name": "Author Name", "description": "The name of the document author", "dataType": "STRING", "instructions": "Extract the full name of the primary author from the document header or byline", "ontologyId": "987fcdeb-51a2-43d1-9c4e-5f6e7d8c9a0b", "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T14:30:00Z" }
- Mock serverhttps://docs.syncdocs.ai/_mock/api/sync-cloud-openapi/accounts/{accountId}/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}
- Production - Sync Cloud Admin Serviceshttps://cloud.syncdocs.ai/api/accounts/{accountId}/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}
- Development serverhttps://docs.syncdocs.ai/api/accounts/{accountId}/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://docs.syncdocs.ai/_mock/api/sync-cloud-openapi/accounts/scd-k2j8n4m1/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'- Mock serverhttps://docs.syncdocs.ai/_mock/api/sync-cloud-openapi/accounts/{accountId}/ontologies/{ontologyId}/categories/{categoryId}/bindings/{metadataQueryId}
- Production - Sync Cloud Admin Serviceshttps://cloud.syncdocs.ai/api/accounts/{accountId}/ontologies/{ontologyId}/categories/{categoryId}/bindings/{metadataQueryId}
- Development serverhttps://docs.syncdocs.ai/api/accounts/{accountId}/ontologies/{ontologyId}/categories/{categoryId}/bindings/{metadataQueryId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://docs.syncdocs.ai/_mock/api/sync-cloud-openapi/accounts/scd-k2j8n4m1/ontologies/{ontologyId}/categories/{categoryId}/bindings/{metadataQueryId}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"uniqueIndexElement": false,
"required": true
}'{ "id": "123e4567-e89b-12d3-a456-426614174001", "name": "Research Papers", "description": "Academic research papers and publications", "metadataQueryBindings": [ "497f6eca-6276-4993-bfeb-53cbbbba6f08" ] }
- Mock serverhttps://docs.syncdocs.ai/_mock/api/sync-cloud-openapi/accounts/{accountId}/ontologies/{ontologyId}/categories/{categoryId}/bindings/{metadataQueryId}
- Production - Sync Cloud Admin Serviceshttps://cloud.syncdocs.ai/api/accounts/{accountId}/ontologies/{ontologyId}/categories/{categoryId}/bindings/{metadataQueryId}
- Development serverhttps://docs.syncdocs.ai/api/accounts/{accountId}/ontologies/{ontologyId}/categories/{categoryId}/bindings/{metadataQueryId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://docs.syncdocs.ai/_mock/api/sync-cloud-openapi/accounts/scd-k2j8n4m1/ontologies/{ontologyId}/categories/{categoryId}/bindings/{metadataQueryId}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Request
Returns the number of categories that currently use this metadata query. Features: - Efficient counting using SQL COUNT queries with JOIN - Returns exact count of categories bound to the metadata query - Useful for impact analysis before metadata query changes - Supports ontology change management workflows Use Cases: - Determine impact before deleting a metadata query - Analyze metadata query usage across categories - Support ontology change management decisions - Dashboard statistics for metadata query utilization Example Usage: - GET /accounts/acc-12345678/ontologies/ont-87654321/metadata-queries/123e4567-e89b-12d3-a456-426614174000/usage-count Response: Returns a simple count object indicating how many categories are currently bound to this metadata query. Performance: - Optimized for large ontologies using database indexes - Uses SQL COUNT with JOIN for efficient counting - Returns exact counts without loading category data into memory
- Mock serverhttps://docs.syncdocs.ai/_mock/api/sync-cloud-openapi/accounts/{accountId}/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}/usage-count
- Production - Sync Cloud Admin Serviceshttps://cloud.syncdocs.ai/api/accounts/{accountId}/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}/usage-count
- Development serverhttps://docs.syncdocs.ai/api/accounts/{accountId}/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}/usage-count
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.syncdocs.ai/_mock/api/sync-cloud-openapi/accounts/scd-k2j8n4m1/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}/usage-count' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "count": 3 }