Dispatch a Form Using the API with ReqBin

This topic describes how to use the TrueContext REST API to dispatch a form with the ReqBin online API testing tool.

Info:We're now TrueContext.

To support both new and existing integrations, the TrueContext REST API will continue to use api.prontoforms.com as the base URL.

Available on all tiers:

Digital
Intelligent
Elite
?

Contents


Prerequisites


Steps

  1. Go to https://reqbin.com/.

  2. In the URL field, enter https://api.prontoforms.com/api/1.1/data/dispatch.json

  3. Select POST as the HTTP method as shown in the following example.

  4. Under Authorization, select Basic Auth.

    Enter the following:

    • For the Username, enter the API Key ID.

    • For the Password, enter the API Key Secret.

  5. Under Content, select JSON (application/json).

  6. Enter the following Request Body. Enter the Form ID, Username, Unique IDs, and the answers you want to dispatch where needed.

    {
      "formId": "{formId}",
      "username": "{username}",
      "data": [
        {
          "label": "{uniqueId1}",
          "answer": "{answer1}"
        },
        {
          "label": "{uniqueId2}",
          "answer": "{answer2}"
        },
        {
          "label": "{uniqueId3}",
          "answer": "{answer3}"
        }
      ]
    }
    

    The Request Body might look like the following example.

    {
      "formId": "149119149",
      "username": "username.user",
      "data": [
        {
          "label": "CompanyName",
          "answer": "ProntoForms"
        },
        {
          "label": "Email",
          "answer": "sample@mycompany.com"
        },
        {
          "label": "PhoneNumber",
          "answer": "6132229999"
        }
      ]
    }
    
  7. Select Send.

    Result: You used the API to dispatch a form. The system returns a Response Body similar to the following example.

    {
        "dataId": "18188004681",
        "referenceNumber": "20210520-18188004681"
    }