# Data-urlencode HTTP Alert Post Event Handler

**URL:** <https://community.influxdata.com/t/data-urlencode-http-alert-post-event-handler/9738>\
**Category:** Kapacitor\
**Tags:** kapacitor\
**Created:** [May 9, 2019, 4:58pm UTC](https://community.influxdata.com/t/data-urlencode-http-alert-post-event-handler/9738 "2019-05-09T16:58:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jegj](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/jegj/32/3006_2.png) [@jegj](https://community.influxdata.com/u/jegj)\
**Post date:** [May 9, 2019, 4:58pm UTC](https://community.influxdata.com/t/data-urlencode-http-alert-post-event-handler/9738/1 "2019-05-09T16:58:27Z")

</div>

will be possible to send a HTTP request to Twilio HTTP API with the Post Event Handler ?

```auto
var trigger = data
|alert()
    .crit(lambda: "value" >= crit)
    .message(message)
    .post()
		.endpoint('twilio')
		.captureResponse()

```

i configured twilio as endpoint in my kapacitor.conf file like this:

```auto
[[httppost]]
        endpoint = "twilio"
        url = "https://api.twilio.com/2010-04-01/Accounts/XXXXXXXXXX/Messages.json"
        basic-auth = { username = "ZZZ", password = "YYY" }
        alert-template-file = "/templates/twilio.tmpl"

```

But Twilio supports requests with the following format( in `curl`):

```auto
curl -X POST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages.json \
--data-urlencode "From=+15005550006" \
--data-urlencode "Body=Do. Or do not. There is no try." \
--data-urlencode "To=+14108675310" \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:<token>

```

But i don’t have idea how to set the `--data-urlencode` properties with the current version of the Post Event Handler or if it is supported at leats. I tried with `alert-template-file` in my kapacitor.conf file like this:

```auto
"Body"="{{.Message}}"
"From"="+11111111"
"To"="+11111111111"

```

but im not sure if that’s the way. Twilios responded with 400 ( From number is required )
