---
title: "Upsert metrics asynchronously"
method: POST
path: "/v2/metrics:bulk"
tags: ["Metrics"]
---

# Upsert metrics asynchronously

`POST /v2/metrics:bulk`

## Request

- Base URL: `https://your-subdomain.deputy.deputy.com/api`
- URL: `https://your-subdomain.deputy.deputy.com/api/v2/metrics:bulk`
- Auth: API key in header `OAuth`

Upsert metrics asynchronously.

## Request body

- MetricsUpsertRequest
  - `data` ModelMetric[]
    - `timestamp` string, int64
    - `employee` integer
    - `area` integer
    - `type` string
    - `reference` string
    - `value` number, double
    - `state` 'ACTUAL' | 'PLAN' | 'FORECAST' | 'BUDGET'
    - `location` integer
    - `id` string
    - `created` string
    - `modified` string
    - `payload` string

## Response `200`

A successful response.

- MetricsUpsertResponse
  - `success` boolean
  - `data` ModelMetric[]
    - `timestamp` string, int64
    - `employee` integer
    - `area` integer
    - `type` string
    - `reference` string
    - `value` number, double
    - `state` 'ACTUAL' | 'PLAN' | 'FORECAST' | 'BUDGET'
    - `location` integer
    - `id` string
    - `created` string
    - `modified` string
    - `payload` string

---

[API](https://skmtc.dev/deputy/apis/deputy-v2-api.md) - [All operations](https://skmtc.dev/deputy/apis/deputy-v2-api/llms.txt) - [OpenAPI document](https://skmtc.dev/deputy/apis/deputy-v2-api/revisions/78f0278f4608?raw)
