---
title: "Import Rules From File Handler"
method: POST
path: "/api/rules/import/file"
tags: ["runtime_mutations", "rules"]
---

# Import Rules From File Handler

`POST /api/rules/import/file`

Import a rule from an arbitrary file on the backend host.

The file's full contents become the rule body. Reading an arbitrary
path is only safe on a single-user local backend, so it is refused in
multi-tenant cloud mode where the filesystem is shared across clients.

## Request body

- ImportFileRequest
  - `path` string, required
  - `name` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/quadrillion/apis/quadrillion-cloud-api.md) · [All operations](https://skmtc.net/quadrillion/apis/quadrillion-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/quadrillion/quadrillion-cloud-api/versions/399077308c86/schema)
