Form Builder API
POST /services/forms/v1/form-submissions/dashboard-stats Auth

Form Submissions Dashboard Statistics

Returns submission counts bucketed by interval (hour/daily/weekly/monthly) along with headline KPIs for the requested date range. Optionally accepts a comparison period for year-over-year style deltas. All bucketing is done in the authenticated user's timezone so chart labels match what the user sees in the rest of the dashboard.

Request Body Required

FieldTypeRequiredDescriptionExample
form_id integer No 42
start_date string (date-time) Yes 2026-01-01 00:00:00
end_date string (date-time) Yes 2026-03-31 23:59:59
compare_start_date string|null (date-time) No 2025-01-01 00:00:00
compare_end_date string|null (date-time) No 2025-03-31 23:59:59
interval string
hour, daily, weekly, monthly
No weekly

Responses

500
200
422
401
403
429
Internal server error
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
Successful response
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
data object
data.interval mixed
data.auto_interval string
monthly, weekly, daily, hour
data.disabled_intervals mixed[]
data.chart object
data.compare_chart object|null
data.stats object
Validation error
FieldTypeDescription
message string Errors overview.
errors object A detailed description of each field that failed validation.
Unauthenticated — missing or invalid Bearer token
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
Forbidden — insufficient permissions for this resource
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
Too Many Requests — rate limit exceeded
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
Retry-After integer Seconds until the rate limit resets 60
FieldTypeDescription
error boolean
message string
Base URL
https://api.wemasy.nl/api
Authentication

Request Sample
cURL
JS
PHP
Python
curl -X POST "https://api.wemasy.nl/api/services/forms/v1/form-submissions/dashboard-stats" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "form_id": 42,
    "start_date": "2026-01-01 00:00:00",
    "end_date": "2026-03-31 23:59:59",
    "compare_start_date": "2025-01-01 00:00:00",
    "compare_end_date": "2025-03-31 23:59:59",
    "interval": "weekly"
}'
fetch('https://api.wemasy.nl/api/services/forms/v1/form-submissions/dashboard-stats', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "form_id": 42,
    "start_date": "2026-01-01 00:00:00",
    "end_date": "2026-03-31 23:59:59",
    "compare_start_date": "2025-01-01 00:00:00",
    "compare_end_date": "2025-03-31 23:59:59",
    "interval": "weekly"
})})
.then(r => r.json())
.then(data => console.log(data));
$response = Http::withToken('YOUR_API_TOKEN')
    ->accept('application/json')
    ->post('https://api.wemasy.nl/api/services/forms/v1/form-submissions/dashboard-stats', {
    "form_id": 42,
    "start_date": "2026-01-01 00:00:00",
    "end_date": "2026-03-31 23:59:59",
    "compare_start_date": "2025-01-01 00:00:00",
    "compare_end_date": "2025-03-31 23:59:59",
    "interval": "weekly"
});
$data = $response->json();
import requests

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
data = {
    "form_id": 42,
    "start_date": "2026-01-01 00:00:00",
    "end_date": "2026-03-31 23:59:59",
    "compare_start_date": "2025-01-01 00:00:00",
    "compare_end_date": "2025-03-31 23:59:59",
    "interval": "weekly"
}
r = requests.post("https://api.wemasy.nl/api/services/forms/v1/form-submissions/dashboard-stats", headers=headers, json=data)
print(r.json())
Response Example
{
    "error": false,
    "data": {
        "interval": "string",
        "auto_interval": "string",
        "disabled_intervals": [],
        "chart": {
            "labels": [],
            "values": []
        },
        "compare_chart": {
            "labels": [],
            "values": []
        },
        "stats": {
            "total": "string",
            "daily_average": 0,
            "peak_count": "string",
            "peak_label": "string",
            "active_forms": 0,
            "compare_total": "string",
            "compare_trend": "string",
            "compare_percentage": 0
        }
    }
}

Try It
Request Body Required

Export