Skip to main content
PUT
/
user
/
tools
/
{id}
Актуализиране на инструмент по време на разговор
curl --request PUT \
  --url https://call.aiployees.com/api/user/tools/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "endpoint": "<string>",
  "method": "<string>",
  "timeout": 123,
  "headers": [
    {
      "name": "<string>",
      "value": "<string>"
    }
  ],
  "schema": [
    {
      "name": "<string>",
      "type": "<string>",
      "description": "<string>"
    }
  ]
}
'
{
  "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"
  }
}
Този endpoint ви позволява да актуализирате съществуващ инструмент по време на разговор. Всички полета са опционални - предоставете само полетата, които искате да актуализирате.

Path параметри

id
integer
required
Уникалният идентификатор на инструмента за актуализиране

Body параметри

name
string
Име на инструмента - трябва да съдържа само малки букви и долни черти, и да започва с буква
description
string
Подробно обяснение кога и как AI трябва да използва този инструмент (максимум 255 символа)
endpoint
string
Валиден URL на API endpoint-а за извикване
method
string
HTTP метод: GET, POST, PUT, PATCH, или DELETE
timeout
integer
Timeout на заявката в секунди (1-30)
headers
array
HTTP headers за изпращане със заявката (заменя съществуващите headers)
schema
array
Схема на параметрите (заменя съществуващата схема)

Response полета

message
string
Съобщение за успех
data
object
Актуализираният обект инструмент с всички текущи стойности
{
  "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"
  }
}

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

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