---
title: "Create a Usage Tracker usage metric event."
method: POST
path: "/api/metric"
tags: ["usage-tracker"]
---

# Create a Usage Tracker usage metric event.

`POST /api/metric`

## Request

- Base URL: `https://analytics.datacite.org`
- URL: `https://analytics.datacite.org/api/metric`
- Auth: none required

## Headers

- `X-Forwarded-For` string, required: Originating IP address of the client. Used for de-duplication of events. Not stored.
- `User-Agent` string, required: Originating User-Agent of the client. Used to filter bots and for de-duplication of events. Not stored.

## Request body

- object
  - `n` 'view' | 'download', required: The metric type of the event.
  - `u` string, required: The URL source of the reported view or download event.
  - `i` string, required: The [data-repoid unique identifier of the Repository](https://support.datacite.org/docs/datacite-usage-tracker#setup) for tracking usage analytics.
  - `p` string, required: The downcased DOI name of the reported view or download event.

## Response `200`

Success.

---

[API](https://skmtc.dev/datacite/apis/usage-tracker-api.md) - [All operations](https://skmtc.dev/datacite/apis/usage-tracker-api/llms.txt) - [OpenAPI document](https://skmtc.dev/datacite/apis/usage-tracker-api/revisions/d266c7ed0b3e?raw)
