Skip to content

Metrics

The Metrics API provides programmatic access to submit metric events to MetricFlow.

Submit metric events

Request

Submits a batch of events for ingestion. Each event names the action that occurred — click, for example — and what it happened to and on which platform. The action determines where that event is routed and what it is called there.

A 202 response means every event in the batch passed validation and the batch was accepted by the destination. Events are not immediately queryable in reporting, and no per-event identifiers are returned.

Batches are all-or-nothing: if any event fails validation, the whole request is rejected with 400 and no events are forwarded.

Security
oauth2_as_a_server(Required scopes: metrics.write)
Bodyapplication/jsonrequired

The batch of metric events to ingest.

eventsArray of objects, [ 1 .. 500 ] items(MetricEvent)required

The metric events to ingest. Always an array: send one event or up to 500, whichever suits the caller. At least one is required.

curl -i -X POST \
  https://partner.socialchorus.com/v2/metrics/events \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "events": [
      {
        "action": "click",
        "object": "ContentCard",
        "platform": "web",
        "occurred_at": "2026-08-18T14:03:22Z",
        "event_id": "9f1c0f4e-2c4a-4d1e-9a52-6d0b1f7ad311",
        "user_id": "104883",
        "anonymous_id": "7d2a9f6c-0b31-4c8f-8f2b-2a0f5b9e4c11",
        "properties": {
          "content_id": 88213,
          "content_channel_id": 1204,
          "position": 0
        },
        "context": {
          "app": {
            "version": "4.12.0"
          },
          "traits": {
            "advocate_id": "104883"
          }
        }
      }
    ]
  }'

Responses

Accepted

Bodyapplication/json
dataobject(MetricIngestAcceptance)required
Response
{ "data": { "accepted_by_action": { … }, "accepted_events": 3, "received_at": "2026-08-18T14:03:23Z", "request_id": "8f4d9c02-3b1e-4a77-9b5c-1e0f2a7d6c38" } }