Create a question for a section

POST /api/v1/form/{form_uuid}/question

Headers

Path parameters

application/json

Body Required

  • type string Required

    The type of the question

  • required boolean Required

    Whether the question is required or not

  • title string Required

    The title of the question

  • Input placeholder

  • caption string

    User friendly description of what should be input

  • position integer Required

    The position of the question in the section.

  • selection_options array[string] Required

    The selection options for the question IF the question is of type selection.

  • section_uuid string Required

    The uuid of the section to move the question to.

  • The field to update if the question is filled in

  • Create a question from a linked field, with this, the type and selection options can be ignored

  • If this is a contact detail or address field, should it be made primary?

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • uuid string

      The UUID of the resource.

    • The timestamp of when the resource was created.

    • The timestamp of when the resource was updated.

    • section object

      The section this question belongs to

    • title string

      The title of the question

    • Input placeholder text

    • caption string

      Text to describe the input

    • type string

      The type of question

    • required boolean

      Whether the question is required

    • position integer

      The position of the question in the section

    • selection_options array[string]

      The options for selection questions

    • The field to update upon question completion

    • key string

      The key to use when updating the target field

    • the linked form question

    • Will the this linked field become a primary Address/Phone Number/Email Address

POST /api/v1/form/{form_uuid}/question
curl \
 --request POST 'https://api.plannrcrm.com/api/v1/form/form_uuid/question' \
 --header "Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}" \
 --header "Content-Type: application/json" \
 --header "Accept: application/json" \
 --header "X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}" \
 --data '{"type":"string","required":"true","title":"What is your name?","help_text":"Gareth","caption":"Enter your full legal name","position":0,"selection_options":["apple","orange"],"section_uuid":"f4a5298e-fcf4-4915-9a89-d5d8d1b51120","target_field":"client.first_name","linked_question_field":"first_name","linked_primary":false}'
Request examples
# Headers
Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}
Content-Type: application/json
Accept: application/json
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}

# Payload
{
  "type": "string",
  "required": "true",
  "title": "What is your name?",
  "help_text": "Gareth",
  "caption": "Enter your full legal name",
  "position": 0,
  "selection_options": [
    "apple",
    "orange"
  ],
  "section_uuid": "f4a5298e-fcf4-4915-9a89-d5d8d1b51120",
  "target_field": "client.first_name",
  "linked_question_field": "first_name",
  "linked_primary": false
}
Response examples (200)
{
  "key": "what_is_your_name",
  "type": "string",
  "uuid": "6426df52-79e1-4c6c-988e-f97b3f27e4ea",
  "title": "What is your name?",
  "caption": "Your full legal name",
  "section": {
    "form": "App\\Http\\Resources\\FormResource",
    "uuid": "47458493-d976-4118-bb88-76af7840f85c",
    "title": "Personal Details",
    "position": 1,
    "questions": "App\\Http\\Resources\\FormQuestionResource",
    "created_at": "2025-04-30T15:05:04+01:00",
    "updated_at": "2025-04-30T15:05:04+01:00"
  },
  "position": 1,
  "required": true,
  "help_text": "Gareth",
  "created_at": "2025-04-30T15:05:04+01:00",
  "updated_at": "2025-04-30T15:05:04+01:00",
  "target_field": "name",
  "linked_primary": true,
  "linked_question": {
    "type": "selection",
    "field": "gender",
    "label": "Gender",
    "caption": "Your drink preference",
    "forced_required": false,
    "formatted_field": "Gender",
    "is_custom_field": false,
    "selection_options": [
      "male",
      "female",
      "non-binary",
      "transgender",
      "intersex",
      "other",
      "unknown"
    ]
  },
  "selection_options": [
    "option 1",
    "option 2"
  ]
}