File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ source " ../config.sh"
4+ source " ../jwt.sh"
5+
6+ curl -X POST https://api.nexmo.com/v0.1/dispatch \
7+ -H ' Authorization: Bearer ' $JWT \
8+ -H ' Content-Type: application/json' \
9+ -H ' Accept: application/json' \
10+ -d $' {
11+ "template":"failover",
12+ "workflow": [
13+ {
14+ "from": { "type": "sms", "number": ' $FROM_NUMBER ' },
15+ "to": { "type": "sms", "number": ' $TO_NUMBER_1 ' },
16+ "message": {
17+ "content": {
18+ "type": "text",
19+ "text": "Dispatch API: Message 1"
20+ }
21+ },
22+ "failover":{
23+ "expiry_time": 60,
24+ "condition_status": "read"
25+ }
26+ },
27+ {
28+ "from": {"type": "sms", "number": ' $FROM_NUMBER ' },
29+ "to": { "type": "sms", "number": ' $TO_NUMBER_2 ' },
30+ "message": {
31+ "content": {
32+ "type": "text",
33+ "text": "Dispatch API: Message 2"
34+ }
35+ }
36+ }
37+ ]
38+ }'
You can’t perform that action at this time.
0 commit comments