> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runpulse.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Saved configs

> Save an endpoint's config once under a name, then send its config_id in place of the config.

A saved config is a `config` that your organization stores under a name, for one endpoint. Send its `config_id` in place of `config`, and the request runs with the saved options. Use saved configs when many requests share the same options, or to change those options in one place without changing your code.

## Save a config and use it

This example saves an Extract config for invoices, then extracts a parsed invoice with the saved config's `config_id`:

```python Python theme={null}
import os
from pulse import Pulse

client = Pulse(api_key=os.environ["PULSE_API_KEY"])

saved = client.extract.configs.create(
    name="Invoice fields",
    config={"input_schema": {"type": "object", "properties": {
        "invoice_number": {"type": "string"},
        "total": {"type": "number"},
    }}},
)

parse = client.parse.run(file_url="https://example.com/invoice.pdf", config={"model": "ultra-2"})
job = client.extract.run(parse_id=parse.parse_id, config_id=saved.config_id)
```

```typescript TypeScript theme={null}
import { PulseClient } from "@pulse-software/sdk";

const client = new PulseClient({ apiKey: process.env.PULSE_API_KEY! });

const saved = await client.extract.configs.create({
  name: "Invoice fields",
  config: {
    inputSchema: { type: "object", properties: { invoice_number: { type: "string" }, total: { type: "number" } } },
  },
});

const { parseId } = await client.parse.run({
  fileUrl: "https://example.com/invoice.pdf",
  config: { model: "ultra-2" },
});
const job = await client.extract.run({ parseId, configId: saved.configId });
```

A request sends either `config` or `config_id`, never both.

***

## Where configs are saved

Each endpoint that takes a `config` keeps its own saved configs under `/{endpoint}/configs`, or `client.<endpoint>.configs` in the SDKs: Parse, Extract, Split, Tables, Charts, Classify and Pipeline. A [batch](https://docs.runpulse.com/v2/batch.md) takes a `/parse` config. A [pipeline's](https://docs.runpulse.com/v2/pipelines.md) steps take their configs inline, so to reuse a pipeline, save the whole pipeline under `/pipeline/configs`.

## Manage your configs

Each endpoint's configs have the same six routes, which the SDKs call `create`, `list` (newest first), `get`, `update`, `delete` and `delete_all` (`deleteAll` in TypeScript). `delete_all` deletes every config of the endpoint. In TypeScript, a call on one config takes its id as `configId`.

## Change a saved config

`PATCH` takes a new `name`, a new `config`, or both. A new `config` replaces the saved one whole, so send every option you want to keep. This request adds a field to the invoice config:

```python Python theme={null}
client.extract.configs.update(
    saved.config_id,
    config={"input_schema": {"type": "object", "properties": {
        "invoice_number": {"type": "string"},
        "total": {"type": "number"},
        "due_date": {"type": "string"},
    }}},
)
```

```typescript TypeScript theme={null}
await client.extract.configs.update({
  configId: saved.configId,
  config: {
    inputSchema: {
      type: "object",
      properties: { invoice_number: { type: "string" }, total: { type: "number" }, due_date: { type: "string" } },
    },
  },
});
```

Every request sent after a change gets the new options, and jobs that already started keep the options they started with.

***

## Rules

* A saved config is checked by the same rules as the endpoint's own `config`. An invalid one is refused with a `400` when you save it.
* A request that sends a `config_id` saved for another endpoint, a deleted one, or another organization's is refused with a `400`.
* Saved configs belong to your organization. Every API key in it can use, change and delete them.
* Deleting a config doesn't change the jobs that already used it.

## Next steps

> [card] [Classify](https://docs.runpulse.com/v2/classify.md)
>
> Choose a saved config for each kind of document.

> [card] [Config API reference](https://docs.runpulse.com/api-reference/v2/parse/create-parse-config.md)
>
> Every config route, for each endpoint.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.