---
title: "Record Rule Usage"
method: POST
path: "/datamates/{datamate_id}/rules/usage"
tags: ["WORKSPACE_RULES"]
---

# Record Rule Usage

`POST /datamates/{datamate_id}/rules/usage`

## Request

- Base URL: `https://api.myaltimate.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.myaltimate.com/datamates/{datamate_id}/rules/usage`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
- TypeScript: <https://skmtc.dev/myaltimate/apis/myaltimate-api/docs/datamates/:datamate_id/rules/usage/post.ts> (a function with typed inputs; its response is checked against the schema)

Add usage counters, idempotent per ``batch_id``.

## Path parameters

- `datamate_id` integer, required

## Request body

- RecordUsageRequest
  - `batch_id` string, uuid, required
  - `items` UsageItem[], required
    - `public_id` string, required
    - `applied` integer
    - `helpful` integer
    - `harmful` integer
    - `corrected_again` integer

## Response `200`

Successful Response

- RecordUsageResponse
  - `duplicate` boolean, required
  - `applied_items` integer, required
  - `skipped_items` integer, required

## Other responses

- `403`: Not the workspace's owner
- `404`: Workspace or rule not found
- `409`: Changed since read, or refused
- `422`: Validation Error

## Changes

- **2026-11-03** `868dfab8c7fe`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/myaltimate/apis/myaltimate-api/changes/datamates/:datamate_id/rules/usage/post.md)

---

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