Skip to main content
PUT
https://api.getmalakai.com/
agents
/
user
/
{id}
curl --request PUT \
  --url 'agents/user/agent_1a2b3c4d5e' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: multipart/form-data' \
  -F 'agent_name="Sales Pro Agent"' \
  -F 'goals="Schedule demos with qualified leads."'
{
  "status": "success",
  "message": "Agent updated successfully",
  "data": {
    "agent_id": "***",
    "agent_name": "Sales Pro Agent",
    "voice_id": "***",
    "language": "en-US",
    "goals": "Schedule demos with qualified leads.",
    "img_url": "***",
    "updated_at": "2024-11-12T10:30:00.000Z"
  }
}

Headers

Authorization
string
required
Your API key for authentication. Prefix with Bearer .

Path Parameters

id
string
required
The unique identifier of the agent you want to update.

Body

This endpoint accepts multipart/form-data. Send only the fields you wish to update.
agent_name
string
The new name for the agent.
voice_id
string
The ID of a new voice model for the agent.
language
string
Update the primary language for the agent’s conversation.
conversation
string
Update the prompt or script defining the agent’s conversational flow.
template_id
string
Update the agent to use a different pre-configured template.
opening_message
string
Change the initial message the agent uses to start a conversation.
qualification_scenario
string
Update the prompt defining how the agent should qualify leads.
goals
string
Update the description of the objectives or goals for the agent.
background
string
Modify the background information or context for the agent.
example_scenario
string
Provide a new example conversation or scenario to guide the agent.
img_url
file
Upload a new avatar image file for the agent.
negative_prompt
string
Update the instructions on what the agent should avoid.
curl --request PUT \
  --url 'agents/user/agent_1a2b3c4d5e' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: multipart/form-data' \
  -F 'agent_name="Sales Pro Agent"' \
  -F 'goals="Schedule demos with qualified leads."'

Response

On success, the response will contain the complete, updated agent object.
status
string
Confirms the request was successful.
message
string
A human-readable message, e.g., “Agent updated successfully”.
data
object
An object containing the full, updated details of the agent.
{
  "status": "success",
  "message": "Agent updated successfully",
  "data": {
    "agent_id": "***",
    "agent_name": "Sales Pro Agent",
    "voice_id": "***",
    "language": "en-US",
    "goals": "Schedule demos with qualified leads.",
    "img_url": "***",
    "updated_at": "2024-11-12T10:30:00.000Z"
  }
}