---
title: "Store a new rule group."
method: POST
path: "/v1/rule-groups"
tags: ["rule_groups"]
---

# Store a new rule group.

`POST /v1/rule-groups`

## Request

- Base URL: `https://demo.firefly-iii.org/api`
- URL: `https://demo.firefly-iii.org/api/v1/rule-groups`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://demo.firefly-iii.org/oauth/authorize`
    - Token URL: `https://demo.firefly-iii.org/oauth/token`
  - HTTP bearer

Creates a new rule group. The data required can be submitted as a JSON body or as a list of parameters.

## Headers

- `X-Trace-Id` string, uuid

## Request body

- RuleGroupStore
  - `title` string, string, required
  - `description` string, string, nullable
  - `order` integer
  - `active` boolean

## Response `200`

New rule group stored, result in response.

- RuleGroupSingle
  - `data` RuleGroupRead, required
    - `type` string, string, required: Immutable value
    - `id` string, string, required
    - `attributes` RuleGroup, required
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `title` string, string, required
      - `description` string, string, nullable
      - `order` integer
      - `active` boolean
    - `links` ObjectLink, required
      - `0` object
        - `rel` string, string
        - `uri` string, string
      - `self` string, uri

## Other responses

- `400`: Bad request
- `401`: Unauthenticated
- `404`: Page not found
- `422`: Validation error. The body will have the exact details.
- `500`: Internal exception

---

[API](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-4-14.md) - [All operations](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-4-14/llms.txt) - [OpenAPI document](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-4-14/revisions/73f0baf3c408?raw)
