Skip to content

Instantly share code, notes, and snippets.

@lewisdaly
Created October 30, 2018 11:11
Show Gist options
  • Save lewisdaly/cbab097828a68d9028126091e2a9cc7a to your computer and use it in GitHub Desktop.
Save lewisdaly/cbab097828a68d9028126091e2a9cc7a to your computer and use it in GitHub Desktop.
Simple way to create daily usage trigger alerts with Twilio
#!/usr/bin/env bash
curl -XPOST https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Usage/Triggers.json \
-d "CallbackUrl=$CALLBACK_URL" \
-d "UsageCategory=totalprice" \
-d "FriendlyName=test_trigger" \
-d "TriggerBy=price" \
-d "TriggerValue=5.0000" \
-d "Recurring=daily" \
-u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment