Programmatic access to engagement data from the Client Reporting Dashboard
All endpoints (except /health) require an API key in the X-API-Key header.
curl -H "X-API-Key: your-api-key" https://portal-api.asperasalesagency.fi/stats
List engagements with filtering and pagination.
| Parameter | Type | Default | Description |
|---|---|---|---|
date_from | date | 30 days ago | Start date (YYYY-MM-DD) |
date_to | date | today | End date (YYYY-MM-DD) |
search | string | - | Search in company, name, email, comment |
status | string | - | Filter by status (Dialogi, Onnistuminen, etc.) |
company | string | - | Filter by company name (partial match) |
page | int | 1 | Page number |
size | int | 50 | Results per page (max 1000) |
client | string | - | Admin only: filter by client name |
curl -H "X-API-Key: $API_KEY" \
"https://portal-api.asperasalesagency.fi/engagements?date_from=2026-01-01&status=Onnistuminen&size=10"
Get engagement statistics (same calculations as the dashboard).
| Parameter | Type | Default | Description |
|---|---|---|---|
date_from | date | 30 days ago | Start date (YYYY-MM-DD) |
date_to | date | today | End date (YYYY-MM-DD) |
client | string | - | Admin only: filter by client name |
{
"status_distribution": {"Dialogi": 95, "Onnistuminen": 32, "Vastaaja": 120},
"dialogues_count": 127,
"success_count": 32,
"total_engagements": 247,
"date_range": {"from": "2026-01-01", "to": "2026-01-31"}
}
Health check (no authentication required).
curl https://portal-api.asperasalesagency.fi/health
| Status | Description |
|---|---|
Onnistuminen | Success - meeting booked or deal created |
Dialogi | Dialogue - meaningful conversation |
Vastaaja | Voicemail |
Ei vastaa | No answer |
Kieltäytyi | Declined |
| Code | Description |
|---|---|
| 401 | Missing or invalid API key |
| 403 | Access denied (e.g., client key accessing other client's data) |
| 404 | Resource not found |
Portal Data API v1.0.0 • Contact Support