---
title: "Update a saved fill config"
---

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

# Update a saved fill config

Path: CloudRaker Paperwork API › Configs

`PATCH /v1/fill/configs/{idOrSlug}`

Renames a saved fill config, updates its `config`, or both. Send at least one field.

A `config` patch deep-merges over the saved config: objects merge key by key, arrays and scalars replace. Keys you leave out keep their saved values. `schema` is the exception: it replaces the saved schema whole, so send the whole schema.

Runs that already referenced it keep the configuration they were created with — the config is snapshotted onto each run.

**Learn more:** [Fill capability](https://docs.cloudraker.com/paperwork/capabilities/fill)

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `idOrSlug` (`updateFillConfig.path.idOrSlug`; string, required)
  - minLength 1

## Request body

_Required._

- `name` (`updateFillConfig.name`; string, optional)
  - minLength 1; maxLength 200
- `config` (`updateFillConfig.config`; object, optional)
  - `template` (`updateFillConfig.config.template`; string, optional)
    - minLength 1
  - `instructions` (`updateFillConfig.config.instructions`; string, optional)
    - maxLength 4000
  - `output` (`updateFillConfig.config.output`; string, optional)
    - one of `"flattened"`, `"editable"`
  - `fields` (`updateFillConfig.config.fields`; array<object>, optional)
    - `name` (`updateFillConfig.config.fields.name`; string, required)
      - minLength 1
    - `type` (`updateFillConfig.config.fields.type`; string, required)
      - minLength 1
    - `label` (`updateFillConfig.config.fields.label`; string | null, required)
    - `page` (`updateFillConfig.config.fields.page`; integer, required)
      - min -9007199254740991; max 9007199254740991
    - `box` (`updateFillConfig.config.fields.box`; object, required)
      - `x` (`updateFillConfig.config.fields.box.x`; number, required)
      - `y` (`updateFillConfig.config.fields.box.y`; number, required)
      - `width` (`updateFillConfig.config.fields.box.width`; number, required)
      - `height` (`updateFillConfig.config.fields.box.height`; number, required)
    - `description` (`updateFillConfig.config.fields.description`; string, optional)
    - `required` (`updateFillConfig.config.fields.required`; boolean, optional)
    - `options` (`updateFillConfig.config.fields.options`; array<string>, optional)
    - `maxLength` (`updateFillConfig.config.fields.maxLength`; integer, optional)
      - min -9007199254740991; max 9007199254740991
    - `multiline` (`updateFillConfig.config.fields.multiline`; boolean, optional)
    - `section` (`updateFillConfig.config.fields.section`; string, optional)
    - `ignore` (`updateFillConfig.config.fields.ignore`; boolean, optional)
  - `templateHash` (`updateFillConfig.config.templateHash`; string, optional)
    - pattern `^[0-9a-f]{64}$`

## Example request

```json
{
  "name": "string",
  "config": {
    "template": "string",
    "instructions": "string",
    "output": "flattened",
    "fields": [
      {
        "name": "string",
        "type": "string",
        "label": "string",
        "description": "string",
        "required": true,
        "options": [
          "string"
        ],
        "maxLength": -9007199254740991,
        "multiline": true,
        "section": "string",
        "page": -9007199254740991,
        "box": {
          "x": 0,
          "y": 0,
          "width": 0,
          "height": 0
        },
        "ignore": true
      }
    ],
    "templateHash": "string"
  }
}
```

## Code samples

### cURL

```bash
curl --request PATCH \
  --url 'https://api.cloudraker.com/v1/fill/configs/<idOrSlug>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "string",
  "config": {
    "template": "string",
    "instructions": "string",
    "output": "flattened",
    "fields": [
      {
        "name": "string",
        "type": "string",
        "label": "string",
        "description": "string",
        "required": true,
        "options": [
          "string"
        ],
        "maxLength": -9007199254740991,
        "multiline": true,
        "section": "string",
        "page": -9007199254740991,
        "box": {
          "x": 0,
          "y": 0,
          "width": 0,
          "height": 0
        },
        "ignore": true
      }
    ],
    "templateHash": "string"
  }
}
'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/v1/fill/configs/<idOrSlug>';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    name: 'string',
    config: {
      template: 'string',
      instructions: 'string',
      output: 'flattened',
      fields: [
        {
          name: 'string',
          type: 'string',
          label: 'string',
          description: 'string',
          required: true,
          options: ['string'],
          maxLength: -9007199254740991,
          multiline: true,
          section: 'string',
          page: -9007199254740991,
          box: {x: 0, y: 0, width: 0, height: 0},
          ignore: true
        }
      ],
      templateHash: 'string'
    }
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/v1/fill/configs/<idOrSlug>"

payload = {
    "name": "string",
    "config": {
        "template": "string",
        "instructions": "string",
        "output": "flattened",
        "fields": [
            {
                "name": "string",
                "type": "string",
                "label": "string",
                "description": "string",
                "required": True,
                "options": ["string"],
                "maxLength": -9007199254740991,
                "multiline": True,
                "section": "string",
                "page": -9007199254740991,
                "box": {
                    "x": 0,
                    "y": 0,
                    "width": 0,
                    "height": 0
                },
                "ignore": True
            }
        ],
        "templateHash": "string"
    }
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

The updated config.

#### Example

```json
{
  "object": "config",
  "id": "string",
  "slug": "string",
  "name": "string",
  "capability": "fill",
  "config": {
    "template": "string",
    "instructions": "string",
    "output": "flattened",
    "fields": [
      {
        "name": "string",
        "type": "string",
        "label": "string",
        "description": "string",
        "required": true,
        "options": [
          "string"
        ],
        "maxLength": -9007199254740991,
        "multiline": true,
        "section": "string",
        "page": -9007199254740991,
        "box": {
          "x": 0,
          "y": 0,
          "width": 0,
          "height": 0
        },
        "ignore": true
      }
    ],
    "templateHash": "string"
  },
  "updatedAt": "string",
  "revision": 1
}
```

- `object` (`updateFillConfig.response.200.object`; string, required)
- `id` (`updateFillConfig.response.200.id`; string, required)
- `slug` (`updateFillConfig.response.200.slug`; string, required)
- `name` (`updateFillConfig.response.200.name`; string, required)
- `capability` (`updateFillConfig.response.200.capability`; string, required)
- `config` (`updateFillConfig.response.200.config`; object, required)
  - `template` (`updateFillConfig.response.200.config.template`; string, optional)
    - minLength 1
  - `instructions` (`updateFillConfig.response.200.config.instructions`; string, optional)
    - maxLength 4000
  - `output` (`updateFillConfig.response.200.config.output`; string, optional)
    - one of `"flattened"`, `"editable"`
  - `fields` (`updateFillConfig.response.200.config.fields`; array<object>, optional)
    - `name` (`updateFillConfig.response.200.config.fields.name`; string, required)
      - minLength 1
    - `type` (`updateFillConfig.response.200.config.fields.type`; string, required)
      - minLength 1
    - `label` (`updateFillConfig.response.200.config.fields.label`; string | null, required)
    - `page` (`updateFillConfig.response.200.config.fields.page`; integer, required)
      - min -9007199254740991; max 9007199254740991
    - `box` (`updateFillConfig.response.200.config.fields.box`; object, required)
      - `x` (`updateFillConfig.response.200.config.fields.box.x`; number, required)
      - `y` (`updateFillConfig.response.200.config.fields.box.y`; number, required)
      - `width` (`updateFillConfig.response.200.config.fields.box.width`; number, required)
      - `height` (`updateFillConfig.response.200.config.fields.box.height`; number, required)
    - `description` (`updateFillConfig.response.200.config.fields.description`; string, optional)
    - `required` (`updateFillConfig.response.200.config.fields.required`; boolean, optional)
    - `options` (`updateFillConfig.response.200.config.fields.options`; array<string>, optional)
    - `maxLength` (`updateFillConfig.response.200.config.fields.maxLength`; integer, optional)
      - min -9007199254740991; max 9007199254740991
    - `multiline` (`updateFillConfig.response.200.config.fields.multiline`; boolean, optional)
    - `section` (`updateFillConfig.response.200.config.fields.section`; string, optional)
    - `ignore` (`updateFillConfig.response.200.config.fields.ignore`; boolean, optional)
  - `templateHash` (`updateFillConfig.response.200.config.templateHash`; string, optional)
    - pattern `^[0-9a-f]{64}$`
- `updatedAt` (`updateFillConfig.response.200.updatedAt`; string, optional)
- `revision` (`updateFillConfig.response.200.revision`; integer, optional) — The number of the saved config. It starts at 1, and each update that changes `config` adds one. Each run reports the revision it used, in `config.revision`.
  - min 1; max 9007199254740991

### 400

Empty body, or a `config.schema` outside the schema dialect.

### 404

Unknown id or slug, or a config of another capability.

### 429

Rate limited. The `/v1` API allows at least **67 requests per minute per organization** (about 1,000 requests per 15 minutes) — a guaranteed floor, enforced per edge location, so a geographically spread caller may get more. Wait for the `Retry-After` interval and retry — the error is `retryable`.

#### Example

```json
{
  "code": "rate_limited",
  "message": "string",
  "retryable": true,
  "requestId": "string",
  "docUrl": "string"
}
```

- `code` (`updateFillConfig.response.429.code`; string, required)
  - one of `"rate_limited"`
- `message` (`updateFillConfig.response.429.message`; string, required)
- `retryable` (`updateFillConfig.response.429.retryable`; boolean, required)
  - one of `true`
- `requestId` (`updateFillConfig.response.429.requestId`; string, required)
- `docUrl` (`updateFillConfig.response.429.docUrl`; string, optional)


Source: https://docs.cloudraker.com/paperwork/api/configs/update-fill-config/index.md
