---
title: "Create Tag Rule Endpoint"
method: POST
path: "/createTagRule"
---

# Create Tag Rule Endpoint

`POST /createTagRule`

## Request

- Base URL: `https://api.pavoot.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pavoot.com/createTagRule`
- Auth: none declared

Create one tag rule.

Body: { projectId, conditions: [{ category, values: [{ value } | { personId }] }],
        thenCategory, thenValue?, thenPersonId?, applyToExisting? }
Condition groups are ANDed; values inside a group are ORed. A category is 'person'
(values carry personId) or a custom tag category of the project (values carry value).
applyToExisting=true also applies this rule to the photos already in the project;
otherwise it only applies from now on. Returns { rule, appliedToImages }.

## Response `200`

Successful Response

- unknown

## Changes

- **2026-09-26** `2c06d2d329ca`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pavoot/apis/pavoot-api/changes/createTagRule/post.md)

---

[API](https://skmtc.dev/pavoot/apis/pavoot-api.md) - [All operations](https://skmtc.dev/pavoot/apis/pavoot-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pavoot/apis/pavoot-api/revisions/8c0cd91c2a05?raw)
