Skip to content

Create AI Agent

Request

agent_name, voice, and business_description are required. When instructions are omitted or empty, they are generated from the submitted details; agent_role, business_type, and business_name are then required, with the matching custom field when a role or business type is other.

greeting is optional. When omitted, AVANSER stores friendly, which is returned in the created agent.

Security
HTTP_BASIC
Bodyapplication/jsonrequired
One of:

agent_name, voice, and business_description are required. When instructions are omitted or empty, agent_role, business_type, and business_name are required; an other role or business type then requires its matching custom field. Greeting is optional and defaults to friendly when omitted.

agent_namestring, non-emptyrequired

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

Example:"Reception AI"
voicestringrequired

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_rolestringrequired

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_typestringrequired

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, non-emptyrequired

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

Example:"Example Realty"
business_descriptionstring, non-emptyrequired

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.

Default:"friendly"
Enum:"formal""friendly""brief""warm"null
Example:"warm"
instructionsstring or null, <= 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 POST \
  -u '<username>:<password>' \
  https://tapi.avanser.com/v1/aiagents \
  -H 'Content-Type: application/json' \
  -d '{
    "agent_name": "Reception AI",
    "voice": "alloy",
    "agent_role": "receptionist",
    "business_type": "realestate",
    "business_name": "Example Realty",
    "business_description": "Real estate agency based in Sydney",
    "contact_email": "reception@example.tld"
  }'

Responses

Successful response

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