Grafana new Unified Alerting API

Hi,
I am trying to create an alert rule using the new unified alerting API. so under
/api/ruler/grafana/api/v1/rules/

First i do GET /api/ruler/grafana/api/v1/rules/ to list all the rules, and it works correctly. I can see my test alert undert my test folder.
i see in particular:

"namespace_uid": "xIVbTkmVz",
"namespace_id": 149,
 "rule_group": "Test GoLang",

But when i try to create a new alert rule doing a POST on /api/ruler/grafana/api/v1/rules/xIVbTkmVz
I get

{
    "message": "folder not found",
    "status": "not-found"
}

but i chekd and the folder uid is correct.
is it a a possible bug?

Grafana version: v8.2.1
Alerting unified active.

Welcome to the :grafana: community @joel!

The APIs for provisioning alerts with unified alerting are available here. You’ll want to use the http://localhost:3000/api/v1/provisioning/alert-rules endpoint.

NOTE: There is an error in docs linked above that duplicates the api/v1 part of the URL, so you’ll want to be aware of that.

I found an example in this github comment that includes the API and a sample rule that work:

Here’s the full request using default admin credentials, but you can also use authorization header as shown in the github comment.

Edit to update “folderUID”: “YOUR FOLDER UID” and “ruleGroup”: “YOUR RULE GROUP”,

 curl -X POST -H "Content-Type: application/json" -u admin:admin http://localhost:3000/api/v1/provisioning/alert-rules \
-d '{
  "id": 4,
  "uid": "JZDA4uGVz",
  "orgID": 1,
  "folderUID": "0GdTVXG4z",
  "ruleGroup": "SN000092",
  "title": "Test API Rule",
  "condition": "B",
  "data": [
    {
      "refId": "A",
      "queryType": "",
      "relativeTimeRange": {
        "from": 600,
        "to": 0
      },
      "datasourceUid": "gdev-prometheus",
      "model": {
        "expr": "(time() - (push_time_seconds{job=\"caterva_collector_SN000092\"})) / 3600",
        "hide": false,
        "intervalMs": 1000,
        "maxDataPoints": 43200,
        "refId": "A"
      }
    },
    {
      "refId": "B",
      "queryType": "",
      "relativeTimeRange": {
        "from": 0,
        "to": 0
      },
      "datasourceUid": "-100",
      "model": {
        "conditions": [
          {
            "evaluator": {
              "params": [
                6
              ],
              "type": "gt"
            },
            "operator": {
              "type": "and"
            },
            "query": {
              "params": [
                "A"
              ]
            },
            "reducer": {
              "params": [],
              "type": "last"
            },
            "type": "query"
          }
        ],
        "datasource": {
          "type": "__expr__",
          "uid": "-100"
        },
        "hide": false,
        "intervalMs": 1000,
        "maxDataPoints": 43200,
        "refId": "B",
        "type": "classic_conditions"
      }
    }
  ],
  "updated": "2022-09-12T10:49:52.242276+02:00",
  "noDataState": "OK",
  "execErrState": "OK",
  "for": "20m",
  "annotations": {
    "summary": "Test provisioned alert"
  },
  "labels": {
    "sn": "000092"
  }
}'