Asistan Güncelle

Mevcut bir asistanı güncelleyin (taslak olarak kaydedilir)

Endpoint

PATCH/api/v1/assistants/:id

Asistanı günceller ve taslak olarak kaydeder. Yayınlamak için publish endpoint'ini kullanın.

URL Parameters

idrequired

Güncellenecek asistan ID'si

İstek Parametreleri

Tüm alanlar opsiyoneldir. Sadece güncellemek istediğiniz alanları gönderin.

Basic Information

nameoptional

Asistan adı (1-100 karakter)

systemPromptoptional

Assistant system prompt

greetingMessageoptional

İlk karşılama mesajı

Konuşmadan Metne (STT) Ayarları

sttProvideroptional

STT sağlayıcı: "deepgram", "gladia", "google"

sttModeloptional

STT model ID

languageoptional

Language code

Dil Modeli (LLM) Ayarları

llmModeloptional

LLM model ID

temperatureoptional

LLM temperature (0-2)

maxOutputTokensoptional

Maksimum token sayısı (1-2000)

Metinden Sese (TTS) Ayarları

ttsProvideroptional

TTS sağlayıcı: "elevenlabs", "azure", "cartesia"

ttsModeloptional

TTS model ID

voiceoptional

Voice ID

ttsSpeedoptional

Konuşma hızı (0.8-1.2)

ttsPitchoptional

Ses tonu (-20 ile 20 arası)

backgroundAudioEnabledoptional

Is background audio active

backgroundAudioVolumeoptional

Background audio volume (0.0-1.0)

Sessizlik Zaman Aşımı

inactivityTimeoutEnabledoptional

Sessizlik zaman aşımı aktif mi

inactivityTimeoutSecondsoptional

Kullanıcı sessiz kalırsa aramayı sonlandırma süresi (5-30 saniye)

CRM Ayarları

crmLookupModeoptional

CRM lookup mode: "disabled", "pre-call"

crmToolIdoptional

CRM aracı ID'si

requireVerificationoptional

Kimlik doğrulama gerekli mi

testPhoneNumberoptional

Test telefon numarası

İlişkilendirmeler

toolIdsoptional

Araç ID'leri dizisi

knowledgeBaseIdsoptional

Bilgi bankası ID'leri dizisi

Örnek İstek (Kısmi Güncelleme)

cURL
curl -X PATCH https://api.wespoke.ai/api/v1/assistants/cm1234567890 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Advanced Customer Support Assistant",
    "temperature": 0.8,
    "ttsSpeed": 1.1
  }'

Örnek İstek (Çoklu Alan Güncelleme)

cURL
curl -X PATCH https://api.wespoke.ai/api/v1/assistants/cm1234567890 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "systemPrompt": "You are a very helpful and knowledgeable customer support assistant...",
    "llmModel": "google/gemini-2.5-flash",
    "temperature": 0.8,
    "ttsSpeed": 1.1,
    "backgroundAudioVolume": 0.5,
    "crmLookupMode": "pre-call",
    "toolIds": ["tool_123", "tool_456", "tool_789"]
  }'

Yanıt

200 OK
{
  "success": true,
  "data": {
    "id": "cm1234567890",
    "name": "Advanced Customer Support Assistant",
    "userId": "user_123",
    "currentVersion": 0,
    "lastPublishedAt": null,
    "testPhoneNumber": null,
    "draftSystemPrompt": "You are a very helpful and knowledgeable customer support assistant...",
    "draftGreetingMessage": "Hello! How can I help you?",
    "draftVoice": "Fahco4VZzobUeiPqni1S",
    "draftLanguage": "tr",
    "draftTemperature": 0.8,
    "draftMaxOutputTokens": 500,
    "draftBackgroundAudioEnabled": true,
    "draftBackgroundAudioVolume": 0.3,
    "createdAt": "2025-01-18T15:30:00Z",
    "updatedAt": "2025-01-18T15:45:00Z"
  }
}

ℹ️Taslak vs Yayınlama

The update operation saves the assistant as a draft. Draft values are used in test calls.

You need to publish for the changes to be used in real calls:

Publish Endpoint
curl -X POST https://api.wespoke.ai/api/v1/assistants/cm1234567890/publish \
  -H "Authorization: Bearer YOUR_API_KEY"

The publish operation creates a new version and increments the currentVersion number.