> ## Documentation Index
> Fetch the complete documentation index at: https://docs.optimazehq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Business metrics

> Bring revenue, customer and usage figures into OPTIMAZE from a template, a CSV upload or the Business Metrics API.

Spend only means something next to what it produced. Business metrics are the outcomes you measure that spend against, revenue, active customers, orders, API requests, and they become the denominator in your [unit economics](https://docs.optimazehq.com/unit-economics.md).

You can create a metric from a template, upload its history as a CSV, and keep it current through the API or Zapier.

## The Metrics page

Under **Data**, select **Metrics**. Each metric shows its **Type**, **Details** (unit, update frequency and how it arrives), a **Trend**, the **Latest** value, the change **vs previous**, its **Status** (**Live** or **No data**) and when it last received data. Use the row menu to **Edit metric**.

## Create a metric

Select **New metric**. The wizard has six steps.

**1. Choose a metric**

Pick a template to pre-fill the name, unit and update frequency: **Monthly Revenue**, **Active Subscriptions by Tier**, **New Customers Acquired**, **Monthly Active Users**, **Transactions / Orders** or **API Requests**. **More ideas** lists further templates.

For full control over type and unit, select **Advanced: Custom Metric Setup** instead.

**2. Confirm details**

Check the **Metric name** (OPTIMAZE saves it in lowercase with underscores, for example `monthly_revenue`), **What this measures**, the **Update frequency** and the **Owner email**. Select **Create metric**.

**3. Prepare data, Upload CSV and Summary**

Prepare a CSV of historical values, upload it, and check the summary of what was imported.

**4. You're all set**

The metric appears on the **Metrics** page and is ready to use in a unit economic.

![New metric wizard on the Choose a metric step, showing six recommended templates](https://mintcdn.com/optimaze/1GorH5batRwM9XiF/images/console/metrics-templates.png?fit=max\&auto=format\&n=1GorH5batRwM9XiF\&q=85\&s=24dff40173b68e0b0f8984239fb52356)

## Send values through the API

To keep a metric current from your own systems, post datapoints to the Business Metrics API with an [API key](https://docs.optimazehq.com/api-auth.md) that has the `metrics:ingest` scope.

**Endpoint:** `POST https://api.optimazehq.com/v1/metrics/ingest`

| Header | Required | Description |
| :- | :- | :- |
| `Content-Type` | Yes | `application/json` |
| `optimaze-api-key` | Yes | Your API key (format `omz_...`) |
| `optimaze-org-id` | Yes | Your OPTIMAZE organisation ID |

```bash theme={null}
curl -sS -X POST "https://api.optimazehq.com/v1/metrics/ingest" \
  -H "Content-Type: application/json" \
  -H "optimaze-api-key: omz_YOUR_KEY_HERE" \
  -H "optimaze-org-id: YOUR_ORG_ID" \
  -d '{
    "metric_id": "123456789",
    "source": "finance-warehouse",
    "data": [
      {
        "event_time": "2026-01-31T23:59:59Z",
        "value": 48250.00,
        "tags": { "currency": "AUD" }
      }
    ]
  }'
```

| Field | Required | Description |
| :- | :- | :- |
| `metric_id` | Yes | The metric's ID from OPTIMAZE |
| `source` | No | The sending system (defaults to `ingest-api`) |
| `sample_rate` | No | A value between 0 and 1 (defaults to `1.0`) |
| `data` | Yes | One or more datapoints |
| `data[].event_time` | Yes | RFC 3339 timestamp of the observation |
| `data[].value` | Yes | The numeric value |
| `data[].tags` | No | Key-value dimensions such as region or product line |

A valid request returns `202 Accepted` with no body. The full contract is in the [API reference](https://docs.optimazehq.com/api-reference/business-metrics/ingest-business-metric-datapoints.md).

## Send values from Zapier

The **Zapier** integration pushes business metric data into OPTIMAZE from other apps. Under **Data** > **Integrations**, select **Add API key** on the Zapier tile to create the key Zapier uses.

## Troubleshooting

* **401 or 403 from the API.** The key is revoked, lacks `metrics:ingest`, or does not match the `optimaze-org-id` you sent.
* **400 validation error.** Check the `metric_id` exists, `event_time` is valid RFC 3339, and `data` is not empty.
* **Metric not found.** The API does not create metrics, create it on the **Metrics** page first.
* **Status shows No data.** Values have not arrived yet, or their timestamps fall outside the date range you are viewing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.