> ## Documentation Index
> Fetch the complete documentation index at: https://docs.svalync.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Agent

> Update an existing agent for handling specific tasks and interactions within the system.

####

## Authorization

<ParamField header="x-api-key" type="string" required>
  Your Api Key
</ParamField>

### Params

<ParamField query="id" type="string" required>
  The unique id for the agent being updated.
</ParamField>

### Body

<ParamField body="name" type="string" required>
  The name of the agent to be created.
</ParamField>

<ParamField body="welcomeMessage" type="string" required>
  The welcome message to be delivered by the agent.
</ParamField>

<ParamField body="task" type="string" required>
  The specific task the agent is responsible for.
</ParamField>

<ParamField body="voice" type="string" required>
  The voice to be used by the agent for communication.
</ParamField>

<ParamField body="language" type="string" required>
  The language the agent will use for communication.
</ParamField>

<ParamField body="telephonyProvider" type="string" required>
  The telephony provider to be used for the agent's calls.
</ParamField>

<ParamField body="callTermination" type="number" required>
  The conditions under which the call will be terminated in seconds.
</ParamField>

<ParamField body="hangupMessage" type="string" required>
  The message to be delivered when the call is terminated.
</ParamField>

## Response

<ResponseField name="response" type="array">
  <Expandable title="properties">
    <ResponseField name="success" type="boolean">
      Indicates if the request was successful.
    </ResponseField>

    <ResponseField name="data" type="object">
      The created agent object containing all the input fields.

      <Expandable title="properties">
        <ResponseField name="id" type="string">
          Unique identifier for the created agent.
        </ResponseField>

        <ResponseField name="name" type="string">
          The name assigned to the agent.
        </ResponseField>

        <ResponseField name="welcomeMessage" type="string">
          The message the agent speaks when a call is connected.
        </ResponseField>

        <ResponseField name="task" type="string">
          The purpose or function of the agent.
        </ResponseField>

        <ResponseField name="voice" type="string">
          The voice setting configured for the agent.
        </ResponseField>

        <ResponseField name="language" type="string">
          The language the agent uses for communication.
        </ResponseField>

        <ResponseField name="telephonyProvider" type="string">
          The provider used for handling incoming and outgoing calls.
        </ResponseField>

        <ResponseField name="callTermination" type="integer">
          The condition or duration that triggers call termination.
        </ResponseField>

        <ResponseField name="hangupMessage" type="string">
          The message played when the agent initiates a call hangup.
        </ResponseField>

        <ResponseField name="apiTool" type="json">
          Configuration details for the API tool integrated with the agent.
        </ResponseField>

        <ResponseField name="knowledgeBase" type="string">
          Reference to the knowledge base associated with the agent.
        </ResponseField>

        <ResponseField name="workflow" type="string">
          The workflow process triggered after a call is completed.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>
