---
title: "Update a pipeline's settings"
url: https://docs.corefinity.com/api/reference/deployments/update-site-deployment-pipeline-settings
type: endpoint
last_updated: 2026-11-13
feature: deployment-pipeline
related:
  - https://docs.corefinity.com/guides/sites/code-and-deployments/pipeline-stages.md
  - https://docs.corefinity.com/mcp/tools/corestack_deployments_pipeline_settings_update.md
---
# Update a pipeline's settings

Changes the settings you send, keeps the rest and answers the whole pipeline. `timeouts` is one setting: its
map is sent whole. Send the `revision` you read: a pipeline that changed since is refused `stale`. Your role
needs the Edit Environment Deployment Pipeline permission.

```http
PUT /api/corestack/sites/{site}/deployments/pipeline/{binding}/settings
```

- Scope: `write`
- Two-factor: required on your account (all)
- Rate limit: 20 a minute
- Try it in the console: off. It has not been cleared for the console. Copy the request and run it yourself when you are sure.

## Path parameters

- `site` (integer, required): The id of a site row. A website's production site and each of its environments has its own id. Digits only.
- `binding` (integer, required): The id of one of the environment's pipelines, as the pipeline read answers it in `binding_id` and `bindings[].id`. Digits only.

## Body

- `keep_node_modules` (boolean)
- `maintenance_policy` (string) One of `when_needed`, `always`, `off`.
- `pause_crons` (string) One of `auto`, `off`.
- `revision` (string): The pipeline revision you read.
- `run_migrations` (boolean or null): Laravel only. Null follows the environment.
- `timeouts` (object): The pipeline's own timeouts, in whole seconds from 60 to 3600 each. The map is sent whole: a timeout left out, or sent null, goes back to its default. A value outside the bounds, or one that is not a whole number, is refused `timeout_out_of_range`; any other key is refused `invalid`. One exception: a timeout Corefinity has raised above 3600 is kept when it is sent back exactly as the pipeline holds it (`settings.timeouts_own` in the pipeline read).
  - `build` (integer or null): Seconds, or null for the default.
  - `build_line` (integer or null): Seconds, or null for the default.
  - `database_line` (integer or null): Seconds, or null for the default.
  - `post_line` (integer or null): Seconds, or null for the default.
- `tunnels` (string) One of `auto`, `on`, `off`.

## Request

### curl

```bash
curl -X PUT https://manage.corefinity.com/api/corestack/sites/1042/deployments/pipeline/2210/settings \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "revision": "413c6ef3a8a3ffe9",
    "run_migrations": true,
    "tunnels": "off"
  }'
```

### PHP

```php
use Illuminate\Support\Facades\Http;

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->put('https://manage.corefinity.com/api/corestack/sites/1042/deployments/pipeline/2210/settings', [
        'revision' => '413c6ef3a8a3ffe9',
        'run_migrations' => true,
        'tunnels' => 'off',
    ]);

$data = $response->json();
```

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/deployments/pipeline/2210/settings', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    revision: '413c6ef3a8a3ffe9',
    run_migrations: true,
    tunnels: 'off',
  }),
});

// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);
```

### Python

```python
import os
import requests

res = requests.put(
    "https://manage.corefinity.com/api/corestack/sites/1042/deployments/pipeline/2210/settings",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
    json={
        "revision": "413c6ef3a8a3ffe9",
        "run_migrations": True,
        "tunnels": "off",
    },
)

data = res.json() if res.content else None
```

## Responses

### 200 The pipeline after the save.

```json
{
  "binding_id": 2210,
  "bindings": [
    {
      "id": 2210,
      "is_default": false,
      "label": "harbourandfinch.example.com",
      "tag": null
    }
  ],
  "can": {
    "edit": true,
    "edit_code": null,
    "edit_reason": null,
    "rehearse": true,
    "rehearse_code": null,
    "rehearse_reason": null
  },
  "carry_over": null,
  "classic": null,
  "conversion": null,
  "locked": null,
  "options": {
    "build_reads": [],
    "cloudflare_purge": false,
    "extra_shared_paths": [],
    "migrate": false,
    "platform_shared": [
      {
        "kind": "dir",
        "path": "storage"
      },
      {
        "kind": "file",
        "path": ".env"
      }
    ],
    "pre_switch_check": false,
    "snapshot_before_upgrade": false,
    "warm_up": false
  },
  "origin": null,
  "presets": {
    "detected": [],
    "offered": [
      {
        "key": "laravel_standard",
        "kind": "platform",
        "label": "Laravel standard"
      },
      {
        "key": "none",
        "kind": "platform",
        "label": "No build"
      },
      {
        "key": "vite",
        "kind": "frontend",
        "label": "Vite"
      },
      {
        "key": "laravel_mix",
        "kind": "frontend",
        "label": "Laravel Mix"
      }
    ]
  },
  "revision": "1537f080a2c1e2d9",
  "saved": {
    "at": "2026-11-09T10:42:07Z",
    "by": {
      "name": "Maya Okafor",
      "token": null
    },
    "number": 1,
    "source": "editor"
  },
  "settings": {
    "keep_node_modules": false,
    "maintenance_policy": "off",
    "pause_crons": "auto",
    "run_migrations": null,
    "timeouts": {
      "build": 3600,
      "build_line": 3600,
      "database_line": 600,
      "post_line": 600
    },
    "tunnels": "auto"
  },
  "stage_model": "three_stage",
  "stages": {
    "build": {
      "effective": [],
      "hooks": [],
      "lines": [],
      "mode": "preset",
      "preset": {
        "frontend": [],
        "options": [],
        "platform": "none"
      }
    },
    "database": {
      "lines": [],
      "platform_step_at": 0
    },
    "post_deploy": {
      "lines": [
        {
          "badges": [],
          "comments": [],
          "origin": "custom",
          "text": "php artisan queue:restart",
          "verdict": "services"
        },
        {
          "badges": [
            {
              "id": "replaced_by_platform",
              "label": "Replaced by a CoreStack step",
              "severity": "info"
            }
          ],
          "comments": [],
          "origin": "custom",
          "text": "php artisan config:cache",
          "verdict": "platform_duplicate"
        }
      ]
    }
  }
}
```

### 401 No token, or a token that is not valid.

```json
{
  "message": "Unauthenticated."
}
```

### 403 The token lacks the scope (`scope_required`, with the `scope` to use: `write`, or `exec` when the change brings a command the pipeline does not run now), your company requires two-factor authentication and you have not set it up, or your role lacks the Edit Environment Deployment Pipeline permission (`forbidden`, with `permission`).

```json
{
  "code": "company_unavailable",
  "message": "Your company is unavailable.",
  "reason": "company_unavailable"
}
```

### 404 The id does not exist or is something you cannot see, or the feature is not on for your company (`feature_off`).

```json
{
  "code": "feature_off",
  "message": "Not found.",
  "reason": "feature_off"
}
```

### 409 The pipeline changed since the `revision` you sent, or no revision was sent (`stale`): read it again. A reset to the template also answers the `revision` the pipeline is at now. Or Corefinity has locked the pipeline (`pipeline_locked`), it is not a three-stage pipeline yet or the version cannot be restored (`pipeline_classic`), a carried-over pipeline still waits for its review (`pipeline_review_pending`, on a reset), or the site is managed by another control panel (`managed_elsewhere`).

```json
{
  "code": "managed_elsewhere",
  "message": "This site is managed by another control panel",
  "reason": "managed_elsewhere"
}
```

### 422 The request was refused and nothing was saved. - `invalid`: a field is missing, of the wrong type or not a value it takes. `field` names it. - `confirm`: a production environment, and `confirm_production` is not true. - `line_credentials`: a line holds a credential (move it into a variable); `line_own_shell`: a line such as a lone `cd`, which does nothing for the next line. - `too_many_lines`, `line_too_long`: a stage holds more lines, or a line more bytes, than it can. - `preset_unavailable`, `node_too_old`: a build preset, or a Node.js version, that cannot be used here. - `maintenance_policy_unavailable`, `wrong_platform`, `timeout_out_of_range`: a setting the site's platform does not offer, or a timeout outside its bounds. - `version_unavailable`, `not_reached`: on a reset, a template version that cannot be held here, or a pipeline that does not follow a template. - `too_many_variables`, `variable_reserved`, `variable_tool_credential`, `variable_invalid`: on a copy of `variables`, a variable this environment cannot take. Nothing of the copy is kept. Every reason but `invalid` names its field in `errors` only.

```json
{
  "code": "confirm",
  "errors": {
    "confirm_production": [
      "Copying into production changes how it deploys. Confirm to continue."
    ]
  },
  "message": "Copying into production changes how it deploys. Confirm to continue.",
  "reason": "confirm"
}
```

### 429 Too many requests (`rate_limited`). Wait for the number of seconds in `Retry-After`, which `retry_after_seconds` repeats.

```json
{
  "code": "rate_limited",
  "message": "Too many requests. Try again in 60 seconds.",
  "reason": "rate_limited",
  "retry_after_seconds": 60
}
```

## If it is refused

| Status | Reason | What to do |
|---|---|---|
| 401 |  | Send a valid token as `Authorization: Bearer <token>`. |
| 403 | `company_unavailable` | Your company is unavailable. |
| 403 | `scope_required` | Use a token with the scope named in `scope`. |
| 403 | `forbidden` | The person is not allowed to do this. |
| 403 | `two_factor_required` | Turn on two-factor on your account, then send again. |
| 404 | `feature_off` | This feature is not on for your organisation yet. |
| 409 | `managed_elsewhere` | This site is read-only here. Change it in the control panel that manages it. |
| 409 | `pipeline_classic` | Corefinity still runs this pipeline in its classic form, so it cannot be edited yet. |
| 409 | `pipeline_locked` | Corefinity has locked this pipeline: Held while a migration is checked. |
| 409 | `stale` | What you read has changed since you read it. Read it again, then send the change with its new version or quote. |
| 422 | `confirm` | The action needs an explicit confirmation field. Ask the person, then send it. |
| 422 | `line_credentials` | This line holds a credential. Move this value into a variable, then save again. |
| 422 | `maintenance_policy_unavailable` | Choose Always or Off: this platform has no pending-upgrade check. |
| 422 | `invalid` | Fix the field named in `field`; `errors` says why. |
| 422 | `timeout_out_of_range` | Choose a timeout between 60 and 3600 seconds. |
| 422 | `version_unavailable` | This version is not available here. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |

## The same task elsewhere

- Guide: [Pipeline](https://docs.corefinity.com/guides/sites/code-and-deployments/pipeline-stages.md)
- MCP tool: [`corestack_deployments_pipeline_settings_update`](https://docs.corefinity.com/mcp/tools/corestack_deployments_pipeline_settings_update.md)
