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

# Start with the API

> Build a report export or tracking integration using Metricanic's supported public API and verify the result step by step.

Use the REST API when you want your software to read reports or manage tracking entities on a repeatable schedule. A daily performance export, a private dashboard, or a campaign provisioning tool can call the same supported contract without automating the tracker interface.

The API base URL is:

```text theme={null}
https://panel.metricanic.com/api/v1
```

Authenticate with a public API key from the tracker. Start with a **read** key while exploring. Use **write** only when your application needs supported mutations. See [Authentication](/api-reference/authentication) for the first connectivity check.

## Pick the surface for your task

| Task                                                     | Use                                                                                                     |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| Export grouped performance totals                        | [Reports API](/api-reference/endpoints/query-reports)                                                   |
| Investigate a recorded visit, event, or postback attempt | [Events API](/api-reference/endpoints/list-events)                                                      |
| Create or maintain campaigns and reusable assets         | The campaign, rotator, source, network, offer, and landing endpoints in this reference                  |
| Record a visitor or receive a conversion                 | The campaign's [tracking setup](/tracking/modes) and [incoming event URL](/conversions/incoming-events) |
| Ask an agent to investigate performance                  | The read-only [product MCP](/integrations/ai-agents)                                                    |

The Events API reads already recorded events. It is not a conversion ingestion endpoint. Likewise, the public API does not expose every operation used internally by the tracker. Manage billing, passwords, API credentials, and domain setup in the tracker.

## Build your first report integration

Begin by finding the campaign that your integration will query:

```bash theme={null}
curl --get 'https://panel.metricanic.com/api/v1/campaigns' \
  -H "Authorization: Bearer $METRICANIC_API_KEY" \
  --data-urlencode 'query=Lead Search' \
  --data-urlencode 'limit=20'
```

A successful response has `ok: true`. Campaigns are in `data.campaigns`, and `data.meta.count` is the number returned. Choose the matching campaign ID from the response, rather than using the display name as an identifier in later requests.

Next, query [reports and events](/api-reference/reports-and-events) for that ID with explicit dates and timezone. Compare one result with the tracker before scheduling the export. This catches workspace, filter, and time-boundary mistakes before they become a recurring report.

Response payloads vary by endpoint. Lists of some assets return an array in `data`, while campaign lists and report queries return named objects. Parse the endpoint's response schema rather than assuming every list uses the same wrapper or pagination.

## Create tracking entities in dependency order

A campaign combines a traffic source, tracking settings, and an existing rotator. The rotator contains the routes to landing pages and offers.

For a provisioning application, create or identify the reusable assets first, then create a publishable rotator, and finally attach the campaign using `destination.mode: "use_rotator"`. Set up the tracking domain in the tracker and use its ID where required. Campaign creation does not replace rotator configuration.

After a campaign write, inspect both the returned campaign and its publication result. Saving the control data and making a configuration available to traffic can be separate steps. Verify the resulting campaign tracking setup before sending paid traffic.

When retiring entities, follow [Archive and restore](/api-reference/archive-and-restore). These relationships also determine which items can be archived safely.

## Keep the client aligned with the contract

Each endpoint page lists its request fields and response shape. The [public OpenAPI file](/openapi.public.yaml) can be downloaded for client generation or contract checks.

Handle failures through the HTTP status and structured error body described in [API errors](/api-reference/errors). Keep the key in server-side configuration and record the response's request ID when available, so a failed job can be investigated without exposing credentials.
