# SyncDocs Admin API # SyncDocs Admin API Complete enterprise content management system (ECM) core APIs for accessing ECM functionality programmatically. ## Architecture Overview 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 ## Dataspace Resources 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 Query Binding 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) ## Authentication All endpoints require authentication using a bearer token and a valid account ID. Version: 1.0.0 License: Proprietary ## Servers Production - Sync Cloud Admin Services ``` https://cloud.syncdocs.ai/api ``` Development server ``` /api ``` ## Security ### bearerAuth Type: http Scheme: bearer Bearer Format: JWT ## Download OpenAPI description [SyncDocs Admin API](https://docs.syncdocs.ai/_bundle/api/sync-cloud-openapi.yaml) ## Accounts Account management operations. Each account represents a unique enterprise customer with isolated resources. ### Create a new account - [POST /accounts](https://docs.syncdocs.ai/api/sync-cloud-openapi/accounts/createaccount.md) ### List all accounts - [GET /accounts](https://docs.syncdocs.ai/api/sync-cloud-openapi/accounts/listaccounts.md) ### Get an account by ID - [GET /accounts/{accountId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/accounts/getaccount.md) ### Update an account - [PUT /accounts/{accountId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/accounts/updateaccount.md) ### Delete an account - [DELETE /accounts/{accountId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/accounts/deleteaccount.md) ## Dataspaces Dataspace management operations. Dataspaces are fully isolated data segments within an account, similar to separate databases for different business use cases. ### Create a new dataspace - [POST /accounts/{accountId}/dataspaces](https://docs.syncdocs.ai/api/sync-cloud-openapi/dataspaces/createdataspace.md): Create a new dataspace in an account. Requires authentication. ### List all dataspaces for an account - [GET /accounts/{accountId}/dataspaces](https://docs.syncdocs.ai/api/sync-cloud-openapi/dataspaces/listdataspaces.md): List all dataspaces in an account. Requires authentication. ### Get a dataspace by ID - [GET /accounts/{accountId}/dataspaces/{dataspaceId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/dataspaces/getdataspace.md): Get details of a specific dataspace. Requires authentication. ### Update a dataspace - [PUT /accounts/{accountId}/dataspaces/{dataspaceId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/dataspaces/updatedataspace.md): Update details of a specific dataspace. Requires authentication. ### Delete a dataspace - [DELETE /accounts/{accountId}/dataspaces/{dataspaceId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/dataspaces/deletedataspace.md): Delete a specific dataspace. Requires authentication. ## Workspaces Workspace management operations. Workspaces are virtual computing resources that provide stateless computational services for content processing. ### Create a new workspace - [POST /accounts/{accountId}/workspaces](https://docs.syncdocs.ai/api/sync-cloud-openapi/workspaces/createworkspace.md) ### List all workspaces for an account - [GET /accounts/{accountId}/workspaces](https://docs.syncdocs.ai/api/sync-cloud-openapi/workspaces/listworkspaces.md) ### Get a workspace by ID - [GET /accounts/{accountId}/workspaces/{workspaceId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/workspaces/getworkspace.md) ### Update a workspace - [PUT /accounts/{accountId}/workspaces/{workspaceId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/workspaces/updateworkspace.md) ### Delete a workspace - [DELETE /accounts/{accountId}/workspaces/{workspaceId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/workspaces/deleteworkspace.md) ## Ontologies Ontology management operations. Ontologies define the categorization, indexing and metadata tagging structure for content within dataspaces. ### Create a new ontology - [POST /accounts/{accountId}/ontologies](https://docs.syncdocs.ai/api/sync-cloud-openapi/ontologies/createontology.md) ### List all ontologies for an account - [GET /accounts/{accountId}/ontologies](https://docs.syncdocs.ai/api/sync-cloud-openapi/ontologies/listontologies.md) ### Get an ontology by ID - [GET /accounts/{accountId}/ontologies/{ontologyId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/ontologies/getontology.md) ### Update an ontology - [PUT /accounts/{accountId}/ontologies/{ontologyId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/ontologies/updateontology.md) ### Delete an ontology - [DELETE /accounts/{accountId}/ontologies/{ontologyId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/ontologies/deleteontology.md) ### Bulk update ontology with multiple operations - [POST /accounts/{accountId}/ontologies/{ontologyId}/bulk-update](https://docs.syncdocs.ai/api/sync-cloud-openapi/ontologies/bulkupdateontology.md): Perform multiple operations on an ontology including updating metadata queries, categories, and bindings in a single transaction ## Metadata Queries Metadata key management operations. Metadata keys define specific metadata fields that can be associated with content and bound to categories. ### Bind metadata query to a category - [PUT /accounts/{accountId}/ontologies/{ontologyId}/categories/{categoryId}/bindings/{metadataQueryId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/categories/bindmetadataquerytocategory.md) ### Unbind metadata query from a category - [DELETE /accounts/{accountId}/ontologies/{ontologyId}/categories/{categoryId}/bindings/{metadataQueryId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/categories/unbindmetadataqueryfromcategory.md) ### Create a new metadata query - [POST /accounts/{accountId}/ontologies/{ontologyId}/metadata-queries](https://docs.syncdocs.ai/api/sync-cloud-openapi/metadata-queries/createmetadataquery.md) ### List all metadata queries in an ontology - [GET /accounts/{accountId}/ontologies/{ontologyId}/metadata-queries](https://docs.syncdocs.ai/api/sync-cloud-openapi/metadata-queries/listmetadataqueries.md): Returns all metadata queries with their category bindings including binding properties (required, uniqueIndexElement) ### Get a metadata query by ID - [GET /accounts/{accountId}/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/metadata-queries/getmetadataquery.md): Returns a single metadata query with its category bindings including binding properties (required, uniqueIndexElement) ### Update a metadata query - [PUT /accounts/{accountId}/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/metadata-queries/updatemetadataquery.md) ### Delete a metadata query - [DELETE /accounts/{accountId}/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/metadata-queries/deletemetadataquery.md) ### Bind metadata query to a category - [PUT /accounts/{accountId}/ontologies/{ontologyId}/categories/{categoryId}/bindings/{metadataQueryId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/metadata-queries/bindmetadataquerytocategory.md) ### Unbind metadata query from a category - [DELETE /accounts/{accountId}/ontologies/{ontologyId}/categories/{categoryId}/bindings/{metadataQueryId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/metadata-queries/unbindmetadataqueryfromcategory.md) ### Get metadata query usage count - [GET /accounts/{accountId}/ontologies/{ontologyId}/metadata-queries/{metadataQueryId}/usage-count](https://docs.syncdocs.ai/api/sync-cloud-openapi/metadata-queries/getmetadataqueryusagecount.md): 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 ## Categories Category management operations. Categories represent the grouping or classification of content within a dataspace (taxonomy). ### Bind metadata query to a category - [PUT /accounts/{accountId}/ontologies/{ontologyId}/categories/{categoryId}/bindings/{metadataQueryId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/categories/bindmetadataquerytocategory.md) ### Unbind metadata query from a category - [DELETE /accounts/{accountId}/ontologies/{ontologyId}/categories/{categoryId}/bindings/{metadataQueryId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/categories/unbindmetadataqueryfromcategory.md) ### Create a new category - [POST /accounts/{accountId}/ontologies/{ontologyId}/categories](https://docs.syncdocs.ai/api/sync-cloud-openapi/categories/createcategory.md): Creates a new category within an ontology. The new category will initially have no bound metadata queries. Use the metadata query binding endpoints to associate metadata queries with this category. ### List all categories in an ontology - [GET /accounts/{accountId}/ontologies/{ontologyId}/categories](https://docs.syncdocs.ai/api/sync-cloud-openapi/categories/listcategories.md): Returns all categories with their bound metadata queries. Each metadata query includes binding properties that define how the key is used within the category (required status and unique index participation). ### Get a category by ID - [GET /accounts/{accountId}/ontologies/{ontologyId}/categories/{categoryId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/categories/getcategory.md): Returns a single category with its bound metadata queries. Each metadata query includes binding properties that specify whether the key is required and whether it participates in the unique index for this category. ### Update a category - [PUT /accounts/{accountId}/ontologies/{ontologyId}/categories/{categoryId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/categories/updatecategory.md): Updates category properties (name, description, additional instructions). This endpoint does not modify metadata query bindings. Use the metadata query binding endpoints to manage key associations. ### Delete a category - [DELETE /accounts/{accountId}/ontologies/{ontologyId}/categories/{categoryId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/categories/deletecategory.md) ### Bind metadata query to a category - [PUT /accounts/{accountId}/ontologies/{ontologyId}/categories/{categoryId}/bindings/{metadataQueryId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/metadata-queries/bindmetadataquerytocategory.md) ### Unbind metadata query from a category - [DELETE /accounts/{accountId}/ontologies/{ontologyId}/categories/{categoryId}/bindings/{metadataQueryId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/metadata-queries/unbindmetadataqueryfromcategory.md) ## Users User management operations. Users can interact with dataspaces and workspaces with assigned roles and permissions. ### Create a new user for an account - [POST /accounts/{accountId}/users](https://docs.syncdocs.ai/api/sync-cloud-openapi/users/createuser.md) ### List all users for an account - [GET /accounts/{accountId}/users](https://docs.syncdocs.ai/api/sync-cloud-openapi/users/listusers.md) ### Get a specific user by ID - [GET /accounts/{accountId}/users/{userId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/users/getuser.md) ### Update a user - [PUT /accounts/{accountId}/users/{userId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/users/updateuser.md) ### Delete a user - [DELETE /accounts/{accountId}/users/{userId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/users/deleteuser.md) ## Libraries Library management operations. Libraries are external content sources that can be scraped and indexed for use as citation sources in AI queries. ### Create a new library - [POST /accounts/{accountId}/libraries](https://docs.syncdocs.ai/api/sync-cloud-openapi/libraries/createlibrary.md): Creates a new library within an account. Libraries can be bound to workspaces to provide access to external resources via their root URL. ### List all libraries in an account - [GET /accounts/{accountId}/libraries](https://docs.syncdocs.ai/api/sync-cloud-openapi/libraries/listlibraries.md): Returns all libraries owned by the account. ### Get a library by ID - [GET /accounts/{accountId}/libraries/{libraryId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/libraries/getlibrary.md): Returns a single library with its details. ### Update a library - [PUT /accounts/{accountId}/libraries/{libraryId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/libraries/updatelibrary.md): Updates library properties (name, root URL). This endpoint does not modify workspace bindings. ### Delete a library - [DELETE /accounts/{accountId}/libraries/{libraryId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/libraries/deletelibrary.md): Deletes a library and all its workspace bindings. This action cannot be undone. ## Library Bindings Library binding operations. Bind libraries to workspaces to enable access to library content for AI queries. ### Bind a library to a workspace - [POST /accounts/{accountId}/workspaces/{workspaceId}/libraries](https://docs.syncdocs.ai/api/sync-cloud-openapi/library-bindings/bindlibrarytoworkspace.md): Creates a binding between a library and a workspace, allowing the workspace to access the library's resources. ### List libraries bound to a workspace - [GET /accounts/{accountId}/workspaces/{workspaceId}/libraries](https://docs.syncdocs.ai/api/sync-cloud-openapi/library-bindings/listworkspacelibraries.md): Returns all libraries bound to the specified workspace with their binding information. ### Remove a library binding from a workspace - [DELETE /accounts/{accountId}/workspaces/{workspaceId}/libraries/{libraryId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/library-bindings/removelibraryfromworkspace.md): Removes the binding between a library and a workspace. The library itself is not deleted. ## Agents Agent management operations. Agents are automated entities that can perform operations on behalf of users. ### Create a new AI agent for an account - [POST /accounts/{accountId}/agents](https://docs.syncdocs.ai/api/sync-cloud-openapi/agents/createagent.md): Creates a new AI agent with specified instructions and behavior for the account ### List all agents for an account - [GET /accounts/{accountId}/agents](https://docs.syncdocs.ai/api/sync-cloud-openapi/agents/listagents.md): Retrieves a list of all AI agents associated with the specified account ### Get a specific agent by ID - [GET /accounts/{accountId}/agents/{agentId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/agents/getagent.md): Retrieves detailed information about a specific AI agent ### Update an existing agent - [PUT /accounts/{accountId}/agents/{agentId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/agents/updateagent.md): Updates the properties of an existing AI agent ### Delete an agent - [DELETE /accounts/{accountId}/agents/{agentId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/agents/deleteagent.md): Permanently deletes an AI agent from the account ## Workflows Workflow management operations. Workflows define automated processes for content handling and business logic. ### Create a new workflow for an account - [POST /accounts/{accountId}/workflows](https://docs.syncdocs.ai/api/sync-cloud-openapi/workflows/createworkflow.md): Creates a new workflow with specified name, description, and task DAG for the account ### List all workflows for an account - [GET /accounts/{accountId}/workflows](https://docs.syncdocs.ai/api/sync-cloud-openapi/workflows/listworkflows.md): Retrieves a list of all workflows associated with the specified account ### Get a specific workflow by ID - [GET /accounts/{accountId}/workflows/{workflowId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/workflows/getworkflow.md): Retrieves detailed information about a specific workflow including its task DAG ### Update an existing workflow - [PUT /accounts/{accountId}/workflows/{workflowId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/workflows/updateworkflow.md): Updates the properties of an existing workflow including name, description, and task DAG ### Delete a workflow - [DELETE /accounts/{accountId}/workflows/{workflowId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/workflows/deleteworkflow.md): Permanently deletes a workflow from the account ## Task Definitions Task definition management operations ### Create a new task definition for an account - [POST /accounts/{accountId}/task-definitions](https://docs.syncdocs.ai/api/sync-cloud-openapi/task-definitions/createtaskdefinition.md): Creates a new task definition with specified model, and instructions for the task ### List all task definitions for an account - [GET /accounts/{accountId}/task-definitions](https://docs.syncdocs.ai/api/sync-cloud-openapi/task-definitions/listtaskdefinitions.md): Retrieves a list of all task definitions associated with the specified account ### Get a specific task definition by ID - [GET /accounts/{accountId}/task-definitions/{taskDefinitionId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/task-definitions/gettaskdefinition.md): Retrieves detailed information about a specific task definition ### Update an existing task definition - [PUT /accounts/{accountId}/task-definitions/{taskDefinitionId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/task-definitions/updatetaskdefinition.md): Updates the properties of an existing task definition ### Delete a task definition - [DELETE /accounts/{accountId}/task-definitions/{taskDefinitionId}](https://docs.syncdocs.ai/api/sync-cloud-openapi/task-definitions/deletetaskdefinition.md): Permanently deletes a task definition from the account ## Helpers Helper utility operations ### Resolve user accounts by email - [GET /helpers/resolve-user-accounts](https://docs.syncdocs.ai/api/sync-cloud-openapi/helpers/resolveuseraccounts.md): Resolve all accounts associated with a given email address. Returns only account IDs for privacy.