Forms & Surveys

Forms

The Forms API allows you to retrieve information about forms, surveys, and assessments created in your organisation. Forms are used for applications, surveys, progress reports, scorecards, and session plans.

List Forms

Retrieve a paginated list of forms with optional filtering.

Endpoint

GET /api/v1/forms

Query Parameters

Pagination:

  • limit (number, default: 100, max: 250) - Maximum number of forms to return
  • offset (number, default: 0) - Number of forms to skip for pagination

Filtering:

  • type (string) - Filter by form type:
    • application - Application forms
    • survey - Survey forms
    • anonymous - Anonymous surveys
    • progress-report - Progress report forms
    • scorecard - Assessment scorecards
    • session-plan - Session planning forms
  • isArchived (boolean) - Filter by archive status
  • formFor (string) - Filter by who the form is for:
    • Members
    • Volunteers
    • Partners

Response

{
  "forms": [
    {
      "formId": "form_abc123",
      "name": "Client Intake Survey",
      "type": "survey",
      "managedBy": "org123",
      "description": "Initial assessment survey for new clients",
      "questionCount": 15,
      "sections": [
        {
          "title": "Personal Information",
          "description": "Basic contact details",
          "id": "section_1"
        },
        {
          "title": "Support Needs",
          "description": "Understanding your requirements",
          "id": "section_2"
        }
      ],
      "settings": {
        "isArchived": false,
        "isAnonymous": false,
        "individualMode": true,
        "requiresLogin": false,
        "coverPage": true,
        "afterSubmitMessage": "Thank you for completing this survey.",
        "hideQuestionNumbers": false,
        "calculateOverallScore": false,
        "scoreDirection": "ascending"
      },
      "linkedFormId": null,
      "assessmentFormId": null,
      "allowMultipleApplications": false,
      "deadline": "2025-03-31T23:59:59.000Z",
      "schemaForm": false,
      "formFor": "Members",
      "addPersonPublic": false,
      "created": "2025-01-01T10:00:00.000Z",
      "updated": "2025-01-15T14:30:00.000Z"
    }
  ],
  "offset": 0,
  "limit": 100,
  "total": 25
}

Example Requests

List all forms:

curl -X GET "https://app.plinth.org.uk/api/v1/forms" \
  -H "x-api-key: sk_your_api_key"

Filter by type:

curl -X GET "https://app.plinth.org.uk/api/v1/forms?type=survey" \
  -H "x-api-key: sk_your_api_key"

Filter active forms for members:

curl -X GET "https://app.plinth.org.uk/api/v1/forms?isArchived=false&formFor=Members" \
  -H "x-api-key: sk_your_api_key"

Get Single Form

Retrieve a specific form by ID, including full question details.

Endpoint

GET /api/v1/forms/:formId

Path Parameters

  • formId (string, required) - The unique identifier of the form

Response

{
  "form": {
    "formId": "form_abc123",
    "name": "Client Intake Survey",
    "type": "survey",
    "managedBy": "org123",
    "description": "Initial assessment survey for new clients",
    "sections": [
      {
        "title": "Personal Information",
        "description": "Basic contact details",
        "id": "section_1"
      },
      {
        "title": "Support Needs",
        "description": "Understanding your requirements",
        "id": "section_2"
      }
    ],
    "questions": [
      {
        "questionId": "q_001",
        "title": "What is your full name?",
        "type": "text",
        "section": 0,
        "required": true,
        "order": 1,
        "options": [],
        "description": "",
        "outcome": null,
        "validation": {
          "minAllowed": null,
          "maxAllowed": null,
          "wordCount": null
        },
        "hasConditions": false
      },
      {
        "questionId": "q_002",
        "title": "How did you hear about us?",
        "type": "select",
        "section": 0,
        "required": true,
        "order": 2,
        "options": [
          { "label": "Word of mouth", "value": "word_of_mouth" },
          { "label": "Social media", "value": "social_media" },
          { "label": "Website", "value": "website" },
          { "label": "Referral", "value": "referral" },
          { "label": "Other", "value": "other" }
        ],
        "description": "Select the option that best applies",
        "outcome": null,
        "validation": {},
        "hasConditions": false
      },
      {
        "questionId": "q_003",
        "title": "Please describe your support needs",
        "type": "textarea",
        "section": 1,
        "required": false,
        "order": 3,
        "options": [],
        "description": "Tell us about what support you're looking for",
        "outcome": "support_needs",
        "validation": {
          "wordCount": 500
        },
        "hasConditions": true
      }
    ],
    "settings": {
      "isArchived": false,
      "isAnonymous": false,
      "individualMode": true,
      "requiresLogin": false,
      "coverPage": true,
      "afterSubmitMessage": "Thank you for completing this survey.",
      "hideQuestionNumbers": false,
      "calculateOverallScore": false,
      "scoreDirection": "ascending"
    },
    "created": "2025-01-01T10:00:00.000Z",
    "updated": "2025-01-15T14:30:00.000Z"
  }
}

Example Request

curl -X GET "https://app.plinth.org.uk/api/v1/forms/form_abc123" \
  -H "x-api-key: sk_your_api_key"

Response Fields

Form Object (List)

FieldTypeDescription
formIdstringUnique identifier for the form
namestringForm name/title
typestringForm type (application, survey, anonymous, progress-report, scorecard, session-plan)
managedBystringOrganisation ID that manages this form
descriptionstringForm description
questionCountnumberTotal number of questions
sectionsarrayForm sections
settingsobjectForm configuration settings
linkedFormIdstring/nullID of linked form (if any)
assessmentFormIdstring/nullID of assessment form (if any)
allowMultipleApplicationsbooleanWhether multiple submissions are allowed
deadlinestring/nullSubmission deadline (ISO 8601)
schemaFormbooleanWhether this is a schema form
formForstring/nullTarget audience (Members, Volunteers, Partners)
addPersonPublicbooleanWhether the form can add people publicly
createdstringCreation timestamp (ISO 8601)
updatedstringLast update timestamp (ISO 8601)

Question Object

FieldTypeDescription
questionIdstringUnique question identifier
titlestringQuestion text
typestringQuestion type (see Question Types below)
sectionnumberSection index (0-based)
requiredbooleanWhether the question is required
ordernumberDisplay order within section
optionsarrayAvailable options for select/multiselect types
descriptionstringHelp text or description
outcomestring/nullAssociated outcome ID
validationobjectValidation rules
hasConditionsbooleanWhether the question has conditional display logic

Question Types

Forms support the following question types:

Text Input Types

TypeDescription
Text InputSingle-line text field for short answers
Paragraph Text InputMulti-line text area for longer responses
numberNumeric input field

Selection Types

TypeDescription
Multiple ChoiceRadio button selection (single choice)
DropdownBasic dropdown select (single choice)
Dropdown with custom inputDropdown with an "Other" option allowing free text
Dropdown: Multiple choiceMulti-select dropdown
CheckboxMultiple checkbox selections
Likert ScaleScale-based survey questions (e.g., 1-5, Strongly Agree to Strongly Disagree)
RankingDrag-and-drop ranked list

Specialised Input Types

TypeDescription
LocationLocation/address picker
CountryCountry selector dropdown
TagTag input for categorisation
RelationshipRelationship mapping between entities
TableTabular data entry with rows and columns

Media & File Types

TypeDescription
Upload ImagesImage file upload
Upload DocumentDocument file upload (PDF, Word, etc.)
Upload VideoVideo file upload
Video LinkVideo URL input (YouTube, Vimeo, etc.)
Media EmbedEmbedded media content

Display Types (Non-Interactive)

TypeDescription
HeadingSection heading/divider (no user input)
Explainer TextExplanatory text block (no user input)

Note

Display types like Heading and Explainer Text appear in the questions array but don't collect responses. They're used for form structure and instructions.

Settings Object

FieldTypeDescription
isArchivedbooleanWhether the form is archived
isAnonymousbooleanWhether responses are anonymous
individualModebooleanIndividual vs group mode
requiresLoginbooleanWhether login is required to submit
coverPagebooleanWhether to show a cover page
afterSubmitMessagestringMessage shown after submission
hideQuestionNumbersbooleanWhether to hide question numbers
calculateOverallScorebooleanWhether to calculate an overall score
scoreDirectionstringScore direction (ascending/descending)

Error Responses

StatusDescription
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
404Not Found - Form not found
500Internal Server Error
Previous
Bookings