Ana içeriğe atla
PUT
/
user
/
tools
/
{id}
Arama içi aracı güncelle
curl --request PUT \
  --url https://app.whattalk.ai/api/user/tools/{id} \
  --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"
  }
}
Bu endpoint, mevcut bir arama içi aracı güncellemenizi sağlar. Tüm alanlar isteğe bağlıdır - yalnızca güncellemek istediğiniz alanları sağlayın.

Yol Parametreleri

id
integer
gerekli
Güncellenecek aracın benzersiz tanımlayıcısı

Gövde Parametreleri

name
string
Araç adı - yalnızca küçük harfler ve alt çizgi içermeli ve bir harfle başlamalıdır
description
string
Yapay zekanın bu aracı ne zaman ve nasıl kullanması gerektiğinin ayrıntılı açıklaması (maksimum 255 karakter)
endpoint
string
Çağrılacak API endpoint’inin geçerli URL’si
method
string
HTTP yöntemi: GET, POST, PUT, PATCH veya DELETE
timeout
integer
Saniye cinsinden istek zaman aşımı (1-30)
headers
array
İstekle birlikte gönderilecek HTTP başlıkları (mevcut başlıkların yerini alır)
schema
array
Parametreler şeması (mevcut şemanın yerini alır)

Yanıt alanları

message
string
Başarı mesajı
data
object
Tüm mevcut değerleriyle güncellenen araç nesnesi
{
  "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"
  }
}

Araç Atamalarını Yönetme

Bu aracı asistanlara eklemek veya kaldırmak için Asistan API’sini kullanın:
  • Asistan Oluştur - Bir asistan oluştururken araçları eklemek için tool_ids parametresini kullanın
  • Asistan Güncelle - Bir asistana hangi araçların atandığını yönetmek için tool_ids parametresini kullanın