Skip to main content
PUT
/
api
/
v1
/
vendors
/
{vendorId}
/
organizations
/
{organizationId}
/
agents
/
{agentId}
Update Agent
curl --request PUT \
  --url https://app.phonebot.io:80/api/v1/vendors/{vendorId}/organizations/{organizationId}/agents/{agentId} \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Sales Bot Alpha V2",
  "userValueTypes": {
    "customer_name": "STRING",
    "product_interest": "STRING",
    "order_id": "NUMBER",
    "zip_code": "STRING"
  },
  "systemPromptTemplate": "You are an expert sales assistant for ACME Corp focusing on upselling existing customers.",
  "telephoneNumberId": "22334455-6677-8899-00aa-bbccddeeff11",
  "llmAudioContentGenerationStrategyId": "bcdef012-3456-789a-bcde-f0123456789a",
  "extensions": [
    {
      "type": "crm_lookup_v1",
      "parameters": {
        "crm_system_url": "https://updated-crm.example.com/api",
        "api_key_secret": "new_secret_crm_key"
      },
      "id": "deadbeef-cafe-babe-feed-faceabadb001"
    }
  ],
  "callEventHooks": [
    {
      "type": "webhook_call_ended_v1",
      "parameters": {
        "target_url": "https://my.updated-service.com/call_event",
        "auth_token": "bearer_xyz987"
      },
      "id": "b00bface-1337-badd-cafe-d00df00dcafe"
    }
  ]
}
'
{
  "success": true,
  "timestamp": "2025-04-17T14:23:30Z",
  "message": "<string>",
  "data": null,
  "traceId": "<string>"
}

Path Parameters

vendorId
string
required

ID of the Vendor (UUID)

organizationId
string
required

ID of the Organization (UUID)

agentId
string
required

ID of the Agent to update (UUID)

Body

application/json

Agent update data

Data required to update an existing Agent.

name
string
required

Updated name of the agent.

Example:

"Sales Bot Alpha V2"

userValueTypes
object
required

Updated map defining user-specific value types the agent can handle.

Example:
{
"customer_name": "STRING",
"product_interest": "STRING",
"order_id": "NUMBER",
"zip_code": "STRING"
}
systemPromptTemplate
string
required

Updated template for the system prompt used by the agent's underlying LLM.

Example:

"You are an expert sales assistant for ACME Corp focusing on upselling existing customers."

telephoneNumberId
string
required

Updated ID of the telephone number assigned to this agent (UUID).

Example:

"22334455-6677-8899-00aa-bbccddeeff11"

llmAudioContentGenerationStrategyId
string
required

Updated ID of the LLM Audio Content Generation Strategy used by the agent (UUID).

Example:

"bcdef012-3456-789a-bcde-f0123456789a"

extensions
object[]
required

Updated list of LLM extensions for this agent. Include existing extension IDs (UUID) to update them, omit ID or provide null to create new ones.

callEventHooks
object[]
required

Updated list of Call Event Hooks for this agent. Include existing hook IDs (UUID) to update them, omit ID or provide null to create new ones.

Response

Agent successfully updated

Standard API response wrapper

success
boolean
required

Indicates if the request was successful

Example:

true

timestamp
string<date-time>
required

Response timestamp in ISO-8601 format

Example:

"2025-04-17T14:23:30Z"

message
string

Human-readable message

data
any

Payload data object

Example:

null

traceId
string

Correlation or trace ID