Attach Action to Agent
POST/conversation-ai/agents/:agentId/actions
Creates and attach a new action for an AI agent. Actions define specific tasks or behaviors that the agent can perform, such as booking appointments, sending follow-ups, collecting information, or making an external API call via the customApi ("API Call") type. For customApi, put the config in details (details.apiConfig is required) and a per-agent limit (up to 5) applies.
Request
API Version
v3The unique identifier of the AI agent
- application/json
- Body
- Example (auto)
Bodyrequired
Type of action to perform
triggerWorkflowupdateContactFieldappointmentBookingstopBothumanHandOveradvancedFollowuptransferBotcustomApiName of the action (3-50 characters)
Action-specific details. The structure depends on the action type. For TRIGGER_WORKFLOW use triggerWorkflowDto, for UPDATE_CONTACT_FIELD use updateContactFieldDto, for APPOINTMENT_BOOKING use appointmentBookingDto, for STOP_BOT use stopBotDto, for HUMAN_HAND_OVER use humanHandOverDto, for ADVANCED_FOLLOWUP use advancedFollowupDto, for TRANSFER_BOT use transferBotDto, and for CUSTOM_API use CustomApiDetailsDTO (the API Call config).
{
"type": "triggerWorkflow",
"name": "Trigger a Workflow",
"details": {
"workflowIds": [
"workflow123"
],
"triggerCondition": "When user requests appointment"
}
}
Successful response
- application/json
- Schema
- Example (auto)
Schema
Created action details (classic action or customApi API Call action)
Success status of the request
{
"data": {
"id": "actionId123",
"name": "Trigger Workflow",
"type": "triggerWorkflow"
},
"success": true
}