Create a section for a form

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

Headers

Path parameters

application/json

Body Required

  • title string Required

    The title of the section

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.

    • form object

      The form this section belongs to

    • title string

      The title of the section

    • position integer

      The position of the section

    • The questions in the section

POST /api/v1/form/{form_uuid}/section
curl \
 -X POST https://api.plannrcrm.com/api/v1/form/form_uuid/section \
 -H "Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}" \
 -H "Content-Type: application/json" \
 -H "Accept: application/json" \
 -H "X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}" \
 -d '{"title":"Section 1.1"}'
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
{
  "title": "Section 1.1"
}
Response examples (200)
{
  "form": {
    "live": true,
    "uuid": "832d1794-c37b-4f5d-ae5a-edef28fd5acb",
    "title": "Annual Catchup 2022",
    "sections": "App\\Http\\Resources\\FormQuestionResource",
    "created_at": "2024-10-16T11:10:14+01:00",
    "updated_at": "2024-10-16T11:10:14+01:00",
    "visibility": "public",
    "client_type": "client",
    "description": "This is the annual catchup form for 2022",
    "allowed_hosts": [
      "domain.com",
      "subdomain.domain.com"
    ],
    "create_client": true,
    "draft_submissions_count": 5,
    "submitted_submissions_count": 5
  },
  "uuid": "b33c085a-80ed-4e77-b6d1-b38861630668",
  "title": "Personal Details",
  "position": 1,
  "questions": {
    "key": "what_is_your_name",
    "type": "string",
    "uuid": "e573ff64-dd4d-4ffe-bd95-fbd757477a37",
    "title": "What is your name?",
    "caption": "Your full legal name",
    "section": "App\\Http\\Resources\\FormSectionResource",
    "position": 1,
    "required": true,
    "help_text": "Gareth",
    "created_at": "2024-10-16T11:10:14+01:00",
    "updated_at": "2024-10-16T11:10:14+01:00",
    "target_field": "name",
    "linked_primary": true,
    "linked_question": "App\\Http\\Resources\\FormBuilder\\LinkedFormQuestionResource",
    "selection_options": [
      "option 1",
      "option 2"
    ]
  },
  "created_at": "2024-10-16T11:10:14+01:00",
  "updated_at": "2024-10-16T11:10:14+01:00"
}