API Reference
POST snapshots
Replace the latest snapshot for a (worker, snapshotType) pair. The user strip renders up to four metrics per app from the most recent snapshot.
Endpoint
POST
/api/v1/ingest/snapshotsHeaders
| Field | Type | Notes |
|---|---|---|
| Authorization | Bearer | Required. |
| Content-Type | application/json | Required. |
| Idempotency-Key | string ≤ 200 | Recommended. Replay-safe for 10 min. |
Request body
| Field | Type | Notes |
|---|---|---|
| snapshotType | string | Required. Stable id for this snapshot kind. |
| actor | Actor | Required. See POST events actor table. |
| timestamp | ISO 8601 | Optional. Defaults to now. |
| metrics | Record<string, Metric> | Required. number | string | { value, unit, label }. |
| metadata | object | Optional. ≤ 16 KB JSON. |
Metric values may be:
- A finite number (preferred)
- A short string label (≤ 120 chars)
- A rich object:
{ value, unit, label }whereunitis one ofcount,minutes,ratio,percentage, orscore
Example
curl -X POST "https://wepeople.app/api/v1/ingest/snapshots" \
-H "Authorization: Bearer $WEPEOPLE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: snapshot-oncall-001" \
-d '{
"snapshotType": "tickets_open",
"actor": { "email": "alex@acme.com" },
"metrics": {
"open": 7,
"sla": { "value": 0.92, "unit": "ratio", "label": "SLA %" }
}
}'Response 202
{
"requestId": "req_01HP3K5V4J3M9NVT8XZKQ9YQ2E",
"ok": true,
"snapshotType": "tickets_open",
"worker": {
"id": "wrk_2Mf…",
"displayName": "Alex Chen"
}
}Errors
Same auth and validation errors as POST events. See Error codes.