> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aiployees.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Актуализиране на инструмент по време на разговор

> Актуализиране на съществуващ инструмент по време на разговор

Този endpoint ви позволява да актуализирате съществуващ инструмент по време на разговор. Всички полета са опционални - предоставете само полетата, които искате да актуализирате.

### Path параметри

<ParamField path="id" type="integer" required>
  Уникалният идентификатор на инструмента за актуализиране
</ParamField>

### Body параметри

<ParamField body="name" type="string" optional>
  Име на инструмента - трябва да съдържа само малки букви и долни черти, и да започва с буква
</ParamField>

<ParamField body="description" type="string" optional>
  Подробно обяснение кога и как AI трябва да използва този инструмент (максимум 255 символа)
</ParamField>

<ParamField body="endpoint" type="string" optional>
  Валиден URL на API endpoint-а за извикване
</ParamField>

<ParamField body="method" type="string" optional>
  HTTP метод: `GET`, `POST`, `PUT`, `PATCH`, или `DELETE`
</ParamField>

<ParamField body="timeout" type="integer" optional>
  Timeout на заявката в секунди (1-30)
</ParamField>

<ParamField body="headers" type="array" optional>
  HTTP headers за изпращане със заявката (заменя съществуващите headers)

  <Expandable title="headers свойства">
    <ParamField body="name" type="string" required>
      Име на header
    </ParamField>

    <ParamField body="value" type="string" required>
      Стойност на header
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="schema" type="array" optional>
  Схема на параметрите (заменя съществуващата схема)

  <Expandable title="schema свойства">
    <ParamField body="name" type="string" required>
      Име на параметъра (2-32 символа)
    </ParamField>

    <ParamField body="type" type="string" required>
      Тип на параметъра: `string`, `number`, или `boolean`
    </ParamField>

    <ParamField body="description" type="string" required>
      Описание на параметъра (3-255 символа)
    </ParamField>
  </Expandable>
</ParamField>

### Response полета

<ResponseField name="message" type="string">
  Съобщение за успех
</ResponseField>

<ResponseField name="data" type="object">
  Актуализираният обект инструмент с всички текущи стойности
</ResponseField>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "message": "Tool updated successfully",
    "data": {
      "id": 1,
      "name": "update_customer_info",
      "description": "Use this tool to update customer information in the system.",
      "endpoint": "https://api.yourcompany.com/customers/update",
      "method": "POST",
      "timeout": 15,
      "headers": [
        {
          "name": "Content-Type",
          "value": "application/json"
        }
      ],
      "schema": [
        {
          "name": "customer_name",
          "type": "string",
          "description": "Full name of the customer"
        },
        {
          "name": "customer_age",
          "type": "number",
          "description": "Age of the customer"
        },
        {
          "name": "newsletter_subscription",
          "type": "boolean",
          "description": "Whether customer wants to subscribe to newsletter"
        }
      ],
      "created_at": "2025-10-10T12:00:00.000000Z",
      "updated_at": "2025-10-10T14:30:00.000000Z"
    }
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "message": "Tool not found"
  }
  ```

  ```json 422 Validation Error theme={null}
  {
    "message": "Validation failed",
    "errors": {
      "name": ["Tool name must contain only lowercase letters and underscores, and start with a letter."]
    }
  }
  ```
</ResponseExample>

### Управление на присвоявания на инструменти

За да прикачите или откачите този инструмент от асистенти, използвайте Assistant API:

* **[Създаване на асистент](/api-reference/assistants/create-assistant)** - Използвайте параметъра `tool_ids` за прикачване на инструменти при създаване на асистент
* **[Актуализиране на асистент](/api-reference/assistants/update-assistant)** - Използвайте параметъра `tool_ids` за управление на това кои инструменти са присвоени на асистент

***
