Agents API

Create variant

post
https://api.dev.poly.ai/v1/agents/{agentId}/branches/{branchId}/variants

Body

application/json

CreateVariantBody

* Additional properties are NOT allowed.
namestringrequired

>= 1 characters

attributeValuesobject

Default:{"values":{}}

* Additional properties are NOT allowed.
Show Child Parameters
isDefaultboolean

Response

201 application/json

Created variant

VariantResponse

* Additional properties are NOT allowed.
idstringrequired
namestringrequired
isDefaultbooleanrequired
attributeValuesobjectrequired
* Additional properties are NOT allowed.
Show Child Parameters
post/v1/agents/{agentId}/branches/{branchId}/variants

Body

{ "name": "name" }
 
201 application/json

Delete variant

delete
https://api.dev.poly.ai/v1/agents/{agentId}/branches/{branchId}/variants/{variantId}

Response

200

Variant deleted

delete/v1/agents/{agentId}/branches/{branchId}/variants/{variantId}
 
200

Update variant

patch
https://api.dev.poly.ai/v1/agents/{agentId}/branches/{branchId}/variants/{variantId}

Body

application/json

UpdateVariantBody

* Additional properties are NOT allowed.
namestring

>= 1 characters

attributeValuesobject
* Additional properties are NOT allowed.
Show Child Parameters
isDefaultboolean

Response

200 application/json

Updated variant

VariantResponse

* Additional properties are NOT allowed.
idstringrequired
namestringrequired
isDefaultbooleanrequired
attributeValuesobjectrequired
* Additional properties are NOT allowed.
Show Child Parameters
patch/v1/agents/{agentId}/branches/{branchId}/variants/{variantId}

Body

{}
 
200 application/json

Get agent behavior rules

get
https://api.dev.poly.ai/v1/agents/{agentId}/branches/{branchId}/behavior

Response

application/json

Current behavior rules for the agent branch

AgentRulesResponse

* Additional properties are NOT allowed.
behaviorstringrequired
get/v1/agents/{agentId}/branches/{branchId}/behavior
 
application/json

Update agent behavior rules

patch
https://api.dev.poly.ai/v1/agents/{agentId}/branches/{branchId}/behavior

Body

application/json

UpdateAgentRulesBody

* Additional properties are NOT allowed.
behaviorstringrequired

>= 1 characters

Response

200 application/json

Updated behavior rules

AgentRulesResponse

* Additional properties are NOT allowed.
behaviorstringrequired
patch/v1/agents/{agentId}/branches/{branchId}/behavior

Body

{ "behavior": "behavior" }
 
200 application/json