WePeopleDevelopers
IntegrationsPricingDevelopersSign inGet started
Get started
OverviewGuideReferenceOpenAPI YAML

API reference · Ingest · v1

Reference

Three endpoints, one bearer token.

The ingest surface is deliberately small. Read the guide for the mental model. Use the TypeScript SDK for fastest setup. The canonical OpenAPI files live in sdk-typescript/openapi, including v1.yaml.

Base URL

https://wepeople.app

Endpoints

  • GET/api/v1/ingest/ping
  • POST/api/v1/ingest/events
  • POST/api/v1/ingest/snapshots
→ Error codes
GET/api/v1/ingest/ping

Validate a key and echo the app it belongs to.

Request

No body, no query parameters. Send your bearer token and the server responds immediately.

curlbash
curl "https://wepeople.app/api/v1/ingest/ping" \
  -H "Authorization: Bearer $WEPEOPLE_API_KEY"

Response 200

application/jsonjson
{
  "ok": true,
  "organizationId": "org_2Mf1…",
  "app": {
    "id": "app_2Nh8…",
    "slug": "crm-hub",
    "name": "CRM Hub"
  }
}
POST/api/v1/ingest/events

Ingest one or more events into the monitoring timeline.

Request body

FieldTypeNotes
eventsIngestEvent[]Required. 1 ≤ len ≤ 500.
events[].eventTypestringRequired. Must be whitelisted for this app.
events[].categoryEventCategoryRequired. One of the seven categories.
events[].actorActorRequired. One of workerId / externalId / email.
events[].timestampISO 8601Optional. Defaults to now.
events[].durationinteger secondsOptional. 0 ≤ d ≤ 86400.
events[].metadataobjectOptional. ≤ 16 KB JSON.

Headers

FieldTypeNotes
AuthorizationBearerRequired.
Idempotency-Keystring ≤ 200Recommended. Replay-safe for 10 min.
Content-Typeapplication/jsonRequired.

Example

curlbash
curl -X POST "https://wepeople.app/api/v1/ingest/events" \
  -H "Authorization: Bearer $WEPEOPLE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: crm-batch-8412" \
  -d '{
    "events": [
      {
        "eventType": "ticket.resolved",
        "category": "project_management",
        "actor": { "externalId": "crm-user-42" },
        "duration": 240,
        "metadata": { "ticket_id": "SUP-431" }
      }
    ]
  }'

Response 202 / 207

Full success returns 202 Accepted. Partial success returns 207 Multi-Status; results.rejected[].index points at the original request indices so retries stay targeted.

application/jsonjson
{
  "requestId": "req_01HP3K5V4J3M9NVT8XZKQ9YQ2E",
  "accepted": 2,
  "rejected": 1,
  "batchLimit": 500,
  "results": {
    "accepted": [
      { "eventType": "ticket.resolved", "timestamp": "2026-04-19T12:05:00Z" },
      { "eventType": "ticket.resolved", "timestamp": "2026-04-19T12:06:10Z" }
    ],
    "rejected": [
      {
        "index": 2,
        "code": "forbidden_event_type",
        "message": "eventType 'deploy.shipped' is not whitelisted."
      }
    ]
  }
}
POST/api/v1/ingest/snapshots

Replace the current snapshot card for a worker.

Request body

FieldTypeNotes
snapshotTypestringRequired. Stable id for this kind of snapshot.
actorActorRequired.
timestampISO 8601Optional.
metricsRecord<string, Metric>Required. Number, string label, or {value, unit, label}.
metadataobjectOptional. ≤ 16 KB JSON.

Response 202

application/jsonjson
{
  "requestId": "req_01HP3K5V4J3M9NVT8XZKQ9YQ2E",
  "ok": true,
  "snapshotType": "tickets_open",
  "worker": { "id": "wrk_2Mf…", "displayName": "Alex Chen" }
}

Error codes

Every error uses the shape { error: { code, message, requestId, docsUrl } }. Check code first — message is human-friendly and subject to copy edits.

CodeHTTPWhen
missing_authorization401No Authorization header present.
invalid_key401Key does not exist or is malformed.
key_revoked401Key was revoked in the Developer tab.
key_expired401Key is past its expiresAt.
plan_disabled402Your plan does not include the developer API.
quota_exceeded402Monthly event quota exhausted for the org.
rate_limited429Per-key or per-org burst exceeded.
forbidden_event_type403eventType is not in the app's whitelist.
invalid_body400Zod validation failed; error.message lists issues.
batch_too_large413Body > 1 MB or batch > 500 events.
missing_actor400actor lacks workerId, externalId, and email.
worker_not_found404workerId did not resolve for this org.
internal_error500Unexpected failure; retry with backoff.

Machine-readable

OpenAPI source of truth is in sdk-typescript/openapi (with README and links to versioned files like v1.yaml). Use it in Stoplight, Scalar, Redocly, or openapi-typescript to generate typed clients in your own stack.

WePeople Ingest API · v1

API referenceOpenAPI YAMLTypeScript SDKnpmPricingBack to site