Skip to main content
PUT
/
v1
/
agents
/
{agent_id}
Update an agent
curl --request PUT \
  --url https://agents.assemblyai.com/v1/agents/{agent_id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "name": "<string>",
  "system_prompt": "<string>",
  "greeting": "<string>",
  "input": {
    "type": "audio",
    "format": {
      "encoding": "audio/pcm",
      "sample_rate": 24000
    },
    "turn_detection": {},
    "keyterms": [
      "<string>"
    ]
  },
  "output": {
    "type": "audio",
    "voice": "ivy",
    "format": {
      "encoding": "audio/pcm",
      "sample_rate": 24000
    },
    "volume": 123
  },
  "tools": [
    {
      "name": "get_weather",
      "description": "Get current weather for a location. Use whenever the user asks about weather.",
      "parameters": {
        "type": "object",
        "properties": {
          "order_id": {
            "type": "string",
            "description": "The customer's order ID.",
            "examples": [
              "AB-12345"
            ],
            "pattern": "[A-Z]{2}-\\d{5}"
          }
        },
        "required": [
          "order_id"
        ]
      },
      "timeout_seconds": 120,
      "execution_mode": "interactive"
    }
  ]
}
EOF
{
  "id": "7ad24396-b822-4dca-871a-be9cc4781cf9",
  "name": "Support Assistant",
  "system_prompt": "<string>",
  "greeting": "<string>",
  "voice": {
    "voice_id": "ivy"
  },
  "input": {
    "type": "audio",
    "format": {
      "encoding": "audio/pcm",
      "sample_rate": 24000
    },
    "turn_detection": {},
    "keyterms": [
      "<string>"
    ]
  },
  "output": {
    "type": "audio",
    "voice": "ivy",
    "format": {
      "encoding": "audio/pcm",
      "sample_rate": 24000
    },
    "volume": 123
  },
  "tools": [
    {
      "id": "<string>",
      "name": "<string>",
      "description": "<string>",
      "http": {
        "url": "<string>",
        "headers": {
          "Authorization": "***"
        }
      },
      "parameters": {
        "type": "object",
        "properties": {
          "order_id": {
            "type": "string",
            "description": "The customer's order ID.",
            "examples": [
              "AB-12345"
            ],
            "pattern": "[A-Z]{2}-\\d{5}"
          }
        },
        "required": [
          "order_id"
        ]
      },
      "timeout_seconds": 123
    }
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Your AssemblyAI API key in the Authorization header. The raw key works directly; a Bearer prefix is also accepted.

Path Parameters

agent_id
string
required

The agent's unique ID.

Example:

"7ad24396-b822-4dca-871a-be9cc4781cf9"

Body

application/json

Same shape as the create request, but every field is optional. Send only what changes.

name
string
system_prompt
string
voice
object
greeting
string | null
input
object

Audio input configuration. Defaults to PCM at 24 kHz if omitted.

output
object

Audio output configuration. Defaults to PCM at 24 kHz with the agent's voice.

tools
object[]

Response

The updated agent record.

A stored voice agent.

id
string
Example:

"7ad24396-b822-4dca-871a-be9cc4781cf9"

name
string
Example:

"Support Assistant"

system_prompt
string
greeting
string | null
voice
object
input
object

Audio input configuration. Defaults to PCM at 24 kHz if omitted.

output
object

Audio output configuration. Defaults to PCM at 24 kHz with the agent's voice.

tools
object[]
created_at
string<date-time>
updated_at
string<date-time>