Welcome to the OpenCities help centre. Search for what you're after, or browse the categories.
Can't find what you're looking for? Submit a support ticket and we'll be in touch.

Follow

Form Responses API

avatar of Kira Hartley

Kira Hartley

Last updated

In this user guide:

Get Form Responses

Endpoint: GET /form/{formId}/responses 

Authentication: Required 

Description: Returns a list of form responses for the given form, with optional time period and pagination.

Parameters

Parameter Type Required Description
formId string Yes Form ID (path parameter)
from string (dateTime) No Include responses from given time (inclusive)
to string (dateTime) No Include responses up to given time (inclusive)
offset integer No Offset for pagination. Default: 0
limit integer No Number of responses to retrieve. Default: 20, Max: 100

Sample Request

curl -u "your_app_id:your_api_key" \
  -H "Content-Type: application/json" \
  "https://your-domain.com/api/v1/form/d0ef0fc9-f9a9-4dda-a2c2-17e949f58f7f/responses?from=2025-01-01T00:00:00Z&to=2025-12-31T23:59:59Z&offset=0&limit=10"

Sample Response

{
  "Total": 25,
  "Limit": 10,
  "Offset": 0,
  "Items": [
    {
      "form_response_id": "bc77961e-0f78-4cb3-869d-40b574e7221e",
      "form_id": "d0ef0fc9-f9a9-4dda-a2c2-17e949f58f7f",
      "submit_date": "2025-10-15T14:30:00Z",
      "submit_url": "/contact-us",
      "user_name": "john.doe",
      "ip_address": "192.168.1.1",
      "reference_id": "REF_001",
      "answers": [
        {
          "control_id": "34832679-c1bc-491d-ad6a-8ff2b36759db",
          "label": "First name",
          "value": "John"
        },
        {
          "control_id": "15b38c4b-f2e3-408f-ad50-913a346bb573",
          "label": "Surname",
          "value": "Doe"
        },
        {
          "control_id": "4a6ba8a7-53a3-401c-bc27-481e5b50562f",
          "label": "Email",
          "value": "john.doe@example.com"
        },
        {
          "control_id": "c8a5ed15-ed4f-4ab9-9f02-bbc30d553573",
          "label": "My request relates to...",
          "value": "General Inquiry"
        },
        {
          "control_id": "f2b84a95-aa15-4517-a395-f3833ca53593",
          "label": "Please give us more information",
          "value": "I would like to know more about your services and how to get started."
        }
      ]
    },
    {
      "form_response_id": "b0da5677-8682-48ee-bcbc-1647eb0b6228",
      "form_id": "d0ef0fc9-f9a9-4dda-a2c2-17e949f58f7f",
      "submit_date": "2025-10-14T09:15:00Z",
      "submit_url": "/contact-us",
      "user_name": "jane.smith",
      "ip_address": "192.168.1.2",
      "reference_id": "REF_002",
      "answers": [
        {
          "control_id": "34832679-c1bc-491d-ad6a-8ff2b36759db",
          "label": "First name",
          "value": "Jane"
        },
        {
          "control_id": "15b38c4b-f2e3-408f-ad50-913a346bb573",
          "label": "Surname",
          "value": "Smith"
        },
        {
          "control_id": "4a6ba8a7-53a3-401c-bc27-481e5b50562f",
          "label": "Email",
          "value": "jane.smith@example.com"
        },
        {
          "control_id": "8a9020f3-845e-4bfe-8437-da11695835a2",
          "label": "Preferred contact method",
          "value": "Email"
        },
        {
          "control_id": "c8a5ed15-ed4f-4ab9-9f02-bbc30d553573",
          "label": "My request relates to...",
          "value": "Technical Support"
        }
      ]
    }
  ]
}

Get Single Form Response

Endpoint: GET /formresponse/{formResponseId} 

Authentication: Required 

Description: Returns a specific form response by ID.

Parameters

Parameter Type Required Description
formResponseId string Yes Form response ID (path parameter)

Sample Request

curl -u "your_app_id:your_api_key" \
  -H "Content-Type: application/json" \
  "https://your-domain.com/api/v1/formresponse/bc77961e-0f78-4cb3-869d-40b574e7221e"

Sample Response

{
  "form_response_id": "bc77961e-0f78-4cb3-869d-40b574e7221e",
  "form_id": "36841272-bd6c-4577-bb60-79700fd2c27c",
  "submit_date": "2025-10-15T14:30:00Z",
  "submit_url": "/careers/job-application",
  "user_name": "applicant.user",
  "ip_address": "192.168.1.10",
  "reference_id": "JOB_APP_001",
  "answers": [
    {
      "control_id": "205f8479-0c64-45ca-b2e2-b7510e09c9ea",
      "label": "Salutation",
      "value": "Mr"
    },
    {
      "control_id": "3bd42939-65a5-4791-8e16-b406bf996d1a",
      "label": "First name",
      "value": "Michael"
    },
    {
      "control_id": "7b068403-cd9b-47be-ba89-a27a5ec96f74",
      "label": "Surname",
      "value": "Johnson"
    },
    {
      "control_id": "2e8c6e6c-a99e-4489-9691-6d5ca668cf3f",
      "label": "Email address",
      "value": "michael.johnson@example.com"
    },
    {
      "control_id": "5c77c238-be8b-4e79-9613-f6cb72597ec0",
      "label": "Why do you think you would be good for this role?",
      "value": "I have 5 years of experience in this field and strong technical skills that align with your requirements."
    },
    {
      "control_id": "13b154a9-ac12-45a4-b312-a0dce8a460af",
      "label": "Upload your cover letter",
      "value": "cover-letter-michael-johnson.pdf"
    },
    {
      "control_id": "baec0eb2-6f3c-46f3-8c15-887808b7d6e1",
      "label": "Upload your CV/Resume",
      "value": "resume-michael-johnson.pdf"
    }
  ]
}

Get Form Response File

Endpoint: GET /formresponse/{formResponseId}/{controlId}/file 

Authentication: Required 

Description: Gets the file uploaded for a specific form response and control.

Parameters

Parameter Type Required Description
formResponseId string Yes Form response ID (path parameter)
controlId string Yes Control ID for file field (path parameter)

Sample Request

curl -u "your_app_id:your_api_key" \
  "https://your-domain.com/api/v1/formresponse/bc77961e-0f78-4cb3-869d-40b574e7221e/13b154a9-ac12-45a4-b312-a0dce8a460af/file" \
  --output cover-letter.pdf
Was this article helpful?
0 out of 0 found this helpful