---
title: "Converts a Prometheus rule group into a Grafana rule group and creates or updates it within the specified namespace."
method: POST
path: "/convert/prometheus/config/v1/rules/{NamespaceTitle}"
tags: ["convert_prometheus"]
---

# Converts a Prometheus rule group into a Grafana rule group and creates or updates it within the specified namespace.

`POST /convert/prometheus/config/v1/rules/{NamespaceTitle}`

If the group already exists and was not imported from a Prometheus-compatible source initially,
it will not be replaced and an error will be returned.

## Path parameters

- `NamespaceTitle` string, required

## Headers

- `x-grafana-alerting-datasource-uid` string
- `x-grafana-alerting-recording-rules-paused` boolean
- `x-grafana-alerting-alert-rules-paused` boolean
- `x-grafana-alerting-target-datasource-uid` string
- `x-grafana-alerting-folder-uid` string
- `x-grafana-alerting-notification-settings` string

## Response `202`

ConvertPrometheusResponse

- ConvertPrometheusResponse
  - `error` string
  - `errorType` string
  - `status` string

## Other responses

- `403` — ForbiddenError

---

[API](https://skmtc.net/grafana/apis/http-api.md) · [All operations](https://skmtc.net/grafana/apis/http-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/grafana/http-api/versions/df55ba1718ba/schema)
