WePeopleDocs
IntegrationsPricingDocsSign inGet started
Get started
Docs home

Getting Started

  • What is WePeople
  • First week checklist
  • Core concepts

Product

  • Monitoring
  • Reports
  • People & profiles
  • SPACE scoring
  • Organization settings
  • Statistics
  • Billing & retention
  • Privacy model

Integrations

  • Overview
  • Slack
  • GitHub
  • Jira
  • Trust model

Developers

  • Platform overview
  • Quick start
  • Ingest guide
  • Custom statistics
  • Hosted MCP
  • TypeScript SDK

API Reference

  • Overview
  • Auth & headers
  • GET ping
  • POST events
  • POST snapshots
  • Apps statistics
  • Error codes
  • OpenAPI & SDK

Browse docs

API Reference

Apps statistics

Manage the statistic manifest for the authenticated developer app. Definitions describe how ingested event types aggregate into daily rollups and reports. Guide: Custom statistics.

Endpoint

GETPUT/api/v1/apps/statistics

Authenticate with the same wp_live_* key as ingest. The key implicitly scopes to one developer app — no app id in the path.

GET

Returns the current manifest (may be an empty array).

curlbash
curl "https://wepeople.app/api/v1/apps/statistics" \
  -H "Authorization: Bearer $WEPEOPLE_API_KEY"
Response 200json
{
  "requestId": "req_01HP3K5V4J3M9NVT8XZKQ9YQ2E",
  "statistics": [
    {
      "id": "crm-hub.tickets_resolved",
      "label": "Tickets resolved",
      "description": "Support tickets closed per day",
      "pillar": "DELIVERY",
      "format": "number",
      "aggregation": "count",
      "sourceEventTypes": ["ticket.resolved"],
      "sourceEventCategories": ["TASK_UPDATE"],
      "feedsDimensions": ["efficiency"],
      "defaultEnabled": true,
      "ownedBy": "none"
    }
  ]
}

PUT

Replaces the entire manifest atomically. Body accepts either:

  • { "statistics": [ … ] }
  • A bare JSON array of definitions

Maximum 32 definitions. Every id must start with {appSlug}.(the authenticated app’s slug).

curlbash
curl -X PUT "https://wepeople.app/api/v1/apps/statistics" \
  -H "Authorization: Bearer $WEPEOPLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "statistics": [
      {
        "id": "crm-hub.tickets_resolved",
        "label": "Tickets resolved",
        "description": "Support tickets closed per day",
        "pillar": "DELIVERY",
        "format": "number",
        "aggregation": "count",
        "sourceEventTypes": ["ticket.resolved"],
        "sourceEventCategories": ["TASK_UPDATE"],
        "defaultEnabled": true,
        "ownedBy": "none"
      }
    ]
  }'

Side effect

After a successful PUT, the updated manifest is loaded into the in-memory statistic registry on the server process handling the request.

Definition fields

FieldTypeNotes
idstringMust start with `{appSlug}.`; max 80 chars
labelstring1–120 chars
descriptionstring≤ 500 chars
pillarStatisticPillarACTIVITY | COMMUNICATION | DELIVERY | REVIEW | KNOWLEDGE
formatenumnumber | duration_minutes | percent | time_of_day | rate_per_day
aggregationenumcount | sumField | durationMinutes | rate | ratio
valueFieldstring?Required for sumField / ratio
sourceEventTypesstring[]1–32 whitelisted event types
sourceEventCategoriesEventCategory[]1–8 categories
feedsDimensionsenum[]satisfaction | performance | activity | communication | efficiency (≤ 5)
defaultEnabledbooleanDefault true
ownedByenumextractor | none (default none)

Errors

  • invalid_body (400) — schema validation or id prefix mismatch
  • Standard auth errors — Error codes

On this page

  • Endpoint
  • GET
  • PUT
  • Definition fields
  • Errors
WePeople

Team insight, not surveillance. A lead's-eye view built on metadata from the tools your team already uses — never source code, never messages, never DMs.

Product

  • Monitoring & Reports
  • SPACE scoring
  • Pricing

Docs

  • Docs home
  • Getting started
  • Developer platform
  • API reference
  • MCP

Integrations

  • Browse integrations

Company

  • Support
  • Status

Legal

  • Brand
  • Privacy
  • Terms

© 2026 WePeople. Built with care.

Metadata only. No source code, no message bodies, no DMs — read the policy.