---
title: "Update or create a session rule"
method: POST
path: "/api/v1/sessions/rules"
tags: ["Sessions"]
---

# Update or create a session rule

`POST /api/v1/sessions/rules`

**Required scope:** `data`

## Request body

- SessionRuleRequest
  - `umo` string, required
  - `rule_key` string, required
  - `rule_value` DynamicConfig

## Response `200`

Standard AstrBot success response

- SuccessEnvelope
  - `status` 'ok', required
  - `message` string
  - `data` unknown, required

---

[API](https://skmtc.net/astrbotdevs/apis/astrbot-openapi-v1.md) · [All operations](https://skmtc.net/astrbotdevs/apis/astrbot-openapi-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/astrbotdevs/astrbot-openapi-v1/revisions/4463c5ffdb9c/schema)
