Available on: Professional, Business plans
Before you can use the form APIs, you first need to create your form's API keys, create an authenticated request, and retrieve your form's hashid.
Get Submissions
GET https://formspree.io/api/0/forms/<hashid>/submissionsFetch all your submissions.
Example:
curl -u :API_KEY https://formspree.io/api/0/forms/<hashid>/submissionsSample result:
{
"fields": [
"_date",
"email",
"message",
"_status"
],
"submissions": [
{
"_date": "2018-11-03T07:28:29.707632",
"email": "myemail@example.com",
"message": "asdfasdf",
"_status": {
"my@email.com": {
"delivered": true,
"processed": true,
"dispatched": true
},
"plugin:discord": {
"processed": true
}
}
},
...
]
}Filtering results
You can filter results by passing URL parameters to the Get Submissions endpoint.
since
Use the since parameter to get all submissions since a date. Dates must be ISO formatted, such as 2018-11-03T12:00:00.
Example:
curl https://formspree.io/api/0/forms/<hashid>/submissions?since=2018-11-03T12:00:00limit
Use the limit parameter to limit the number of results.
Example:
curl https://formspree.io/api/0/forms/<hashid>/submissions?limit=10offset
Use the offset parameter as a cursor in pagination. This is frequently used in conjunction with limit, so you can view submissions before your previous query.
curl https://formspree.io/api/0/forms/<hashid>/submissions?offset=10order
Use the order parameter to change the order. By default the order is desc.
Example:
curl https://formspree.io/api/0/forms/<hashid>/submissions?order=ascspam
Use the spam parameter to return messages that have been flagged or marked as spam. By default this value is false.
Example:
curl https://formspree.io/api/0/forms/<hashid>/submissions?spam=true* note: feature that has not been fully rolled out. We will update this when the option is available for all accounts.