> 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.11/rest-api/introduction.md).

# Introduction

{% hint style="warning" %}

## Version 3.0

Version 3.0 API include breaking changes, so we recommend implementing the necessary adjustments.

New endpoints are also exposed.

* ✅  this icon means: ENDPOINT STABLE
* 🆕 this icon means: NEW ENDPOINT
* ⚡️ this icon means: ENDPOINT UPDATED
* ⚠️ this icon means: ENDPOINT DEPRECATED
  {% endhint %}

{% hint style="warning" %}

## /v2

With version 1.15, multichat conversation management was released.&#x20;

This involved a major update in the REST API. The new endpoints are preceded by `v2` .

In the coming months the old version of the endpoints will be discontinued.
{% endhint %}

### Endpoints Overview

Each endpoint start with: \
`https://wilson.40mat.com/apif`

### **Authentication**

Access token is generated with a dedicated endpoint.

{% hint style="info" %}
The token must be entered in all requests (except /get-token), in the Auth section as Bearer Token in the string format prefixed with "Bearer" followed by the token.&#x20;

i.e. "Bearer {{token}}"
{% endhint %}

### **Chat**

To interact with Wilson, send messages and receive responses.

### Bots

To manage all settings related to bots.

### **Knowledge base**

To manage documents in the knowledge base: upload, download, organize files and associate tags to them.

***

{% hint style="info" %}
company\_id

To get company\_id, view in toolbar of Wilson Academy portal

Or use the new endpoint `/auth/company`  ([Get company data](/wilson/3.11/rest-api/authentication/get-company-data.md))

![](https://40factory.gitbook.io/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FYaUpTz3Wsaab0r9gHwBT%2Fblobs%2F1PTSzdsZYkOrhykDoEnG%2FScreenshot%25202024-08-01%2520at%252014.36.17.png\&width=300\&dpr=4\&quality=100\&sign=94181382\&sv=2)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://40factory.gitbook.io/wilson/3.11/rest-api/introduction.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
