---
title: "Ingest metrics via JSON"
method: POST
path: "/api/{org_id}/ingest/metrics/_json"
tags: ["Metrics"]
---

# Ingest metrics via JSON

`POST /api/{org_id}/ingest/metrics/_json`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/ingest/metrics/_json`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/ingest/metrics/_json/post.ts> (a function with typed inputs; its response is checked against the schema)

Ingests metrics data using JSON format. Accepts an array of metric objects containing metric name, type (counter, gauge, histogram, or summary), labels, timestamp, and value. This endpoint is ideal for custom applications and systems that generate metrics in JSON format rather than protocol buffers.

## Path parameters

- `org_id` string, required

## Request body

- string

## Response `200`

Success

- IngestionResponse
  - `code` integer, required
  - `error` string, nullable
  - `status` StreamStatus[]
    - `error` string
    - `failed` integer, required
    - `successful` integer, required
    - `name` string, required

## Other responses

- `500`: Failure

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
