MIRA FIVE

Events

Read the raw events a MIRA FIVE project received in the last hour, day or week, newest first, with filters and a cursor.

The events endpoint lists raw events as Data → Events shows them: newest first, with page, device, consent, revenue and the person. Use it to check that tracking arrives, or to see what one visit did. It reads short windows only. For totals over longer periods, read the overview or goals.

List events

GET /api/v1/projects/{project_id}/events

Events of the period, newest first, 50 per page.

NameTypeDefaultDescription
periodstring24h1h, 24h or 7d, ending now.
filters[i][field], filters[i][op], filters[i][value]stringnoneEvent filters, all of which must hold. See Filters.
cursorstringnonemeta.nextCursor of the previous page. See Pagination.

from, to and compare are refused. period=custom and the longer presets get 422.

curl -G https://app.mirafive.io/api/v1/projects/01932c4e-8a7b-7c3d-9e2f-4b5a6c7d8e9f/events \
  -H "Authorization: Bearer $MIRAFIVE_API_KEY" \
  --data-urlencode 'period=1h'
200 OK
{
  "data": [
    {
      "id": "0199a3f2-4c1d-7e8a-b2c3-d4e5f6a7b8c9",
      "type": "events",
      "attributes": {
        "name": "order_completed",
        "kind": "custom",
        "occurredAt": "2026-09-27T10:14:02.512+02:00",
        "path": "/checkout/thank-you",
        "host": "shop.nordlicht.example",
        "title": "Thank you for your order",
        "referrer": "",
        "country": "DE",
        "device": "desktop",
        "browser": "Firefox",
        "sourceType": "first_party_web",
        "consented": true,
        "visit": "0199a3e8-0b1c-7d2e-9f3a-4b5c6d7e8f90",
        "revenue": { "amount": 89.9, "currency": "EUR" },
        "person": {
          "ref": "0196f0a1-2b3c-7d4e-8f5a-6b7c8d9e0f1a",
          "name": "Lena Hoffmann",
          "known": true
        }
      }
    },
    {
      "id": "0199a3f1-9e8d-7c6b-a5f4-e3d2c1b0a9f8",
      "type": "events",
      "attributes": {
        "name": "$pageview",
        "kind": "pageview",
        "occurredAt": "2026-09-27T10:13:40.087+02:00",
        "path": "/products/wool-scarf",
        "host": "shop.nordlicht.example",
        "title": "Wool scarf, graphite",
        "referrer": "instagram.com",
        "country": "AT",
        "device": "mobile",
        "browser": "Safari",
        "sourceType": "first_party_web",
        "consented": false,
        "visit": null,
        "revenue": null,
        "person": null
      }
    }
  ],
  "links": {
    "self": "https://app.mirafive.io/api/v1/projects/01932c4e-8a7b-7c3d-9e2f-4b5a6c7d8e9f/events?period=1h",
    "next": "https://app.mirafive.io/api/v1/projects/01932c4e-8a7b-7c3d-9e2f-4b5a6c7d8e9f/events?period=1h&cursor=eyJhdCI6IjIwMjYtMDktMjcgMDg6MTM6NDAuMDg3In0"
  },
  "meta": {
    "period": {
      "preset": "1h",
      "from": "2026-09-27T09:15:00+02:00",
      "to": "2026-09-27T10:15:00+02:00",
      "timezone": "Europe/Berlin",
      "interval": "minute",
      "comparison": null,
      "clampedToRetention": false
    },
    "perPage": 50,
    "nextCursor": "eyJhdCI6IjIwMjYtMDktMjcgMDg6MTM6NDAuMDg3In0"
  }
}

The second event came without consent, so it has no visit and no person.

FieldTypeDescription
idstringThe event's id.
attributes.namestringThe event name, e.g. $pageview or order_completed.
attributes.kindstringpageview ($pageview), click ($autocapture), identify ($identify), search ($search) or custom.
attributes.occurredAtstringWhen it happened, in the project's timezone with milliseconds.
attributes.path, attributes.host, attributes.titlestringThe page it happened on. Empty for server events without a page.
attributes.referrerstringThe referring host, empty when there was none.
attributes.countrystringTwo-letter country code, empty when unknown.
attributes.devicestringdesktop, mobile or tablet, empty when unknown.
attributes.browserstringe.g. Chrome, Safari, Firefox.
attributes.sourceTypestringfirst_party_web (a website source) or first_party_server (a server source).
attributes.consentedbooleanCollected with consent (full mode).
attributes.visitstring or nullThe visit (session) id. null for consentless events and server events without one.
attributes.revenueobject or nullamount and currency when the event carried revenue.
attributes.personobject or nullref (for Get a person), name and known. null for consentless events and server events without a person.
meta.periodobjectThe window read. See Periods.
meta.perPage, meta.nextCursorSee Pagination.

To find events of one kind, filter by name:

curl -G https://app.mirafive.io/api/v1/projects/01932c4e-8a7b-7c3d-9e2f-4b5a6c7d8e9f/events \
  -H "Authorization: Bearer $MIRAFIVE_API_KEY" \
  --data-urlencode 'period=7d' \
  --data-urlencode 'filters[0][field]=event_name' \
  --data-urlencode 'filters[0][op]=is' \
  --data-urlencode 'filters[0][value]=order_completed'

On this page