---
title: "Update an ingestion rule"
method: PATCH
path: "/v1/projects/{project_id}/ingestion-rules/{ingestion_rule_id}"
tags: ["Ingestion Rules"]
---

# Update an ingestion rule

`PATCH /v1/projects/{project_id}/ingestion-rules/{ingestion_rule_id}`

## Request

- Base URL: `https://api.naturali.ai`
- URL: `https://api.naturali.ai/v1/projects/{project_id}/ingestion-rules/{ingestion_rule_id}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.naturali.ai/authorize`, token URL `https://api.naturali.ai/token`, scopes: `mcp:access`)

Updates fields of an ingestion rule

## Path parameters

- `ingestion_rule_id` string, required

## Request body

- object
  - `content_type_glob` string: MIME type glob matched against a file's content_type. At most 4 wildcards and 255 characters.
  - `tool_id` string, nullable
  - `agent_id` string, nullable
  - `action` string, nullable
  - `preset_parameters` object, nullable
  - `native_extraction` 'first' | 'skip'
  - `file_delivery` 'base64' | 'download_url'
  - `chunk_strategy` 'page' | 'whole' | 'size' | 'null', nullable: Send `null` to clear the rule's override and fall back to the per-request default.
  - `chunk_size` integer, nullable
  - `chunk_overlap` integer, nullable
  - `metadata` NullableMetadataBag, nullable: A `MetadataBag` on a request field where `null` is meaningful: a full-replacement update that clears the bag. A record whose bag is unset leaves the field out.

## Response `200`

Ingestion rule updated

- IngestionRule
  - `id` string
  - `project_id` string
  - `content_type_glob` string
  - `tool_id` string, nullable
  - `agent_id` string, nullable
  - `action` string, nullable
  - `preset_parameters` object, nullable
  - `native_extraction` 'first' | 'skip'
  - `file_delivery` 'base64' | 'download_url'
  - `chunk_strategy` string, nullable
  - `chunk_size` integer, nullable
  - `chunk_overlap` integer, nullable
  - `metadata` MetadataBag: Caller-owned annotations on a resource, stored as the object they were written as: the types a value was written with are the types a read returns, so a filter can ask an ordering question about a number. Unlike other body fields, keys are stored and returned verbatim in the casing supplied — they are not converted between snake_case and camelCase. No key is reserved, and that is the point: every piece of state the platform owns lives in its own typed column, so nothing written here reaches platform state. The platform never reads the bag — it is not an IAM context, not a policy input and not part of a prompt — which is what separates it from a tag bag.
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400`: Validation failed
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Ingestion rule not found
- `409`: A rule for this content_type_glob already exists in the project

---

[API](https://skmtc.dev/naturali/apis/naturali-ai-api.md) · [All operations](https://skmtc.dev/naturali/apis/naturali-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/naturali/apis/naturali-ai-api/revisions/e4905b78f422?raw)
