Appearance
API - GET Form Submissions ​
Here tou can get a list of your form's submissions https://api.headlessforms.cloud/api/v1/form/{FORM_TOKEN}?api_token={API_TOKEN}
Available params ​
Key | value | |
---|---|---|
api_token | {API_TOKEN} | Required. If you do not have an API token, you can create it in your profile |
page | 2 | Default value: 1 |
per_page | 100 | Default value: 50 |
offset | 2 | Default value: 0 |
order_by | created_at | Default value: created_at |
order_direction | ASC | Default value: DESC |
order_by
optional values:
- id
- form_id
- is_valid
- is_spam
- referer
- created_at
- updated_at
- deleted_at
HEADERS ​
Key | Value |
---|---|
Content-Type | application/json |
Accept | application/json |
Example request ​
sh
curl --location --request GET 'https://api.headlessforms.cloud/api/v1/form-submission/{FORM_TOKEN}?api_token={API_TOKEN}&page=1&per_page=50&offset=2&order_by=created_at&order_direction=ASC' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json'
Possible Responses ​
Success
json
{
"message": "Submissions List",
"data": {
"current_page": 1,
"data": [
{
"id": 7,
"form_id": "e3f0f882-17d0-41d3-88d7-567b8e66345a",
"data": {
"name": "John Doe",
"email": "john@mail.com",
"_validation_messages": {
"name": {
"max": "Should maximum :max letters",
"required": "You fme orget to enter :attribute"
}, "email": {
"type": "Incorrect email address",
"required": "Missing custom :attribute attribute!"
}
}
},
"validation_errors": [],
"is_valid": true,
"spam_score": 0,
"spam_score_reason": null,
"is_spam": false,
"referer": null,
"user_agent": "curl/7.64.1",
"ip": "127.0.0.1",
"created_at": "2021-07-20T14:28:58.000000Z",
"updated_at": "2021-07-20T14:28:58.000000Z",
"deleted_at": null
},
{
"id": 11,
"form_id": "e3f0f882-17d0-41d3-88d7-567b8e66345a",
"data": {
"name": "John Doe",
"email": "john@mail.com",
"_validation_messages": {
"name": {
"max": "Should be maximum :max letters",
"required": "You forget to enter :attribute"
}, "email": {
"type": "Incorrect email address",
"required": "Missing custom :attribute attribute!"
}
}
},
"validation_errors": [],
"is_valid": true,
"spam_score": 0,
"spam_score_reason": null,
"is_spam": false,
"referer": null,
"user_agent": "curl/7.64.1",
"ip": "172.22.0.1",
"created_at": "2021-07-20T14:28:51.000000Z",
"updated_at": "2021-07-20T14:28:51.000000Z",
"deleted_at": null
},
...
],
"first_page_url": "https://api.headlessforms.cloud/api/v1/form/{FORM_TOKEN}?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://api.headlessforms.cloud/api/v1/form/{FORM_TOKEN}?page=1",
"next_page_url": null,
"path": "https://api.headlessforms.cloud/api/v1/form/{FORM_TOKEN}",
"per_page": 50,
"prev_page_url": null,
"to": 8,
"total": 8
},
"error": null
}
Wrong Form token
json
{
"status": 204,
"error": "Form Not Found",
"message": "Error",
"data": []
}
Wrong API token
200 OK
json
{
"message": "Unauthenticated."
}