> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# App Export API

<Badge icon="arrow-left" color="gray">[Back to API List](/ai-for-service/apis/searchai/api-list)</Badge>

The Search AI App Export API enables you to programmatically export search application configurations. The export is handled as an asynchronous process:

1. **Initiate Export** — Submit an export request specifying the features to export.
2. **Poll Job Status** — Check export status and download the configuration file when the job completes successfully.

## Step 1: Initiate App Export

Creates an asynchronous export job for the search application configuration. Only the features listed in the request are exported.

|                   |                                                        |
| ----------------- | ------------------------------------------------------ |
| **Method**        | POST                                                   |
| **Endpoint**      | `{HOST_NAME}/api/public/bot/{botId}/search/app-export` |
| **Content-Type**  | `application/json`                                     |
| **Authorization** | `auth: {{JWT}}`                                        |
| **API Scope**     | Search AI Export                                       |

### Query Parameters

| Parameter | Description          | Mandatory |
| --------- | -------------------- | --------- |
| Bot ID    | Your application ID. | Yes       |

### Request Parameters

| Parameter  | Description                                                                                                                                                                                                  | Mandatory |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------- |
| `features` | Array of features to export. Pass an empty array `[]` to export all features. Available values: `chunkStages`, `advancedConfig`, `businessRules`, `searchResultsConfig`, `answerConfig`, `answerRetrievals`. | Yes       |

### Sample Request

```bash theme={null}
curl --location 'https://<host-name>/api/public/bot/st-3d7ffe93-c384-5d09-918c-c8438baef80d/search/app-export' \
--header 'auth: <JWT_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
  "features": ["answerConfig", "answerRetrievals"]
}'
```

### Sample Response

```json theme={null}
{
  "status": "success",
  "jobId": "fj-ebc95cc6-d05f-59c8-8254-6ac08a3fb73d"
}
```

| Field    | Type   | Description                                             |
| -------- | ------ | ------------------------------------------------------- |
| `status` | string | Current status of the request.                          |
| `jobId`  | string | Unique job identifier. Use this to poll for job status. |

## Step 2: View Job Status

This API returns the job status along with debug information. If the job completes successfully, it also returns the URL of the file with the exported configuration.

[See the Jobs API for details.](/ai-for-service/apis/searchai/jobs)

### Sample Request

```bash theme={null}
curl -X GET 'https://<host-name>/api/public/bot/st-3d7ffe93-c3xx-xxxx-918c-c8438baef80d/search/app-export/jobs/fj-15ebc532-5e8c-5e85-bf5b-f3ef0aa10e21' \
  --header 'auth: <JWT_TOKEN>' \
  --header 'Content-Type: application/json'
```

### Sample Response

The response includes the export status for each individual module.

```json theme={null}
{
   "_id": "fj-b504b6bd-39d1-5c7d-af7f-a2696db1fe3e",
   "status": "SUCCESS",
   "createdOn": "2025-11-21T11:58:27.913Z",
   "searchIndexId": "sidx-9731bc5d-2b92-5587-ad80-56bf0c01f844",
   "fileInfo": {
       "fileId": "692053e43fe5d5ffd46dfbb6",
       "fileName": "searchConfig",
       "fileUrl": "http://host/api/internal/getMediaStream/findly/f-2a69ebb2-f23c-501f-8ad6-00b1428d49f4.json?...",
       "externalFileURL": "http://host/api/getMediaStream/findly/f-2a69ebb2-f23c-501f-8ad6-00b1428d49f4.json?..."
   },
   "validation": [
       { "feature": "chunkStages", "status": "success" },
       { "feature": "advancedConfig", "status": "success" },
       { "feature": "businessRules", "status": "success" },
       { "feature": "answerConfig", "status": "success" },
       { "feature": "answerRetrievals", "status": "success" }
   ]
}
```
