curl --location --request POST 'https://snakk-backend-production.up.railway.app/api/workflows' \
--header 'X-API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Customer Service Flow",
"description": "Handles customer inquiries",
"definition": {
"version": "1.0",
"initialAgent": "greeting",
"agents": {
"greeting": {
"name": "Velkomst",
"instructions": "Hils på kunden og finn ut hva de trenger.",
"tools": [
"search_knowledge_base"
],
"handoffs": [
{
"targetAgent": "booking",
"condition": {
"type": "intent",
"intent": "booking"
},
"preserveContext": true
}
],
"availableTasks": [],
"availableTaskGroups": []
},
"booking": {
"name": "Booking",
"instructions": "Hjelp med å booke avtale.",
"tools": [
"book_appointment"
],
"handoffs": [],
"availableTasks": [],
"availableTaskGroups": []
}
},
"tasks": {},
"taskGroups": {}
}
}'