# Cloner API

{% hint style="info" %}
This feature is solely intended for Syntphony CAI Server Clients without access to the Cockpit.

\
If your deployment contains Cockpit, you may import and export the virtual agents through the UI instead.
{% endhint %}

The Syntphony CAI platform provides an external endpoint capable of exporting or importing the virtual agent structure, this includes various kinds of information, such as: Basic Data, Intentions, Entity, Registered Flows, Channels, etc. These endpoints are extremely useful during environment migration or even for backing up a specific "Bot".

For the following methods, this is the base url:

> https\://{installationURL}/eva-cloner/org/{orgUUID}/env/{envUUID}/cloner

The installationURL is the URL provided to you by your Syntphony CAI installation administrator. If you lost it, you may request it again.

## **Export service**

| Method: | **GET**              |
| ------- | -------------------- |
| URL:    | **/export**          |
| Type:   | **application/json** |

The request responsible to extracting all information. It will return you a zip file, and requires your token's user to at least have access to the Editor role in your virtual agent.

### **URL Parameters**

| **Name**    | **Type** | **Required** | **Description**                              |
| ----------- | -------- | ------------ | -------------------------------------------- |
| **orgUUID** | String   | Yes          | Your organization's UUID.                    |
| **envUUID** | String   | Yes          | UUID of the environment your bot is located. |

### **Query parameters**

| **Name**    | **Data Type** | **Required** | **Description**                                  |
| ----------- | ------------- | ------------ | ------------------------------------------------ |
| **botName** | String        | Yes          | The Bot name, who intends to extract information |

### Headers

<table><thead><tr><th width="200.28571428571428">Name</th><th width="150">Data Type</th><th width="150">Required</th><th>Description</th></tr></thead><tbody><tr><td><strong>Name</strong></td><td><strong>Data Type</strong></td><td><strong>Required</strong></td><td><strong>Description</strong></td></tr><tr><td><strong>AUTHORIZATION</strong></td><td>String</td><td>Yes</td><td>A Bearer Token. For more details, see the Authentication section on 'Conversation API'. Required when calling the ‘<strong>Authenticated conversation service</strong>’ endpoint.</td></tr></tbody></table>

### **Response**

This service has an Application/ZIP return type. The returned Zip may be sent, as is, to the import virtual agent service.

## **Import service**

| Method: | **POST**             |
| ------- | -------------------- |
| URL:    | **/import**          |
| Type:   | **application/json** |

This service receives a zip file in a specific format, obtained in the 'export bot service', and re-creates the virtual agent in the desired environment. The environment doesn't need to be the same as the original one, and you may also import virtual agents from 3.x versions into 4.x versions.

The token's user permissions must be at least as high as 'Editor' to the whole chosen environment.

### **URL Parameters**

| **Name**    | **Type** | **Required** | **Description**                              |
| ----------- | -------- | ------------ | -------------------------------------------- |
| **orgUUID** | String   | Yes          | Your organization's UUID.                    |
| **envUUID** | String   | Yes          | UUID of the environment your bot is located. |

### **Query parameters**

<table data-header-hidden><thead><tr><th>Name</th><th>Data Type</th><th width="150">Required</th><th>Description</th></tr></thead><tbody><tr><td><strong>Name</strong></td><td><strong>Data Type</strong></td><td><strong>Required</strong></td><td><strong>Description</strong></td></tr><tr><td><strong>botName</strong></td><td>String</td><td>Yes</td><td>After import, this will be the bot final name.</td></tr><tr><td><strong>file</strong></td><td>Form Data FILE</td><td>Yes</td><td>The zip file containing all bot information. This is the same zip obtained in the export method.</td></tr></tbody></table>

### Headers

<table><thead><tr><th width="200.28571428571428">Name</th><th width="150">Data Type</th><th width="150">Required</th><th>Description</th></tr></thead><tbody><tr><td><strong>Name</strong></td><td><strong>Data Type</strong></td><td><strong>Required</strong></td><td><strong>Description</strong></td></tr><tr><td><strong>AUTHORIZATION</strong></td><td>String</td><td>Yes</td><td>A Bearer Token. For more details, see the Authentication section on 'Conversation API'. Required when calling the ‘<strong>Authenticated conversation service</strong>’ endpoint.</td></tr></tbody></table>

### Response&#xD;

| **HTTP Status** | **Description**                              |
| --------------- | -------------------------------------------- |
| **201**         | Created, the Import operation was successful |

​


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.conversational-ai.syntphony.com/user-guide/api-docs/api-guidelines/cloner.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
