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>/submissions
Fetch all your submissions.
Example:
curl -u :API_KEY https://formspree.io/api/0/forms/<hashid>/submissions
Sample 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:00
limit
Use the limit
parameter to limit the number of results.
Example:
curl https://formspree.io/api/0/forms/<hashid>/submissions?limit=10
offset
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=10
order
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=asc
spam*
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: this feature has not been fully rolled out. We will update this when the option is available for all accounts.