const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
display_name: '<string>',
status: '<string>',
prompt_template_id: '<string>',
custom_prompt: '<string>',
new_prompt_title: '<string>',
tool_ids: ['<string>'],
source_ids: ['<string>'],
pinned_document_ids: ['<string>'],
number_docs_to_retrieve: 123,
number_docs_to_display: 123,
icon: '<string>',
custom_llm_id: '<string>',
custom_llm_temperature: 123,
custom_llm_top_p: 123,
reranker_activated: true,
ignore_sources_restrictions: true,
is_background_agent: true,
is_router_agent: true,
default_router_agent_id: '<string>',
reasoning_iterations: 123,
order: 123,
can_be_used_as_tool: true,
tool_description: '<string>',
share_conversation_context: true,
max_call_depth: 123,
satisfaction_feedback_activated: true,
satisfaction_feedback_question: '<string>',
satisfaction_feedback_helper_text: '<string>',
satisfaction_feedback_no_action: '<string>',
inject_user_ticket_context: true,
ticket_context_days_limit: 123,
ui_selectable: true
})
};
fetch('https://{tenant_id}.api.useago.com/api/v1/agents/{agent_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));