Skip to content

Commit 5645098

Browse files
author
Tony Bedford
committed
Add update application block
1 parent 47ea14b commit 5645098

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

application/update-application.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/bin/bash
2+
3+
source "../config.sh"
4+
5+
curl -X "PUT" "https://api.nexmo.com/v2/applications/$NEXMO_APPLICATION_ID" \
6+
-H 'Content-Type: application/json' \
7+
-u "$NEXMO_API_KEY:$NEXMO_API_SECRET" \
8+
-d $'{
9+
"name": "New App Name",
10+
"capabilities": {
11+
"messages": {
12+
"webhooks": {
13+
"inbound_url": {
14+
"address": "https://example.com/webhooks/inbound",
15+
"http_method": "POST"
16+
},
17+
"status_url": {
18+
"address": "https://example.com/webhooks/status",
19+
"http_method": "POST"
20+
}
21+
}
22+
},
23+
"voice": {
24+
"webhooks": {
25+
"answer_url": {
26+
"address": "https://example.com/webhooks/answer",
27+
"http_method": "POST"
28+
},
29+
"event_url": {
30+
"address": "https://example.com/webhooks/event",
31+
"http_method": "POST"
32+
}
33+
}
34+
},
35+
"rtc": {
36+
"webhooks": {
37+
"event_url": {
38+
"address": "https://example.com/webhooks/event",
39+
"http_method": "POST"
40+
}
41+
}
42+
},
43+
"vbc": {}
44+
}
45+
}'
46+

0 commit comments

Comments
 (0)