> For the complete documentation index, see [llms.txt](https://40factory.gitbook.io/wilson/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://40factory.gitbook.io/wilson/3.12/rest-api/bots/get-bot.md).

# Get bot

This endpoint allows to get a bot identified by the \<bot\_id>.

## Request <a href="#request" id="request"></a>

### Url

```
GET https://wilson.40mat.com/apif/v2/company/<company_id>/bot/<bot_id>
```

### Headers

<pre><code><strong>AUTH
</strong>Bearer "eyJ0eXAiOiJKV1QiLCJub25jZSI6IndUZXphSTNjdTNVYj..."
</code></pre>

### Parameters

```
No parameters are required for this endpoint.
```

### Body

```
No body is required for this endpoint.
```

***

## Response&#x20;

The response is the bot in JSON format, contain same properties in addition:

* `id` (string): The ID of the bot.&#x20;
* `label` (string): Label of bot.&#x20;
* `description` (string): Description to briefly explain the purpose of the bot.&#x20;
* `prompt` (string): Prompt of bot, to indicate to the bot how it should behave
* `auto_document_selector` (string): Determinate if auto document selector is enabled; possible values:&#x20;
  * `hidden` to don't show option in UI, ignored through API.
  * `choose` allow user to chose if activate it in chat.
  * `always` always active.&#x20;
* `manual_filters` (boolean): If true, user can indicate filters manually, based on the scope of bot.&#x20;
* `data_scientist_mode` (boolean): If true, it can be used data scientist mode.
* `icon` (object): Object with keys with string values: name and type.\
  Default type is "material", name the id of icon in material library.
* `locale` (string): Identifier of default language of bot in ISO 639. Can also be "AUTOMATIC" to leave the bot to understand current language.
* `filters` (object): Object with two attributes paths and tags, two array of strings. \
  In `paths` there are strings of folders path to include in retrieving procedure. In `tags` strings of tags.\
  Condition between paths and tags is "OR"

```json
{
    "id": "668335e81ad9bc07e57b...",
    "label": "New bot label",
    "description": "Update description to briefly explain the purpose of the bot",
    "auto_document_selector": "always",
    "manual_filters": false,
    "data_scientist_mode": false,
    "icon": {
        "name": "smart_toy",
        "type": "material"
    },
    "locale": "it",
    "prompt": {
        "name": "Wilson",
        "prompt": "Act as an assistance for the usage of the industrial machines."
    },
    "filters": {
        "paths": [
            "/folder"
        ],
        "tags": [
            "demo",
            "test"
        ]
    }
}
```

***

## Code example

{% tabs %}
{% tab title="Python" %}

```python
import requests

url = "https://wilson.40mat.com/apif/v2/company/<company_id>/bot/<bot_id>"

headers = {
  'Authorization': '••••••'
}

response = requests.request("GET", url, headers=headers)

print(response.text)
```

{% endtab %}

{% tab title="cURL" %}

```powershell
curl --location 'https://wilson.40mat.com/apif/v2/company/<company_id>/bot/<bot_id>' \
--header 'Authorization: ••••••' \
```

{% endtab %}
{% endtabs %}
