MIRA FIVE

Goals

List a MIRA FIVE project's goals with conversions, people, rate and revenue for a period, and read one goal's report with its trend.

A goal is an action with a role: purchase (what buying is, at most one per project), conversion (another success, such as a sign-up) or intent (a sign someone wants to buy, such as viewing pricing). The goals endpoints report how often each was reached. Goals are defined in MIRA FIVE, or by an agent through the MCP server.

List goals

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

The project's active goals in the order the Goals screen shows them, with their numbers for the period. Actions without a role are not listed. The list does not page.

NameTypeDefaultDescription
periodstring30d1h, 24h, 7d, 30d, 90d, 12m or custom. See Periods.
fromstringnoneFirst day of a custom period, YYYY-MM-DD. Required with period=custom.
tostringnoneLast day of a custom period, inclusive. Required with period=custom.

compare is refused. Filters are not read.

curl -G https://app.mirafive.io/api/v1/projects/01932c4e-8a7b-7c3d-9e2f-4b5a6c7d8e9f/goals \
  -H "Authorization: Bearer $MIRAFIVE_API_KEY" \
  --data-urlencode 'period=7d'
200 OK
{
  "data": [
    {
      "id": "01948d2e-5f6a-7b8c-9d0e-1f2a3b4c5d6e",
      "type": "goals",
      "attributes": {
        "name": "Order completed",
        "description": "Checkout finished and paid.",
        "role": "purchase",
        "revenueProperty": null,
        "conversions": 151,
        "people": 138,
        "rate": 0.0327,
        "revenue": [
          { "currency": "EUR", "amount": 9214.8 },
          { "currency": "CHF", "amount": 189 }
        ]
      },
      "links": {
        "self": "https://app.mirafive.io/api/v1/projects/01932c4e-8a7b-7c3d-9e2f-4b5a6c7d8e9f/goals/01948d2e-5f6a-7b8c-9d0e-1f2a3b4c5d6e"
      }
    },
    {
      "id": "01948d2f-6a7b-7c8d-8e9f-0a1b2c3d4e5f",
      "type": "goals",
      "attributes": {
        "name": "Newsletter signup",
        "description": null,
        "role": "conversion",
        "revenueProperty": null,
        "conversions": 247,
        "people": 239,
        "rate": 0.0567,
        "revenue": []
      },
      "links": {
        "self": "https://app.mirafive.io/api/v1/projects/01932c4e-8a7b-7c3d-9e2f-4b5a6c7d8e9f/goals/01948d2f-6a7b-7c8d-8e9f-0a1b2c3d4e5f"
      }
    },
    {
      "id": "01948d30-7b8c-7d9e-9f0a-1b2c3d4e5f6a",
      "type": "goals",
      "attributes": {
        "name": "Started checkout",
        "description": null,
        "role": "intent",
        "revenueProperty": null,
        "conversions": 402,
        "people": 356,
        "rate": 0.0844,
        "revenue": []
      },
      "links": {
        "self": "https://app.mirafive.io/api/v1/projects/01932c4e-8a7b-7c3d-9e2f-4b5a6c7d8e9f/goals/01948d30-7b8c-7d9e-9f0a-1b2c3d4e5f6a"
      }
    }
  ],
  "meta": {
    "period": {
      "preset": "7d",
      "from": "2026-09-21T00:00:00+02:00",
      "to": "2026-09-28T00:00:00+02:00",
      "timezone": "Europe/Berlin",
      "interval": "day",
      "comparison": null,
      "clampedToRetention": false
    },
    "active": 4218,
    "visits": 6630,
    "perVisit": false,
    "coverage": 0.62
  }
}
FieldTypeDescription
idstringThe goal's id. Use it for Get a goal report, the funnel and the goal person filter.
attributes.namestringThe goal's name.
attributes.descriptionstring or nullIts description.
attributes.rolestringpurchase, conversion or intent.
attributes.revenuePropertystring or nullThe event property its events carry their amount in when they send no revenue, e.g. value.
attributes.conversionsintegerEvery event that reached it in the period, with consent or without.
attributes.peopleintegerPeople who reached it.
attributes.ratenumber or nullPeople who reached it over people active (meta.active), 0–1. On a consentless project, conversions over visits.
attributes.revenuearrayRevenue per currency, { currency, amount }, reporting currency first.
links.selfstringThe goal's report.
meta.activeintegerPeople active in the period.
meta.visitsintegerVisits in the period.
meta.perVisitbooleantrue on a project without consented traffic: rates are per visit, and people counts nobody.
meta.coveragenumber or nullShare (0–1) of pageviews collected with consent, which people counts rest on.

Get a goal report

GET /api/v1/projects/{project_id}/goals/{goal_id}

One goal over the period, with its trend. An action without a role gets 404.

NameTypeDefaultDescription
periodstring30d1h, 24h, 7d, 30d, 90d, 12m or custom. See Periods.
fromstringnoneFirst day of a custom period, YYYY-MM-DD. Required with period=custom.
tostringnoneLast day of a custom period, inclusive. Required with period=custom.
comparestringnoneprevious fills previous and the trends' comparison with the period before.
curl -G https://app.mirafive.io/api/v1/projects/01932c4e-8a7b-7c3d-9e2f-4b5a6c7d8e9f/goals/01948d2e-5f6a-7b8c-9d0e-1f2a3b4c5d6e \
  -H "Authorization: Bearer $MIRAFIVE_API_KEY" \
  --data-urlencode 'period=7d' \
  --data-urlencode 'compare=previous'
200 OK
{
  "data": {
    "id": "01948d2e-5f6a-7b8c-9d0e-1f2a3b4c5d6e",
    "type": "goal-reports",
    "attributes": {
      "name": "Order completed",
      "role": "purchase",
      "archived": false,
      "conversions": 151,
      "people": 138,
      "active": 4218,
      "visits": 6630,
      "perVisit": false,
      "rate": 0.0327,
      "revenue": [
        { "currency": "EUR", "amount": 9214.8 },
        { "currency": "CHF", "amount": 189 }
      ],
      "coverage": 0.62,
      "previous": { "conversions": 133, "people": 121, "rate": 0.0305 },
      "trend": {
        "conversions": {
          "interval": "day",
          "timezone": "Europe/Berlin",
          "format": "number",
          "currency": null,
          "series": [
            {
              "key": "conversions",
              "points": [
                { "t": "2026-09-21T00:00:00+02:00", "v": 22 },
                { "t": "2026-09-22T00:00:00+02:00", "v": 19 },
                { "t": "2026-09-23T00:00:00+02:00", "v": 25 },
                { "t": "2026-09-24T00:00:00+02:00", "v": 21 },
                { "t": "2026-09-25T00:00:00+02:00", "v": 18 },
                { "t": "2026-09-26T00:00:00+02:00", "v": 31 },
                { "t": "2026-09-27T00:00:00+02:00", "v": 15 }
              ]
            }
          ],
          "comparison": [
            {
              "key": "conversions",
              "points": [
                { "t": "2026-09-14T00:00:00+02:00", "v": 17 },
                { "t": "2026-09-15T00:00:00+02:00", "v": 20 },
                { "t": "2026-09-16T00:00:00+02:00", "v": 18 },
                { "t": "2026-09-17T00:00:00+02:00", "v": 21 },
                { "t": "2026-09-18T00:00:00+02:00", "v": 16 },
                { "t": "2026-09-19T00:00:00+02:00", "v": 24 },
                { "t": "2026-09-20T00:00:00+02:00", "v": 17 }
              ]
            }
          ]
        },
        "people": {
          "interval": "day",
          "timezone": "Europe/Berlin",
          "format": "number",
          "currency": null,
          "series": [{ "key": "people", "points": [{ "t": "2026-09-21T00:00:00+02:00", "v": 20 }] }],
          "comparison": [{ "key": "people", "points": [{ "t": "2026-09-14T00:00:00+02:00", "v": 16 }] }]
        },
        "rate": {
          "interval": "day",
          "timezone": "Europe/Berlin",
          "format": "percent",
          "currency": null,
          "series": [{ "key": "rate", "points": [{ "t": "2026-09-21T00:00:00+02:00", "v": 0.0283 }] }],
          "comparison": [{ "key": "rate", "points": [{ "t": "2026-09-14T00:00:00+02:00", "v": 0.0251 }] }]
        }
      }
    },
    "links": {
      "self": "https://app.mirafive.io/api/v1/projects/01932c4e-8a7b-7c3d-9e2f-4b5a6c7d8e9f/goals/01948d2e-5f6a-7b8c-9d0e-1f2a3b4c5d6e"
    }
  },
  "meta": {
    "period": {
      "preset": "7d",
      "from": "2026-09-21T00:00:00+02:00",
      "to": "2026-09-28T00:00:00+02:00",
      "timezone": "Europe/Berlin",
      "interval": "day",
      "comparison": {
        "from": "2026-09-14T00:00:00+02:00",
        "to": "2026-09-21T00:00:00+02:00"
      },
      "clampedToRetention": false
    }
  }
}

The people and rate trends are shortened here to their first point. Each has one point per bucket, like conversions.

FieldTypeDescription
idstringThe goal's id.
attributes.name, attributes.rolestringAs in List goals.
attributes.archivedbooleanWhether the goal is archived.
attributes.conversionsintegerEvents that reached it in the period.
attributes.peopleintegerPeople who reached it.
attributes.activeintegerPeople active in the period.
attributes.visitsintegerVisits in the period.
attributes.perVisitbooleantrue on a consentless project: rate is conversions over visits.
attributes.ratenumber or nullpeople over active (or conversions over visits when perVisit), 0–1.
attributes.revenuearrayRevenue per currency, { currency, amount }.
attributes.coveragenumber or nullShare (0–1) of pageviews collected with consent.
attributes.previousobject or nullconversions, people and rate of the previous period. null without compare=previous, or when that period is outside the history.
attributes.trend.conversions, attributes.trend.people, attributes.trend.rateobjectOne trend each, shaped like the overview's trend: interval, timezone, format, currency, series, comparison.
meta.periodobjectThe window read. See Periods.

On this page