Forms

Read-only endpoints for retrieving form definitions from a Confluence page. Use these to discover what forms exist on a page and inspect their field configuration.


List All Forms on a Page

Returns all forms defined on the specified page.

Endpoint:

GET /rest/freshforms/1.0/page/{pageId}/form

Example:

curl -u username:password \
  https://confluence.example.com/rest/freshforms/1.0/page/123/form

Response:

[
  {
    "formId": "feedbackform",
    "pageId": 123,
    "macroId": "abc-123-def",
    "anonymous": false,
    "oneSubmission": false,
    "fields": {
      "comment": {
        "type": "textbox",
        "fieldId": "comment",
        "label": "Comment",
        "macroId": "def-456-ghi",
        "required": true,
        "validationType": null,
        "validations": [],
        "condition": null,
        "rank": 0
      },
      "rating": {
        "type": "dropdown",
        "fieldId": "rating",
        "label": "Rating",
        "macroId": "ghi-789-jkl",
        "required": false,
        "validationType": "one-of",
        "validations": [
          { "value": "1" },
          { "value": "2" },
          { "value": "3" },
          { "value": "4" },
          { "value": "5" }
        ],
        "condition": null,
        "rank": 1
      }
    },
    "conditions": {}
  }
]

Get a Specific Form

Returns the definition for a single form on a page.

Endpoint:

GET /rest/freshforms/1.0/page/{pageId}/form/{formId}

Example:

curl -u username:password \
  https://confluence.example.com/rest/freshforms/1.0/page/123/form/feedbackform

Response:

{
  "formId": "feedbackform",
  "pageId": 123,
  "macroId": "abc-123-def",
  "anonymous": false,
  "oneSubmission": false,
  "fields": {
    "comment": {
      "type": "textbox",
      "fieldId": "comment",
      "label": "Comment",
      "macroId": "def-456-ghi",
      "required": true,
      "validationType": null,
      "validations": [],
      "condition": null,
      "rank": 0
    }
  },
  "conditions": {}
}

Form Object Reference

FieldTypeDescription
formIdstringUnique form identifier on the page
pageIdnumberConfluence page ID
macroIdstringInternal Confluence macro ID
anonymousbooleanWhether submissions are anonymous
oneSubmissionbooleanWhether each user is limited to one submission
fieldsobjectMap of field ID to field definition
conditionsobjectMap of macro ID to condition definition

Field Object

FieldTypeDescription
typestringField type (e.g., textfield, textbox, dropdown, radio, checkbox, date, status, file)
fieldIdstringUnique field identifier
labelstringDisplay label shown to users
macroIdstringInternal Confluence macro ID
requiredbooleanWhether the field is mandatory
validationTypestringValidation type (one-of, any-of, numeric, alpha, email, date, file, or null)
validationsarrayList of validation values (e.g., allowed dropdown options)
conditionobjectConditional visibility rule, or null
ranknumberDisplay order of the field