Submissions

Endpoints for creating and managing form submissions. These return the full submission model with nested field objects. For a simplified flattened view, see the Results API.


List All Submissions

Returns all submissions for a specific form.

Endpoint:

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

Example:

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

Response:

[
  {
    "formId": "feedbackform",
    "pageId": 123,
    "id": 1,
    "fields": {
      "comment": {
        "id": 1,
        "fieldId": "comment",
        "value": "Great page!"
      },
      "rating": {
        "id": 2,
        "fieldId": "rating",
        "value": "5"
      }
    },
    "timestamp": "2025-05-04T12:00:00.000+0000",
    "username": "jdoe"
  },
  {
    "formId": "feedbackform",
    "pageId": 123,
    "id": 2,
    "fields": {
      "comment": {
        "id": 3,
        "fieldId": "comment",
        "value": "Needs more details"
      },
      "rating": {
        "id": 4,
        "fieldId": "rating",
        "value": "2"
      }
    },
    "timestamp": "2025-05-04T12:01:00.000+0000",
    "username": "asmith"
  }
]

Get a Specific Submission

Returns a single submission by its ID.

Endpoint:

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

Example:

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

Response:

{
  "formId": "feedbackform",
  "pageId": 123,
  "id": 1,
  "fields": {
    "comment": {
      "id": 1,
      "fieldId": "comment",
      "value": "Great page!"
    },
    "rating": {
      "id": 2,
      "fieldId": "rating",
      "value": "5"
    }
  },
  "timestamp": "2025-05-04T12:00:00.000+0000",
  "username": "jdoe"
}

Returns 404 if the submission does not exist.


Create a New Submission

Creates a new form submission. The pageId and formId are set from the URL path. The authenticated user is recorded as the submitter.

Endpoint:

POST /rest/freshforms/1.0/page/{pageId}/form/{formId}/submission

Example:

curl -u username:password \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "fields": {
      "comment": {
        "fieldId": "comment",
        "value": "My new comment"
      },
      "rating": {
        "fieldId": "rating",
        "value": "5"
      }
    }
  }' \
  https://confluence.example.com/rest/freshforms/1.0/page/123/form/feedbackform/submission

Response: Returns 201 Created with the full submission object including the assigned id, timestamp, and username.

Validation Errors: Returns 400 Bad Request with a validation result object:

{
  "valid": false,
  "fieldErrors": {
    "comment": "This is a required field"
  },
  "errors": []
}

Update a Submission

Updates an existing submission. Only the fields you include in the request body will be updated — existing fields are preserved via a merge.

Endpoint:

POST /rest/freshforms/1.0/page/{pageId}/form/{formId}/submission/{id}

Example:

curl -u username:password \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "fields": {
      "comment": {
        "fieldId": "comment",
        "value": "Updated comment here"
      }
    }
  }' \
  https://confluence.example.com/rest/freshforms/1.0/page/123/form/feedbackform/submission/1

Response: Returns 200 OK with the full updated submission object.

Returns 404 if the submission does not exist. Returns 400 if validation fails.


Submission Object Reference

FieldTypeDescription
formIdstringForm identifier
pageIdnumberConfluence page ID
idnumberUnique submission ID
fieldsobjectMap of field ID to submission field object
timestampstringISO 8601 date/time of submission
usernamestringConfluence username of the submitter

Submission Field Object

FieldTypeDescription
idnumberUnique field entry ID
fieldIdstringField identifier matching the form definition
valuestringThe submitted value