Intents API
List All Intents
curl -X GET \
'https://a.messageflow.ai/api/v1/intents?tenant_id=123' \
-H 'Authorization: Bearer YOUR_AUTH_TOKEN'
[
{
"id": 1,
"name": "Example Intent",
"display_name": "Example Intent Display",
"intent_type": 1,
"parent_id": null,
"ai_prompt_id": 1,
"forward_number": "+1234567890",
"speak": "Speaking text"
}
]
Get Intent Details
curl -X GET \
'https://a.messageflow.ai/api/v1/intents/1?tenant_id=123' \
-H 'Authorization: Bearer YOUR_AUTH_TOKEN'
{
"id": 1,
"name": "Example Intent",
"display_name": "Example Intent Display",
"intent_type": 1,
"parent_id": null,
"ai_prompt_id": 1,
"forward_number": "+1234567890",
"speak": "Speaking text",
"ai_actions": [
{
"id": 1,
"name": "Example Action",
"action_type": 1
}
],
"tenant_id": 123
}
Create New Intent
Display name of the intent
curl -X POST \
'https://a.messageflow.ai/api/v1/intents?tenant_id=123' \
-H 'Authorization: Bearer YOUR_AUTH_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"intent": {
"name": "New Intent",
"display_name": "New Intent Display",
"intent_type": 1,
"ai_prompt_id": 1,
"forward_number": "+1234567890",
"speak": "New speaking text"
}
}'
{
"id": 2,
"name": "New Intent",
"display_name": "New Intent Display",
"intent_type": 1,
"parent_id": null,
"ai_prompt_id": 1,
"forward_number": "+1234567890",
"speak": "New speaking text",
"tenant_id": 123
}
Update Intent
curl -X PUT \
'https://a.messageflow.ai/api/v1/intents/1?tenant_id=123' \
-H 'Authorization: Bearer YOUR_AUTH_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"intent": {
"name": "Updated Intent",
"display_name": "Updated Intent Display",
"intent_type": 1,
"ai_prompt_id": 1,
"forward_number": "+1234567890",
"speak": "Updated speaking text"
}
}'
{
"id": 1,
"name": "Updated Intent",
"display_name": "Updated Intent Display",
"intent_type": 1,
"parent_id": null,
"ai_prompt_id": 1,
"forward_number": "+1234567890",
"speak": "Updated speaking text",
"tenant_id": 123
}
Delete Intent
curl -X DELETE \
'https://a.messageflow.ai/api/v1/intents/1?tenant_id=123' \
-H 'Authorization: Bearer YOUR_AUTH_TOKEN'
{
"status": "Intent 1 deleted"
}
HTTP Status Codes
- 200: Success
- 201: Created
- 400: Bad Request
- 401: Unauthorized
- 404: Not Found
- 422: Unprocessable Entity
Intent Configuration
The intent configuration includes:
- Name and display name
- Intent type
- Parent intent (for hierarchical structure)
- AI prompt association
- Forward number
- Speaking text
- Associated AI actions
Intent Types
- 1: Standard Intent
- 2: Group Intent