Skip to content

Update AI Agent

Request

Only submitted fields are changed. The resulting agent_name, voice, business_description, and instructions must remain populated, including when a field is omitted from the request. A resulting agent_role or business_type of other requires its matching custom field to remain populated.

Submitted agent_role, business_type, and greeting values are checked against List Agent Options. The resulting voice is checked even when it was retained from the existing agent. Instructions are never regenerated on update.

Security
HTTP_BASIC
Path
agent_idstring^[A-Za-z0-9_-]+$required

Agent ID containing letters, digits, hyphens, or underscores only.

Example:155
Bodyapplication/jsonrequired
agent_namestring, non-empty

Friendly agent name; required on create and must remain populated on update.

Example:"Reception AI"
voicestring

Voice key returned by List Agent Options; required on create and validated against current options after merging an update with stored details.

Enum:"alloy""ash""ballad""coral""echo""sage""shimmer""verse""marin""cedar"
Example:"alloy"
agent_rolestring or null

Role key returned by List Agent Options. Required when instructions are generated.

Enum:"receptionist""support""sales""info""other"null
Example:"receptionist"
custom_agent_rolestring or null

Required for instruction generation when agent_role is other, and on update when the resulting role is other.

Example:"After hours receptionist"
business_typestring or null

Business type key returned by List Agent Options. Required when instructions are generated.

Enum:"professional""healthcare""realestate""legal""home""retail""restaurant""technology""education""automotive"
Example:"realestate"
custom_business_typestring or null

Required for instruction generation when business_type is other, and on update when the resulting business type is other.

Example:"Boat dealership"
business_namestring or null

Business name used by the agent. Required when instructions are generated.

Example:"Example Realty"
business_descriptionstring, non-empty

Short business description; required on create and preview, and cannot be cleared on update.

Example:"Real estate agency based in Sydney"
contact_emailstring or null, (email)

Business contact email; must be a valid email address when provided.

Example:"reception@example.tld"
greetingstring or null

Greeting style key returned by List Agent Options; defaults to friendly when omitted on create, and null clears it on update.

Enum:"formal""friendly""brief""warm"null
Example:"warm"
instructionsstring, [ 1 .. 4000 ] characters

Agent conversational instructions, 4000 characters max. Omission or an empty value on create generates them; they cannot be cleared or regenerated on update.

Example:"You are the Example Realty phone assistant."
curl -i -X PUT \
  -u '<username>:<password>' \
  https://tapi.avanser.com/v1/aiagents/155 \
  -H 'Content-Type: application/json' \
  -d '{
    "greeting": "warm"
  }'

Responses

Successful response

Bodyapplication/json
@transactionobject
responseobject
Response
{ "@transaction": { "id": "c9220015e2f48bc7cf4b38186a7b2025", "account-id": "1234", "request": { … } }, "response": { "message": "Success", "code": 200, "agent": { … } } }