Skip to main content

Form response confirmation

Log in to add to favourites

When you submit a form response through the Forms API, the API returns the following payload:

NameTypeFormatDescription
confirmationobject-Contains the result of the confirmation rule triggered.
formobject-Contains the form submission details.
form.fieldNameany-A property for each field submitted by the user. i.e. emailAddress, name, mobileNumber, typeOfEnquiry and enquiry
sysobject-System metadata related to the submission.
sys.idstringuuidThe unique ID of the form entry created.
sys.dataFormatstringdataFormatThe data format of the submission, in the case of a form this will always be form
sys.languagestringlanguage codeThe language of the submission

Example of a form response confirmation

json
{
  "confirmation": {
    "content": "<p>Thanks for your FOI request. We aim to respond to all FOI requests within 72 hours.</p>"
  },
  "form": {
    "emailAddress": "emily.dawson@fictionalcorp.com",
    "enquiry": null,
    "mobileNumber": "07123 987654",
    "name": "Emily Dawson",
    "reference": "EF 0227 0144 0067",
    "typeOfEnquiry": "request-for-information",
    "entryTitle": "EF 0227 0144 0067",
    "entryDescription": null,
    "sys": {
      "id": "3d5d6498-1fb4-4d2a-8973-493a9f0ac6b8",
      "dataFormat": "form",
      "language": "en-GB"
    }
  }
}

Confirmation object: variants

The confirmation object returned depends on the type of confirmation configured in the content type.

1. HTML content

If the confirmation is an HTML message, the content field contains the formatted message:

json
{
  "confirmation": {
    "content": "<p>Thanks for your FOI request. We aim to respond to all FOI requests within 72 hours.</p>"
  }
}

2. URL redirect

If a redirect is configured, the link field provides the target URI:

json
{
  "confirmation": {
    "link": {
      "sys": {
        "uri": "/en-gb/books/billy-and-the-minpins"
      }
    }
  }
}
  • link.sys.uri: The URL to which the user should be redirected to after form submission.

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request