---
title: "Updates metadata for multiple contracts"
method: POST
path: "/contracts/metadata/bulk"
tags: ["Contracts"]
---

# Updates metadata for multiple contracts

`POST /contracts/metadata/bulk`

## Request

- Base URL: `https://api.rillet.com`
- URL: `https://api.rillet.com/contracts/metadata/bulk`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/rillet/apis/rillet-accounting-api/docs/contracts/metadata/bulk/post.ts> (a function with typed inputs; its response is checked against the schema)

Patches metadata on up to 1,000 contracts in one atomic request. Each contract may receive
different values. If a contract is missing or any key or value is invalid, nothing is
written for any contract. Per contract this behaves exactly like patch-contract-metadata:
keys omitted for that contract are left unchanged; null, empty, and whitespace-only values
clear that key. A contract whose change a contract approval rule holds keeps its values and
returns the approval_request_id its change waits on.

## Request body

- BulkUpdateContractMetadataRequest
  - `contracts` BulkContractMetadataUpdate[], required
    - `contract_id` string, uuid, required
    - `metadata` object, required: Partial update for this contract. Omitted keys are left unchanged; null or empty values clear a key.

## Response `200`

OK

- BulkUpdateContractMetadataResponse
  - `contracts` BulkContractMetadataResult[], required
    - `contract_id` string, uuid, required
    - `metadata` object, required
    - `approval_request_id` string, uuid, nullable: Set when an approval rule held this contract's change; metadata then shows the values it keeps until approved.

## Other responses

- `default`: Error

## Changes

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

[Operation history](https://skmtc.dev/rillet/apis/rillet-accounting-api/changes/contracts/metadata/bulk/post.md)

---

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