$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "items": [
< "Hi, I've been trying to connect my Stripe account for 3 days and the integration keeps failing. I'm losing sales. Please help ASAP.",
< {
< "subject": "Invoice question",
< "body": "Can you send me the invoice for August? No rush."
< },
< "How much does the enterprise plan cost for 50 seats?"
< ],
< "questions": {
< "department": {
< "type": "choice",
< "instructions": "Which team should handle this message?",
< "criteria": {
< "billing": "Payments, invoicing, refunds, subscription charges",
< "technical": "Bugs, outages, integrations, errors",
< "sales": "Pricing, upgrades, new accounts, plan questions"
< }
< },
< "frustration": {
< "type": "score",
< "instructions": "How frustrated does the customer appear?",
< "criteria": [
< "Calm, just stating facts",
< "Frustrated but civil",
< "Very angry, strong language"
< ]
< },
< "is_urgent": {
< "type": "noul",
< "instructions": "Does the message convey urgency or time-sensitivity?",
< "criteria": {
< "true": "Explicitly time-sensitive or blocking",
< "false": "No urgency expressed"
< }
< }
< }
<}
<EOF
$curl "https://api.apify.com/v2/actors/sameh.jarour~jev-classifier/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'