> 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/list-bots.md).

# List bots

This endpoint retrieves a list of bots.

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

### Url

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

### Headers

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

### Parameters

* `offset` (integer) (Optional): Indicate offset index to start query on list. \
  Default = 0.
* `limit` (integer) (Optional): Indicate max number of results to return. \
  Default = 20.

### Body

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

***

## Response&#x20;

The response will be a JSON array containing `bot` objects with the following properties:

* `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;
* `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.
* `prompt` (string): Prompt of bot, to indicate to the bot how it should behave
* `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": "Default bot label",
        "description": "Description to briefly explain the purpose of the bot",
        "auto_document_selector": "choose",
        "manual_filters": true,
        "data_scientist_mode": true,
        "icon": {
            "name": "smart_toy",
            "type": "material"
        },
        "locale": "en",
        "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"

payload = {}

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

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

print(response.text)
```

{% endtab %}

{% tab title="cURL" %}

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

{% endtab %}
{% endtabs %}
