# Restore

This endpoint will restore a bot in the current token account. Restoring a bot with this endpoint will create a brand new bot.

{% hint style="info" %}
Restore calls are throttled at 1 call per bot per hour. Trying to restore a bot before the expired hour will result in an error.
{% endhint %}

### Request

The following request will return a full bot backup:

```bash
curl --location --request POST 'https://<SERVICE ENDPOINT>/bots/restore' \
--header 'Authorization: Bearer <BOT_AUTH_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '...'
```

### Response

If successful, the response will contain both the API Token and the API Secret of the newly created chatbot.

```javascript
{
    "APIKey":"...",
    "APISecret":"...."
}
```

### Response Codes

This endpoint will reply with the following standard HTTP codes.

| Code | Meaning                                                                         |
| ---- | ------------------------------------------------------------------------------- |
| 200  | Ok. The request has been successfully fulfilled.                                |
| 400  | Bad Request. The supplied token is invalid or does not have enough permissions. |
| 404  | Not Found. The bot specified by the token could not be found.                   |


---

# 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.xenioo.com/xenioo-api/globa-platform-api/bots/backup-and-restore/restore.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.
