---
title: "Batch upsert authorization subject attributes"
method: POST
path: "/authz/subject-attributes/batch"
tags: ["authz-subject-attributes"]
---

# Batch upsert authorization subject attributes

`POST /authz/subject-attributes/batch`

(reserved for future use) Inserts or updates authorization subject attributes in bulk for the caller's tenant. Existing rows (matched by principal\_type + principal\_id) are fully replaced with the provided attributes. Maximum 50000 items per request. Duplicate keys within a single request are resolved last-wins.

Required scope: \`authz:grant\`

## Request body

- BatchUpsertAuthzSubjectAttributesRequest
  - `items` AuthzSubjectAttributeInput[], required — List of subject attributes to upsert (max 50000)
    - `principal_type` string — Principal type (defaults to "user" when omitted)
    - `principal_id` string, required — Principal identifier
    - `attributes` object, required — Free-form authorization attributes (fully replaces existing attributes)

## Response `200`

Successfully upserted all items

- BatchWriteAuthzSubjectAttributesResponse
  - `affected_count` integer, required — Number of rows affected by the operation

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `500` — Internal Server Error

## Changes

> 65 revisions in range; 12 not diffed.

- **2026-06-19** `af788d543a82` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/qlonolink/apis/qaip-apis/changes/authz/subject-attributes/batch/post.md)

---

[API](https://skmtc.dev/qlonolink/apis/qaip-apis.md) · [All operations](https://skmtc.dev/qlonolink/apis/qaip-apis/llms.txt) · [OpenAPI document](https://skmtc.dev/qlonolink/apis/qaip-apis/revisions/430440bbcc56?raw)
