---
title: "updateRepoCICheck"
---

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

# updateRepoCICheck

Path: Forge API › ciChecks

`PATCH /repos/{repo_id}/branches/{branch}/ci-checks/{ci_check_id}`

Edit a CI check. Disable it with {"enabled": false}.

## Path parameters

- `repo_id` (`updateRepoCICheck.path.repo_id`; string, required)
  - pattern: `^repo_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `branch` (`updateRepoCICheck.path.branch`; string, required)
  - minLength: `1`
- `ci_check_id` (`updateRepoCICheck.path.ci_check_id`; string, required)
  - pattern: `^ci_check_[0-7][0-9a-hjkmnp-tv-z]{25}$`

## Request body

_Required._

- `name` (`updateRepoCICheck.name`; string, optional)
  - minLength: `1`
- `description` (`updateRepoCICheck.description`; string, optional)
  - minLength: `1`
- `stdlib_function_key` (`updateRepoCICheck.stdlib_function_key`; string, optional)
  - minLength: `1`
- `stdlib_config` (`updateRepoCICheck.stdlib_config`; object, optional)
- `custom_source_code` (`updateRepoCICheck.custom_source_code`; string, optional)
  - minLength: `1`
- `severity` (`updateRepoCICheck.severity`; string, optional)
  - one of `"required"`, `"advisory"`
- `enabled` (`updateRepoCICheck.enabled`; boolean, optional)

## Example request

```json
{
  "name": "string",
  "description": "string",
  "stdlib_function_key": "string",
  "stdlib_config": {},
  "custom_source_code": "string",
  "severity": "required",
  "enabled": true
}
```

## Code samples

### cURL

```bash
curl --request PATCH \
  --url '<base-url>/repos/<repo_id>/branches/<branch>/ci-checks/<ci_check_id>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "string",
  "description": "string",
  "stdlib_function_key": "string",
  "stdlib_config": {},
  "custom_source_code": "string",
  "severity": "required",
  "enabled": true
}
'
```

### TypeScript

```typescript
const url = '<base-url>/repos/<repo_id>/branches/<branch>/ci-checks/<ci_check_id>';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    name: 'string',
    description: 'string',
    stdlib_function_key: 'string',
    stdlib_config: {},
    custom_source_code: 'string',
    severity: 'required',
    enabled: true
  })
};

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

### Python

```python
import requests

url = "<base-url>/repos/<repo_id>/branches/<branch>/ci-checks/<ci_check_id>"

payload = {
    "name": "string",
    "description": "string",
    "stdlib_function_key": "string",
    "stdlib_config": {},
    "custom_source_code": "string",
    "severity": "required",
    "enabled": True
}
headers = {"Content-Type": "application/json"}

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

print(response.text)
```

## Responses

### 200

CICheck

#### Example

```json
{
  "id": "string",
  "name": "string",
  "description": "string",
  "kind": "stdlib",
  "stdlib_function_key": "string",
  "stdlib_config": {},
  "custom_source_code": "string",
  "severity": "required",
  "enabled": true,
  "extension_id": "string",
  "extension_installation_id": "string"
}
```

- `id` (`updateRepoCICheck.response.200.id`; string, required)
  - pattern: `^ci_check_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `name` (`updateRepoCICheck.response.200.name`; string, required)
  - minLength: `1`
- `description` (`updateRepoCICheck.response.200.description`; string, required)
  - minLength: `1`
- `kind` (`updateRepoCICheck.response.200.kind`; string, required)
  - one of `"stdlib"`, `"custom"`
- `stdlib_function_key` (`updateRepoCICheck.response.200.stdlib_function_key`; any of, required)
  - any of the following: `string`, `null`
- `stdlib_config` (`updateRepoCICheck.response.200.stdlib_config`; any of, required)
  - any of the following: `object`, `null`
- `custom_source_code` (`updateRepoCICheck.response.200.custom_source_code`; any of, required)
  - any of the following: `string`, `null`
- `severity` (`updateRepoCICheck.response.200.severity`; string, required)
  - one of `"required"`, `"advisory"`
- `enabled` (`updateRepoCICheck.response.200.enabled`; boolean, required)
- `extension_id` (`updateRepoCICheck.response.200.extension_id`; any of, required)
  - any of the following: `ExtensionId`, `null`
- `extension_installation_id` (`updateRepoCICheck.response.200.extension_installation_id`; any of, required)
  - any of the following: `ExtensionInstallationId`, `null`

### 400

InvalidRequest | RequestBodyTooDeep

#### Example

```json
{
  "_tag": "InvalidRequest",
  "part": "path",
  "issues": [
    {
      "path": [
        "string"
      ],
      "message": "string"
    }
  ]
}
```

Any of the following:

- `InvalidRequestEncoded`
  - `_tag` (`InvalidRequestEncoded._tag`; string, required)
    - one of `"InvalidRequest"`
  - `part` (`InvalidRequestEncoded.part`; string, required)
    - one of `"path"`, `"query"`, `"headers"`, `"body"`
  - `issues` (`InvalidRequestEncoded.issues`; array of object, required)
    - `path` (`InvalidRequestEncoded.issues.path`; array\<any of\>, required)
      - any of the following: `string`, `integer`
    - `message` (`InvalidRequestEncoded.issues.message`; string, required)
- `RequestBodyTooDeepEncoded`
  - `_tag` (`RequestBodyTooDeepEncoded._tag`; string, required)
    - one of `"RequestBodyTooDeep"`
  - `max_depth` (`RequestBodyTooDeepEncoded.max_depth`; integer, required)
    - maximum: `9007199254740991` · minimum: `-9007199254740991`

### 401

InvalidCredentials

#### Example

```json
{
  "_tag": "InvalidCredentials"
}
```

- `_tag` (`updateRepoCICheck.response.401._tag`; string, required)
  - one of `"InvalidCredentials"`

### 403

Forbidden | ForbiddenOrigin | RequiresPersonalSession | RunBranchRequired

#### Example

```json
{
  "_tag": "Forbidden",
  "message": "string"
}
```

Any of the following:

- `ForbiddenEncoded`
  - `_tag` (`ForbiddenEncoded._tag`; string, required)
    - one of `"Forbidden"`
  - `message` (`ForbiddenEncoded.message`; string, required)
- `ForbiddenOriginEncoded`
  - `_tag` (`ForbiddenOriginEncoded._tag`; string, required)
    - one of `"ForbiddenOrigin"`
- `RequiresPersonalSessionEncoded`
  - `_tag` (`RequiresPersonalSessionEncoded._tag`; string, required)
    - one of `"RequiresPersonalSession"`
- `RunBranchRequiredEncoded`
  - `_tag` (`RunBranchRequiredEncoded._tag`; string, required)
    - one of `"RunBranchRequired"`
  - `branch` (`RunBranchRequiredEncoded.branch`; string, required)
    - minLength: `1`
  - `message` (`RunBranchRequiredEncoded.message`; string, required)

### 404

BranchNotFound | CICheckNotFound | RepoNotFound

#### Example

```json
{
  "_tag": "BranchNotFound",
  "branch": "string"
}
```

Any of the following:

- `BranchNotFoundEncoded`
  - `_tag` (`BranchNotFoundEncoded._tag`; string, required)
    - one of `"BranchNotFound"`
  - `branch` (`BranchNotFoundEncoded.branch`; string, required)
    - minLength: `1`
- `CICheckNotFoundEncoded`
  - `_tag` (`CICheckNotFoundEncoded._tag`; string, required)
    - one of `"CICheckNotFound"`
  - `ci_check_id` (`CICheckNotFoundEncoded.ci_check_id`; string, required)
    - pattern: `^ci_check_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `RepoNotFoundEncoded`
  - `_tag` (`RepoNotFoundEncoded._tag`; string, required)
    - one of `"RepoNotFound"`

### 409

RepoArchived

#### Example

```json
{
  "_tag": "RepoArchived"
}
```

- `_tag` (`updateRepoCICheck.response.409._tag`; string, required)
  - one of `"RepoArchived"`

### 413

WriteTooLarge | RequestBodyTooLarge

#### Example

```json
{
  "_tag": "WriteTooLarge",
  "message": "string"
}
```

Any of the following:

- `WriteTooLargeEncoded`
  - `_tag` (`WriteTooLargeEncoded._tag`; string, required)
    - one of `"WriteTooLarge"`
  - `message` (`WriteTooLargeEncoded.message`; string, required)
- `RequestBodyTooLargeEncoded`
  - `_tag` (`RequestBodyTooLargeEncoded._tag`; string, required)
    - one of `"RequestBodyTooLarge"`
  - `max_bytes` (`RequestBodyTooLargeEncoded.max_bytes`; integer, required)
    - maximum: `9007199254740991` · minimum: `-9007199254740991`

### 422

InvalidCICheck | WriteRefused

#### Example

```json
{
  "_tag": "InvalidCICheck",
  "reason": "string",
  "field": "string"
}
```

Any of the following:

- `InvalidCICheckEncoded`
  - `_tag` (`InvalidCICheckEncoded._tag`; string, required)
    - one of `"InvalidCICheck"`
  - `reason` (`InvalidCICheckEncoded.reason`; string, required)
    - minLength: `1`
  - `field` (`InvalidCICheckEncoded.field`; string, required)
    - minLength: `1`
- `WriteRefusedEncoded`
  - `_tag` (`WriteRefusedEncoded._tag`; string, required)
    - one of `"WriteRefused"`
  - `violations` (`WriteRefusedEncoded.violations`; array of Violation, required)
    - every option has:
      - `field` (`<option>.field`; string, required)
        - minLength: `1`
    - any of the following, each adding:
      - `object` (`WriteRefusedEncoded.violations.1`)
        - `kind` (`WriteRefusedEncoded.violations.1.kind`; any of, required)
          - any of the following:
            - `string`: one of `"formula"`
        - `model` (`WriteRefusedEncoded.violations.1.model`; string, required)
          - minLength: `1`
        - `reason` (`WriteRefusedEncoded.violations.1.reason`; string, required)
          - minLength: `1`
        - `record_ids` (`WriteRefusedEncoded.violations.1.record_ids`; array of string, required)
          - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
      - `object` (`WriteRefusedEncoded.violations.2`)
        - `kind` (`WriteRefusedEncoded.violations.2.kind`; any of, required)
          - any of the following:
            - `string`: one of `"custom_field"`
        - `model` (`WriteRefusedEncoded.violations.2.model`; string, required)
          - minLength: `1`
        - `reason` (`WriteRefusedEncoded.violations.2.reason`; string, required)
          - minLength: `1`
        - `record_ids` (`WriteRefusedEncoded.violations.2.record_ids`; array of string, required)
          - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
      - `object` (`WriteRefusedEncoded.violations.3`)
        - `kind` (`WriteRefusedEncoded.violations.3.kind`; any of, required)
          - any of the following:
            - `string`: one of `"uncarried_value"`
        - `model` (`WriteRefusedEncoded.violations.3.model`; string, required)
          - minLength: `1`
        - `record_id` (`WriteRefusedEncoded.violations.3.record_id`; string, required)
          - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
        - `written_by` (`WriteRefusedEncoded.violations.3.written_by`; string, required)
          - one of `"ours"`, `"theirs"`
        - `value` (`WriteRefusedEncoded.violations.3.value`; unknown, required)
        - `reason` (`WriteRefusedEncoded.violations.3.reason`; string, required)
          - minLength: `1`
      - `object` (`WriteRefusedEncoded.violations.4`)
        - `kind` (`WriteRefusedEncoded.violations.4.kind`; any of, required)
          - any of the following:
            - `string`: one of `"record_reference"`
        - `model` (`WriteRefusedEncoded.violations.4.model`; string, required)
          - minLength: `1`
        - `record_id` (`WriteRefusedEncoded.violations.4.record_id`; string, required)
          - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
        - `referenced_model` (`WriteRefusedEncoded.violations.4.referenced_model`; any of, required)
          - any of the following: `string`, `null`
        - `referenced_record_id` (`WriteRefusedEncoded.violations.4.referenced_record_id`; string, required)
          - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
      - `object` (`WriteRefusedEncoded.violations.5`)
        - `kind` (`WriteRefusedEncoded.violations.5.kind`; any of, required)
          - any of the following:
            - `string`: one of `"reference_target"`
        - `model` (`WriteRefusedEncoded.violations.5.model`; string, required)
          - minLength: `1`
        - `target_model` (`WriteRefusedEncoded.violations.5.target_model`; any of, required)
          - any of the following: `string`, `null`
        - `record_ids` (`WriteRefusedEncoded.violations.5.record_ids`; array of string, required)
          - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
      - `object` (`WriteRefusedEncoded.violations.6`)
        - `kind` (`WriteRefusedEncoded.violations.6.kind`; any of, required)
          - any of the following:
            - `string`: one of `"reference_field_target"`
        - `model` (`WriteRefusedEncoded.violations.6.model`; string, required)
          - minLength: `1`
        - `target_model` (`WriteRefusedEncoded.violations.6.target_model`; any of, required)
          - any of the following: `string`, `null`
        - `record_ids` (`WriteRefusedEncoded.violations.6.record_ids`; array of string, required)
          - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
      - `object` (`WriteRefusedEncoded.violations.7`)
        - `kind` (`WriteRefusedEncoded.violations.7.kind`; any of, required)
          - any of the following:
            - `string`: one of `"unique"`
        - `model` (`WriteRefusedEncoded.violations.7.model`; string, required)
          - minLength: `1`
        - `record_ids` (`WriteRefusedEncoded.violations.7.record_ids`; array of string, required)
          - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
      - `object` (`WriteRefusedEncoded.violations.8`)
        - `kind` (`WriteRefusedEncoded.violations.8.kind`; any of, required)
          - any of the following:
            - `string`: one of `"required"`
        - `model` (`WriteRefusedEncoded.violations.8.model`; string, required)
          - minLength: `1`
        - `record_ids` (`WriteRefusedEncoded.violations.8.record_ids`; array of string, required)
          - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
      - `object` (`WriteRefusedEncoded.violations.9`)
        - `kind` (`WriteRefusedEncoded.violations.9.kind`; any of, required)
          - any of the following:
            - `string`: one of `"field_api_name"`
        - `model` (`WriteRefusedEncoded.violations.9.model`; string, required)
          - minLength: `1`
        - `api_name` (`WriteRefusedEncoded.violations.9.api_name`; string, required)
          - minLength: `1`
        - `record_ids` (`WriteRefusedEncoded.violations.9.record_ids`; array of string, required)
          - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
      - `object` (`WriteRefusedEncoded.violations.10`)
        - `kind` (`WriteRefusedEncoded.violations.10.kind`; any of, required)
          - any of the following:
            - `string`: one of `"model_api_name"`
        - `model` (`WriteRefusedEncoded.violations.10.model`; string, required)
          - minLength: `1`
        - `api_name` (`WriteRefusedEncoded.violations.10.api_name`; string, required)
          - minLength: `1`
        - `record_ids` (`WriteRefusedEncoded.violations.10.record_ids`; array of string, required)
          - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
      - `object` (`WriteRefusedEncoded.violations.11`)
        - `kind` (`WriteRefusedEncoded.violations.11.kind`; any of, required)
          - any of the following:
            - `string`: one of `"extension_name"`
        - `model` (`WriteRefusedEncoded.violations.11.model`; string, required)
          - minLength: `1`
        - `name` (`WriteRefusedEncoded.violations.11.name`; string, required)
          - minLength: `1`
        - `record_ids` (`WriteRefusedEncoded.violations.11.record_ids`; array of string, required)
          - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
      - `object` (`WriteRefusedEncoded.violations.12`)
        - `kind` (`WriteRefusedEncoded.violations.12.kind`; any of, required)
          - any of the following:
            - `string`: one of `"extension_peer"`
        - `model` (`WriteRefusedEncoded.violations.12.model`; string, required)
          - minLength: `1`
        - `name` (`WriteRefusedEncoded.violations.12.name`; string, required)
          - minLength: `1`
        - `version` (`WriteRefusedEncoded.violations.12.version`; string, required)
          - minLength: `1`
        - `peer` (`WriteRefusedEncoded.violations.12.peer`; string, required)
          - minLength: `1`
        - `range` (`WriteRefusedEncoded.violations.12.range`; string, required)
          - minLength: `1`
        - `peer_version` (`WriteRefusedEncoded.violations.12.peer_version`; any of, required)
          - any of the following: `string`, `null`
        - `record_ids` (`WriteRefusedEncoded.violations.12.record_ids`; array of string, required)
          - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
      - `object` (`WriteRefusedEncoded.violations.13`)
        - `kind` (`WriteRefusedEncoded.violations.13.kind`; any of, required)
          - any of the following:
            - `string`: one of `"attachment"`
        - `model` (`WriteRefusedEncoded.violations.13.model`; string, required)
          - minLength: `1`
        - `record_id` (`WriteRefusedEncoded.violations.13.record_id`; string, required)
          - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
        - `attachment_blob_id` (`WriteRefusedEncoded.violations.13.attachment_blob_id`; string, required)
          - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
      - `object` (`WriteRefusedEncoded.violations.14`)
        - `kind` (`WriteRefusedEncoded.violations.14.kind`; any of, required)
          - any of the following:
            - `string`: one of `"agent_skill"`
        - `model` (`WriteRefusedEncoded.violations.14.model`; string, required)
          - minLength: `1`
        - `reason` (`WriteRefusedEncoded.violations.14.reason`; string, required)
          - minLength: `1`
        - `record_ids` (`WriteRefusedEncoded.violations.14.record_ids`; array of string, required)
          - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
      - `object` (`WriteRefusedEncoded.violations.15`)
        - `kind` (`WriteRefusedEncoded.violations.15.kind`; any of, required)
          - any of the following:
            - `string`: one of `"tag_state"`
        - `reason` (`WriteRefusedEncoded.violations.15.reason`; string, required)
          - minLength: `1`
        - `record_ids` (`WriteRefusedEncoded.violations.15.record_ids`; array of string, required)
          - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`

### 429

RateLimited

#### Example

```json
{
  "_tag": "RateLimited"
}
```

- `_tag` (`updateRepoCICheck.response.429._tag`; string, required)
  - one of `"RateLimited"`

### 500

RepoFailure

#### Example

```json
{
  "_tag": "RepoFailure",
  "reason": "string"
}
```

- `_tag` (`updateRepoCICheck.response.500._tag`; string, required)
  - one of `"RepoFailure"`
- `reason` (`updateRepoCICheck.response.500.reason`; string, required)

### 503

RepoBusy | SessionUnavailable | RateLimitUnavailable

#### Example

```json
{
  "_tag": "RepoBusy",
  "message": "string"
}
```

Any of the following:

- `RepoBusyEncoded`
  - `_tag` (`RepoBusyEncoded._tag`; string, required)
    - one of `"RepoBusy"`
  - `message` (`RepoBusyEncoded.message`; string, required)
- `SessionUnavailableEncoded`
  - `_tag` (`SessionUnavailableEncoded._tag`; string, required)
    - one of `"SessionUnavailable"`
- `RateLimitUnavailableEncoded`
  - `_tag` (`RateLimitUnavailableEncoded._tag`; string, required)
    - one of `"RateLimitUnavailable"`


Source: https://buildrforge.com/docs/api/update-repo-ci-check/index.md
