Mevcut bir asistanı güncelleyin (taslak olarak kaydedilir)
/api/v1/assistants/:idAsistanı günceller ve taslak olarak kaydeder. Yayınlamak için publish endpoint'ini kullanın.
idrequiredGüncellenecek asistan ID'si
Tüm alanlar opsiyoneldir. Sadece güncellemek istediğiniz alanları gönderin.
nameoptionalAsistan adı (1-100 karakter)
systemPromptoptionalAssistant system prompt
greetingMessageoptionalİlk karşılama mesajı
sttProvideroptionalSTT sağlayıcı: "deepgram", "gladia", "google"
sttModeloptionalSTT model ID
languageoptionalLanguage code
llmModeloptionalLLM model ID
temperatureoptionalLLM temperature (0-2)
maxOutputTokensoptionalMaksimum token sayısı (1-2000)
ttsProvideroptionalTTS sağlayıcı: "elevenlabs", "azure", "cartesia"
ttsModeloptionalTTS model ID
voiceoptionalVoice ID
ttsSpeedoptionalKonuşma hızı (0.8-1.2)
ttsPitchoptionalSes tonu (-20 ile 20 arası)
backgroundAudioEnabledoptionalIs background audio active
backgroundAudioVolumeoptionalBackground audio volume (0.0-1.0)
inactivityTimeoutEnabledoptionalSessizlik zaman aşımı aktif mi
inactivityTimeoutSecondsoptionalKullanıcı sessiz kalırsa aramayı sonlandırma süresi (5-30 saniye)
crmLookupModeoptionalCRM lookup mode: "disabled", "pre-call"
crmToolIdoptionalCRM aracı ID'si
requireVerificationoptionalKimlik doğrulama gerekli mi
testPhoneNumberoptionalTest telefon numarası
toolIdsoptionalAraç ID'leri dizisi
knowledgeBaseIdsoptionalBilgi bankası ID'leri dizisi
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
}'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"]
}'{
"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"
}
}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:
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.