---
title: "Add payment-rule files as a batch"
method: POST
path: "/v1/ap/rules/batches"
tags: ["Accounts Payable"]
---

# Add payment-rule files as a batch

`POST /v1/ap/rules/batches`

## Request

- Base URL: `https://api.talonic.com`
- URL: `https://api.talonic.com/v1/ap/rules/batches`
- Auth: HTTP bearer

Documents already uploaded (1 to 50) become one batch: each is read and turned into rules in the background, then every invoice is checked against them. They stay out of the Compliance app. Requires scope `write`.

## Request body

- object
  - `document_ids` string[], required
  - `name` string

## Response `201`

The batch.

## Other responses

- `404`: The requested resource was not found.

## Changes

- **2026-11-03** `c81bf2e33e3b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/talonic/apis/talonic-api/changes/v1/ap/rules/batches/post.md)

---

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