Agents
Get all agents
Agents are the main entities in the system. Agents are used to create conversations. You can create workflow for an agent and configure it for different use cases. You can also create custom workflows for an agent. This API will give you the list of agents created by organization you are a part of.
get/agent
Query parameters
pageinteger
Page number
offsetinteger
Number of items to return per page
searchstring
Search query
type'single_prompt' | 'workflow_graph'
Filter agents by workflow type
sortField'createdAt' | 'updatedAt' | 'totalCalls' | 'name' | 'workflowType'
Field to sort results by
sortOrder'asc' | 'desc'
Sort direction
archivedboolean
When true, returns only archived agents. Omit or set to false to return active agents.
Response
Successful response
Example response
{
"status": true,
"data": {
"agents": [
{
"postCallAnalyticsConfig": {
"dispositionMetrics": [
{
"identifier": "call_resolved",
"dispositionMetricPrompt": "Was the customer issue resolved by the end of the call?",
"dispositionMetricType": "STRING",
"choices": [
"resolved",
"escalated",
"callback_scheduled",
"no_action"
]
}
]
},
"_resolvedConfig": {
"tools": [
{
"name": "end_call",
"description": "End the conversation when the user is satisfied",
"transferNumber": "+1234567890",
"url": "https://api.example.com/orders",
"method": "GET",
"headers": {
"Authorization": "Bearer TOKEN",
"Content-Type": "application/json"
},
"headersArray": [
{
"key": "Authorization",
"value": "Bearer TOKEN"
}
],
"queryParams": [
{
"key": "id",
"value": "{{order_id}}"
}
],
"requestBody": "{\"customer_id\": \"{{customer_id}}\"}",
"responseVariables": [
{
"variableName": "orderStatus",
"jsonPath": "$.data.status"
}
],
"variablesExtractionSchema": [
{
"name": "customer_name",
"description": "The customer's full name",
"values": [
"satisfied",
"unsatisfied",
"neutral"
]
}
],
"knowledgeBaseId": "60d0fe4f5311236168a109ca",
"fillerPhrases": [
"Let me check that for you",
"One moment please"
]
}
],
"postCallAnalyticsConfig": {
"dispositionMetrics": [
{
"identifier": "call_resolved",
"dispositionMetricPrompt": "Was the customer issue resolved by the end of the call?",
"dispositionMetricType": "STRING",
"choices": [
"resolved",
"escalated",
"callback_scheduled",
"no_action"
]
}
]
}
},
"_versionedWorkflow": {
"tools": [
{
"name": "end_call",
"description": "End the conversation when the user is satisfied",
"transferNumber": "+1234567890",
"url": "https://api.example.com/orders",
"method": "GET",
"headers": {
"Authorization": "Bearer TOKEN",
"Content-Type": "application/json"
},
"headersArray": [
{
"key": "Authorization",
"value": "Bearer TOKEN"
}
],
"queryParams": [
{
"key": "id",
"value": "{{order_id}}"
}
],
"requestBody": "{\"customer_id\": \"{{customer_id}}\"}",
"responseVariables": [
{
"variableName": "orderStatus",
"jsonPath": "$.data.status"
}
],
"variablesExtractionSchema": [
{
"name": "customer_name",
"description": "The customer's full name",
"values": [
"satisfied",
"unsatisfied",
"neutral"
]
}
],
"knowledgeBaseId": "60d0fe4f5311236168a109ca",
"fillerPhrases": [
"Let me check that for you",
"One moment please"
]
}
]
}
}
]
}
}