POST request

Modified on Tue, 9 Apr at 2:02 PM

Using a POST request, you can send a larger volume of information in the request body in a convenient format. It supports two types of data: Text and JSON.

POST → JSON

To send a POST request with JSON structure data to the specified URL, choose the following:

For creating a JSON request body, you can use the following parameters:

  1. In “Available parameters”, by checking the boxes next to the variables, you can select which of the proposed variables will end up in the JSON request body. If you remove the checkmark, the variable will not get into the request body.

    If you click on the question mark, a text will be shown describing the information contained in the variable.

  2. In “User parameters”, you can add your own keys and their corresponding values or variables.

    ⚠️ Attention!

    You cannot insert a variable in the key field as this will cause an error. Pass variables in the adjacent value field.

     

  3. In “Query parameters”, you can also pass Query parameters in key - value format.

    Note:

    It is recommended to pass query parameters using a GET request.

     

  4. In the “Headers”, pass your headers if necessary.

    ⚠️ Attention!
    You cannot insert a variable in the key field as this will cause an error and the web hook will not work. Pass variables in the adjacent value field.

     

     

  • As an example, we filled in the fields: billsec, timestamp, eventType, InternalNumber.

     

    In this case, the following JSON structure will be formed:

    {
    "billsec": "${{billsec}}",
    "timestamp": "${{timestamp}}",
    "eventType": "${{eventType}}",
    "InternalNumber": "${{InternalNumber}}",
    "Key": "Example"
    }

    And it will come to the specified URL:

    {
    "billsec": "6",
    "timestamp": "1687271174",
    "eventType": "VpbxInboundCallEnd",
    "InternalNumber": "100",
    "Key": "Example"
    }

    As the values of these variables generated by a specific event will be substituted instead of variables in the format ${{…}}.

 

POST → Text

To send a POST request with Text data type to the specified URL, choose the following: 

For forming a request, the following parameters are available to you:

  1. In the “Available parameters” section, you can select variables generated as a result of the occurrence of the selected event. Circles with question marks contain variable descriptions, while elongated blue elements with variable names are interactive. When hovering over the text field and then pressing any variable, it will insert in the required format into the part of the text field where the cursor is, and also be copied to the clipboard.

  2. In the “Request body” section, there is a text field in which you can freely pass your data structure, which will eventually be sent to the selected URL. Also, remember that if you want to pass any of the provided variables in your free structure, just use the advice from the point above.

  3. In the “Query parameters” section, in the key - value format, you can pass Query parameters.

    Note:
    It is recommended to pass query parameters using a GET request.


  4. In the “Headers” section, pass your headers if necessary.

    ⚠️ Attention!
    You cannot insert a variable in the key field as this will cause an error and the web hook will not work. Pass variables in the adjacent value field.


 

Also see:

Webhooks

GET request

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article