Submit a workspace-creation task¶
Submit an asynchronous workspace-creation task. When the request is accepted, the API immediately returns a task record; it does not wait for the workspace to be created in this response.
The current console uses this API to create workspaces. To wait synchronously for the creation result, use Create a workspace.
POST https://moi.matrixorigin.cn/newmoi/workspaces/creations
Before you call¶
Determine the new workspace name. Prepare a personal access token. You do not need to enter a workspace before calling this API.
Request body¶
Replace $AI_STUDIO_API_KEY and $WORKSPACE_NAME with actual values.
curl -X POST "https://moi.matrixorigin.cn/newmoi/workspaces/creations" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "'"$WORKSPACE_NAME"'"
}'
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Name of the workspace to create. It cannot be empty after trimming leading and trailing whitespace. |
Successful response¶
On success, the API returns 202. data is the creation task submitted by this request, not a completed workspace.
{
"code": "OK",
"msg": "OK",
"data": {
"id": "creation_01",
"name": "Analytics workspace",
"status": "pending",
"created_at": "2026-08-28T09:00:00Z",
"updated_at": "2026-08-28T09:00:00Z"
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
string |
Workspace-creation task ID. |
|
string |
Name of the workspace to create. |
|
string |
Task status: |
|
string |
Created workspace ID. Omitted if creation has not succeeded. |
|
string |
Error code when creation fails. Omitted otherwise. |
|
string |
Task creation time. |
|
string |
Task update time. |
Error response¶
{
"code": "ErrParamInvalid",
"msg": "Name cannot be empty",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
Error code. |
|
string |
Human-readable error message. |
|
null |
|
Next steps¶
Use List workspace-creation tasks to follow task status. After the status is succeeded and workspace_id appears, list workspaces to confirm that the workspace is accessible.