FormBackend logo

Api

Submissions

How to use the submission endpoints

End-points

Action Method URL
All submissions for a form GET /api/v1/forms/:identifier/submissions
Delete a submission DELETE /api/v1/forms/:identifier/submissions/:id

Object

{
  "id": 980190963,
  "created_at": "2023-12-11T15:54:09.824Z",
  "values": {"name": "John Doe", "email": "john@example.org"},
  "url": "https://www.formbackend.com/forms/:identifier/submissions/980190963",
  "form_url": "https://www.formbackend.com/forms/:identifier",
  "trash": false,
  "spam": false
  "previous_page": null,
  "next_page": "https://www.formbackend.com/api/v1/forms/:identifier/submissions?page=2",
  "next_page_number": 2,
  "prev_page_number": null,
  "last_url": "https://www.formbackend.com/api/v1/forms/:identifier/submissions?page=2",
  "first_url": "https://www.formbackend.com/api/v1/forms/:identifier/submissions?page=1",
  "items": 100,
  "count": 150
}

Pagination

Records are paginated with a max of 100 per page. You can get the url of the next page via the next_page attribute, as well as the previous page from prev_page. first_url and last_url contains the URL for the first and last page of the results. count is the total number of items and items is the current number for the page you’re on.

List all submissions for a form

curl -H 'Authorization: Bearer exampletoken' -X POST https://www.formbackend.com/api/v1/forms/:identifier/submissions
{
  "submissions": [
    {
      "id": 980190963,
      "created_at": "2023-12-11T15:54:09.824Z",
      "values": {"name": "John Doe", "email": "john@example.org"},
      "url": "https://www.formbackend.com/forms/:identifier/submissions/980190963",
      "form_url": "https://www.formbackend.com/forms/:identifier",
      "trash": false,
      "spam": false
    },
  ],
  "previous_page": null,
  "next_page": "https://www.formbackend.com/api/v1/forms/:identifier/submissions?page=2",
  "next_page_number": 2,
  "prev_page_number": null,
  "last_url": "https://www.formbackend.com/api/v1/forms/:identifier/submissions?page=2",
  "first_url": "https://www.formbackend.com/api/v1/forms/:identifier/submissions?page=1",
  "items": 100,
  "count": 150
}

Delete a submission

curl -H 'Authorization: Bearer exampletoken' -X DELETE https://www.formbackend.com/api/v1/forms/:identifier/submissions/:id