Precheck Agent Import File
Precheck Agent Import File
Supports prechecking whether a .bot file can be imported, without writing business resources.
You can use this endpoint to precheck whether a .bot file can be imported. The precheck only parses and security-scans the file; it does not write the Agent, API Key, skills, data groups, or plugin relationships.
Request Method
POST
Request URL
https://api.${endpoint}/v1/org/agent/import/precheck
Request Authentication
Uses account-level DevKey / DevSecret Basic authentication, and requires the calling account to have organization Agent creation permission.
Request
Request Example
curl -X POST 'https://api.${endpoint}/v1/org/agent/import/precheck' \
-H 'Authorization: Basic ${BASIC_TOKEN}' \
-F 'file=@/path/to/agent.bot' \
-F 'org_id=p-xxxx'
curl -X POST 'https://api.${endpoint}/v1/org/agent/import/precheck' \
-H 'Authorization: Basic ${BASIC_TOKEN}' \
-F 'file=@/path/to/agent.bot' \
-F 'org_id=p-xxxx'
This code block in the floating window
Request Headers
| Field | Type | Description |
|---|---|---|
| Authorization | Basic ${BASIC_TOKEN} | The Basic Token obtained by Base64-encoding DevKey:DevSecret. |
| Content-Type | multipart/form-data | File upload form. |
Request Parameters (Form Data)
| Parameter | Type | Description | required |
|---|---|---|---|
| file | File | .bot file. |
true |
| org_id | String | Organization ID. | true |
Response
Response Example
{
"code": 0,
"message": "OK",
"data": {
"valid": true,
"error_message": null,
"export_type": "BOT",
"bot_type": "Agent",
"name": "Imported Agent",
"logo": "https://cdn.example.com/agent.png",
"introduction": "Agent introduction",
"format_version": "1.0"
}
}
{
"code": 0,
"message": "OK",
"data": {
"valid": true,
"error_message": null,
"export_type": "BOT",
"bot_type": "Agent",
"name": "Imported Agent",
"logo": "https://cdn.example.com/agent.png",
"introduction": "Agent introduction",
"format_version": "1.0"
}
}
This code block in the floating window
Success Response
| Field | Type | Description |
|---|---|---|
| valid | Boolean | Whether the file can be imported. |
| error_message | String | Error message when the file cannot be imported. |
| export_type | String | Export file type. |
| bot_type | String | Agent type: Agent, FlowAgent, LoopAgent, Audio. |
| name | String | Resource name within the file. |
| logo | String | Icon URL. |
| introduction | String | Introduction. |
| format_version | String | File format version. |
Failure Response
| Field | Type | Description |
|---|---|---|
| code | Integer | Error code. |
| message | String | Error details. |
Status Codes
| Status Code | Description |
|---|---|
| 200 | Success |
| 400 | Parameter error |
| 401 | Unauthorized |
| 403 | Insufficient permissions |
| 429 | Too many requests |
| 500 | Server error |
