# Report every goal's results for a campaign or journey

Source: https://kirora.io/docs/api/reference/listConversionGoalMetrics

`GET /v1/conversion-goals/metrics`

Requires an API key with the `conversion-goals:read` scope. [About keys and scopes](https://kirora.io/docs/api/reference/authentication)

Works with integration, agent and partner keys.

Each of the campaign's or journey's goals, oldest first, with the all-time totals `GET /conversion-goals/{id}/metrics` reports for one (without its day-by-day `history`): one call for a table of its goals. A goal whose `valueProperty` is an attribute masked from you keeps its counts and has `revenueWithheld` true, where the single read would refuse. An empty list when it has no goals, or when no campaign or journey with that id exists in the workspace.

## Example

```bash
curl https://api.kirora.io/v1/conversion-goals/metrics \
  -H "Authorization: Bearer $KIRORA_API_KEY"
```

Response `200`:

```json
{
  "data": [
    {
      "conversionGoalId": "0192f3d0-7a1b-7c2d-8e3f-4a5b6c7d8e9f",
      "conversions": 41,
      "convertedContacts": 38,
      "reachedContacts": 1180,
      "conversionRate": 0.03220338983050847,
      "revenue": {
        "currency": "USD",
        "value": 2050
      },
      "conversionsWithoutValue": 0,
      "revenueWithheld": false
    }
  ]
}
```

## Query parameters

- `campaignId` (string, optional, uuid) — The campaign's goals.
- `journeyId` (string, optional, uuid) — The journey's goals.

## Header parameters

- `Kirora-Workspace` (string, optional, pattern `^[A-Za-z0-9._:-]{1,128}$`) — Partner keys only: the child workspace to act in, by the external id the partner gave it. Without it, a partner key acts in its own workspace. Any other key that sends it is refused with 403, and an unknown workspace is 404.

## Returns

Returns `200 OK` with a list of `ConversionGoalTotals` objects in `data`. Otherwise returns an error; [Errors](https://kirora.io/docs/api/reference/errors) lists every code and which to retry.

- `conversionGoalId` (string, required, uuid)
- `conversions` (integer, required, min 0) — All time: every event the goal counted, from `countedFrom`; one contact can convert more than once.
- `convertedContacts` (integer, required, min 0) — All time: the contacts behind `conversions`.
- `reachedContacts` (integer, required, min 0) — All time: contacts sent to that a conversion could be credited to, from one attribution window before `countedFrom`. A send that bounced or was reported as spam is left out, as attribution never credits it, so this can be below the sends that reached the provider.
- `conversionRate` (number | null, required, min 0) — All time: `convertedContacts` over `reachedContacts`; `null` before there is such a send.
- `revenue` (object | null, required) — All time: the value property's sum, in the goal currency; `null` when the goal has no `valueProperty`.
  - `currency` (string | null, required) — The currency, an ISO 4217 code; null when none was named.
  - `value` (number, required) — The amount in that currency.
- `conversionsWithoutValue` (integer | null, required, min 0) — All time: conversions counted without a value (the property missing, not a non-negative number, too large, or the event naming another currency); `null` when the goal has no `valueProperty`.
- `revenueWithheld` (boolean, required) — The goal reads its value from an attribute masked from you: `revenue` and `conversionsWithoutValue` are `null`.
