# Restore With Overwrite

This endpoint will restore a bot in the current token account, overwriting the current token bot. The target bot will be **completely overwritten**.

{% 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/overwrite' \
--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.                   |
