A Workspace is the basic unit in DocFlow for organizing and isolating document processing tasks. Each workspace can contain file categories, review rule repositories, and other resources, facilitating multi-tenant or multi-project management.
This guide introduces how to use workspace-related APIs: create, list, get, update, and delete.
Create Workspace
Create a new workspace:
curl -X POST \
-H "x-ti-app-id: <your-app-id>" \
-H "x-ti-secret-code: <your-secret-code>" \
-H "Content-Type: application/json" \
-d '{
"name": "My Workspace",
"description": "This is a workspace for processing invoices",
"enterprise_id": 12345,
"auth_scope": 1
}' \
"https://docflow.textin.com/api/app-api/sip/platform/v2/workspace/create"
Request Parameters:
name (required): Workspace name, max length 50
description (optional): Workspace description, max length 200
enterprise_id (required): Enterprise organization ID
auth_scope (required): Collaboration scope, 0: Private, 1: Enterprise-wide
Response Example:
{
"code": 200,
"msg": "success",
"result": {
"workspace_id": "1234567890"
}
}
List Workspaces
Get all workspaces for the current user:
curl \
-H "x-ti-app-id: <your-app-id>" \
-H "x-ti-secret-code: <your-secret-code>" \
"https://docflow.textin.com/api/app-api/sip/platform/v2/workspace/list?enterprise_id=12345&page=1&page_size=20"
Request Parameters:
enterprise_id (required): Enterprise ID
page (optional): Page number, default is 1
page_size (optional): Items per page, default is 20
Response Example:
{
"code": 200,
"msg": "success",
"result": {
"total": 10,
"page": 1,
"page_size": 20,
"workspaces": [
{
"workspace_id": "1234567890",
"name": "My Workspace",
"description": "This is a workspace for processing invoices",
"auth_scope": 1,
"manage_account_id": "admin_123456",
"manage_account_name": "John Doe",
"callback_url": "https://example.com/callback",
"callback_retry_time": 3
}
]
}
}
Get Workspace Details
Get detailed information about a workspace by its ID:
curl \
-H "x-ti-app-id: <your-app-id>" \
-H "x-ti-secret-code: <your-secret-code>" \
"https://docflow.textin.com/api/app-api/sip/platform/v2/workspace/get?workspace_id=1234567890"
Request Parameters:
workspace_id (required): Workspace ID
Update Workspace
Update information for a specified workspace:
curl -X POST \
-H "x-ti-app-id: <your-app-id>" \
-H "x-ti-secret-code: <your-secret-code>" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": "1234567890",
"name": "Updated Workspace Name",
"description": "Updated description",
"auth_scope": 1,
"callback_url": "https://example.com/callback",
"callback_retry_time": 3
}' \
"https://docflow.textin.com/api/app-api/sip/platform/v2/workspace/update"
Request Parameters:
workspace_id (required): Workspace ID
name (required): Workspace name, max length 50
description (optional): Workspace description, max length 200
auth_scope (required): Collaboration scope, 0: Private, 1: Enterprise-wide
callback_url (optional): Callback URL
callback_retry_time (optional): Number of callback retries, range 0-3
Delete Workspace
Delete specified workspace(s) (supports batch deletion):
curl -X POST \
-H "x-ti-app-id: <your-app-id>" \
-H "x-ti-secret-code: <your-secret-code>" \
-H "Content-Type: application/json" \
-d '{
"workspace_ids": ["1234567890", "0987654321"]
}' \
"https://docflow.textin.com/api/app-api/sip/platform/v2/workspace/delete"
Request Parameters:
workspace_ids (required): Array of workspace IDs to delete
Deleting a workspace will also delete all resources under it (including file categories, review rule repositories, etc.). Please proceed with caution.
Next Steps