httpRequest

The httpRequest Rule will perform a HTTP request to a specified URL using POST or GET.

Structure

Example

<httpRequest id="1" label="HTTP Request" url="https://example.com" requestMethod="POST">
    <params>
        <param name="parameter-name" value="parameter-value" />
        <!-- more parameters -->
    </params>
</httpRequest>

Rule Attributes

Name Mandatory Description
id YES The unique identifier of the SMS Rule. This needs to be unique inside of the SMS Flow. This attribute is used to reference the SMS Rule through the API, for example when attaching the SMS Flow to a Link
label YES The value which is displayed in the Analytics section of the Enterprise portal
url YES The URL we will make the HTTP request to
requestMethod YES The HTTP method used for the request. Can either be POST or GET

Param Attributes

Name Mandatory Description
name YES The name of the parameter
value YES The value of the parameter. This value can be one of our SMS Variables

Examples

HTTP Request posting SMS information

This example will POST the origin, destination and content to the specified URL.

<httpRequest id="1" label="HTTP Request" url="https://example.com" requestMethod="POST">
    <params>
        <param name="origin" value="$_smsOrigin" />
        <param name="destination" value="$_smsDestination" />
        <param name="content" value="$_smsMessage" />
    </params>
</httpRequest>