Skip to main content
PUT
/
update
/
{id}
Update Agent by ID
curl --request PUT \
  --url https://server.sellagent.ai/api/agent/update/{id} \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-api-key: <x-api-key>' \
  --form 'name=<string>' \
  --form 'script=<string>' \
  --form 'firstMessage=<string>' \
  --form 'type=<string>' \
  --form 'phone=<string>' \
  --form 'webhookURL=<string>' \
  --form 'modelType=<string>' \
  --form 'modelId=<string>' \
  --form 'voiceId=<string>' \
  --form 'language={}' \
  --form 'dynamicVariables={}' \
  --form silenceThreshold=123 \
  --form maxCallDuration=123 \
  --form enableRecording=true \
  --form enableTranscript=true \
  --form pauseBeforeSpeaking=123 \
  --form 'callTransfer={}' \
  --form 'customFunctions=<unknown>' \
  --form 'backgroundSound={
  "soundName": "<string>",
  "volume": 123
}' \
  --form file='@example-file'
{
  "_id": "686679f702bfb2054ec3d1f0",
  "name": "Appointement Setter Agent",
  "type": "Single Prompt",
  "firstMessage": "Hello, how can I help you today?",
  "modelType": "deepseek/deepseek-chat-v3-0324",
  "backgroundSound": {
    "volume": 30
  },
  "dynamicVariables": {
    "first_name": "John"
  },
  "webhookURL": "Url endpoint",
  "language": {
    "code": "en",
    "label": "English",
    "icon": "US"
  },
  "customFunctions": [
    "<unknown>"
  ],
  "voiceMailDetection": false,
  "silenceThreshold": 30,
  "maxCallDuration": 300,
  "pauseBeforeSpeaking": 0,
  "enableRecording": false,
  "enableTranscript": false,
  "providerId": "105922657181422688240",
  "currentWorkspace": "685846b162e555e53cd3aeaa",
  "creditsBalance": 0,
  "currentSubscription": {
    "status": "free",
    "stripeCustomerId": "cus_SarEyKO1v9KQfP"
  },
  "usageMetrics": {
    "callingMinutesUsed": 0,
    "contactsUploaded": 0,
    "emailsSent": 0,
    "lastResetDate": "2025-06-29T16:37:16.234Z",
    "currentPeriodUsage": {
      "callingMinutes": 0,
      "contacts": 0,
      "emails": 0
    }
  },
  "workspaceId": "685846b162e555e53cd3aeaa",
  "modelId": {
    "_id": "68243c0eba21403731844a8c",
    "provider": "OpenRouter",
    "label": "DeepSeek V3",
    "type": "text",
    "currency": "USD",
    "icon": "https://assets-seleagent.s3.us-east-2.amazonaws.com/deepseek.png",
    "modelName": "deepseek/deepseek-chat-v3-0324",
    "cost": 0.01,
    "latency": 400
  },
  "voiceId": {
    "_id": "6800a813e6052d216985b6eb",
    "voiceName": "Luna",
    "accent": "English (US)",
    "gender": "Female",
    "voiceId": "aura-2-luna-en",
    "demoUrl": "https://d2z4jjzwkquvhw.cloudfront.net/Luna.wav",
    "voiceImg": "https://img.freepik.com/...jpg",
    "voiceProvider": "Deepgram",
    "providerId": "68243c0eba21403731844a8a",
    "voiceKey": "aura-2-luna-en"
  },
  "knowledgeBase": [
    "<unknown>"
  ],
  "createdAt": "2025-07-03T12:39:19.318Z",
  "updatedAt": "2025-07-04T20:39:32.968Z",
  "script": "Agent Script"
}

Headers

x-api-key
string
required

Your API key for authentication

Content-Type
string
required

Must be multipart/form-data

x-workspace-id
string

Optional Workspace ID. Defaults to user's current workspace.

Path Parameters

id
string
required

The unique ID of the agent to update.

Example:

"686679f702bfb2054ec3d1f0"

Body

multipart/form-data
name
string
script
string
firstMessage
string
type
string
phone
string
webhookURL
string
modelType
string
modelId
string
voiceId
string
language
object
dynamicVariables
object
silenceThreshold
number
maxCallDuration
number
enableRecording
boolean
enableTranscript
boolean
pauseBeforeSpeaking
number
callTransfer
object
customFunctions
any[]
backgroundSound
object
file
file

PDF file to add to agent's knowledge base

Response

Agent updated successfully

_id
string
required

Unique ID of the agent

Example:

"686679f702bfb2054ec3d1f0"

name
string
required

Name of the agent

Example:

"Appointement Setter Agent"

type
string
required

Agent type (e.g., Single Prompt, Multi-Step)

Example:

"Single Prompt"

firstMessage
string

Initial message spoken by the agent

Example:

"Hello, how can I help you today?"

modelType
string

Model used by the agent

Example:

"deepseek/deepseek-chat-v3-0324"

backgroundSound
object
dynamicVariables
object
webhookURL
string

Model used by the agent

Example:

"Url endpoint"

language
object
customFunctions
any[]

Custom functions used in the agent

voiceMailDetection
boolean
Example:

false

silenceThreshold
integer
Example:

30

maxCallDuration
integer
Example:

300

pauseBeforeSpeaking
integer
Example:

0

enableRecording
boolean
Example:

false

enableTranscript
boolean
Example:

false

providerId
string
Example:

"105922657181422688240"

currentWorkspace
string
Example:

"685846b162e555e53cd3aeaa"

creditsBalance
number
Example:

0

currentSubscription
object
usageMetrics
object
workspaceId
string
Example:

"685846b162e555e53cd3aeaa"

modelId
object
voiceId
object
knowledgeBase
any[]

Knowledge base entries attached to the agent

createdAt
string<date-time>
Example:

"2025-07-03T12:39:19.318Z"

updatedAt
string<date-time>
Example:

"2025-07-04T20:39:32.968Z"

script
string
Example:

"Agent Script"