---
title: "updateRepoCustomRecords"
---

> 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.

# updateRepoCustomRecords

Path: Forge API › customRecords

`PATCH /repos/{repo_id}/branches/{branch}/records/bulk`

Update up to 500 records by id, of any custom models, in one write, all or none. Each row reads as updateRepoCustomRecord's body with the record's id; two rows can't name one record. data holds the records in row order.

## Path parameters

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

## Request body

_Required._

- `records` (`updateRepoCustomRecords.records`; array of object, required)
  - `id` (`updateRepoCustomRecords.records.id`; string, required)
    - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
  - `fields` (`updateRepoCustomRecords.records.fields`; object, required)
  - `formulas` (`updateRepoCustomRecords.records.formulas`; map of any of, optional)

## Example request

```json
{
  "records": [
    {
      "id": "string",
      "fields": {},
      "formulas": {
        "property1": "string",
        "property2": "string"
      }
    }
  ]
}
```

## Code samples

### cURL

```bash
curl --request PATCH \
  --url '<base-url>/repos/<repo_id>/branches/<branch>/records/bulk' \
  --header 'Content-Type: application/json' \
  --data '
{
  "records": [
    {
      "id": "string",
      "fields": {},
      "formulas": {
        "property1": "string",
        "property2": "string"
      }
    }
  ]
}
'
```

### TypeScript

```typescript
const url = '<base-url>/repos/<repo_id>/branches/<branch>/records/bulk';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    records: [
      {id: 'string', fields: {}, formulas: {property1: 'string', property2: 'string'}}
    ]
  })
};

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>/records/bulk"

payload = { "records": [
        {
            "id": "string",
            "fields": {},
            "formulas": {
                "property1": "string",
                "property2": "string"
            }
        }
    ] }
headers = {"Content-Type": "application/json"}

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

print(response.text)
```

## Responses

### 200

CustomRecordList

#### Example

```json
{
  "data": [
    {
      "id": "string",
      "fields": {
        "property1": {
          "id": "string",
          "filename": "string",
          "content_type": "string",
          "size": 0,
          "created_by_id": "string",
          "created_at": "string",
          "uploaded_at": "string",
          "promoted_at": "string"
        },
        "property2": {
          "id": "string",
          "filename": "string",
          "content_type": "string",
          "size": 0,
          "created_by_id": "string",
          "created_at": "string",
          "uploaded_at": "string",
          "promoted_at": "string"
        }
      },
      "formulas": {
        "property1": "string",
        "property2": "string"
      }
    }
  ]
}
```

- `data` (`updateRepoCustomRecords.response.200.data`; array of object, required)
  - `id` (`updateRepoCustomRecords.response.200.data.id`; string, required)
    - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
  - `fields` (`updateRepoCustomRecords.response.200.data.fields`; map of any of, required)
  - `formulas` (`updateRepoCustomRecords.response.200.data.formulas`; map of string, required)

### 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` (`updateRepoCustomRecords.response.401._tag`; string, required)
  - one of `"InvalidCredentials"`

### 403

RecordWriteDenied | Forbidden | ForbiddenOrigin | RequiresPersonalSession | RunBranchRequired

#### Example

```json
{
  "_tag": "RecordWriteDenied",
  "model": "string",
  "record_id": "string",
  "action": "string"
}
```

Any of the following:

- `RecordWriteDeniedEncoded`
  - `_tag` (`RecordWriteDeniedEncoded._tag`; string, required)
    - one of `"RecordWriteDenied"`
  - `model` (`RecordWriteDeniedEncoded.model`; string, required)
    - minLength: `1`
  - `record_id` (`RecordWriteDeniedEncoded.record_id`; any of, required)
    - any of the following: `TypeId`, `null`
  - `action` (`RecordWriteDeniedEncoded.action`; string, required)
    - minLength: `1`
- `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 | CustomRecordNotFound | 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`
- `CustomRecordNotFoundEncoded`
  - `_tag` (`CustomRecordNotFoundEncoded._tag`; string, required)
    - one of `"CustomRecordNotFound"`
  - `record_id` (`CustomRecordNotFoundEncoded.record_id`; string, required)
    - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `RepoNotFoundEncoded`
  - `_tag` (`RepoNotFoundEncoded._tag`; string, required)
    - one of `"RepoNotFound"`

### 409

RepoArchived

#### Example

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

- `_tag` (`updateRepoCustomRecords.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

BulkWriteRefused | WriteRefused

#### Example

```json
{
  "_tag": "BulkWriteRefused",
  "items": [
    {
      "index": -9007199254740991,
      "refusals": [
        {
          "_tag": "InvalidCustomRecord",
          "reason": "string"
        }
      ]
    }
  ],
  "more_items": -9007199254740991
}
```

Any of the following:

- `BulkWriteRefusedEncoded`
  - `_tag` (`BulkWriteRefusedEncoded._tag`; string, required)
    - one of `"BulkWriteRefused"`
  - `items` (`BulkWriteRefusedEncoded.items`; array of object, required)
    - `index` (`BulkWriteRefusedEncoded.items.index`; integer, required)
      - maximum: `9007199254740991` · minimum: `-9007199254740991`
    - `refusals` (`BulkWriteRefusedEncoded.items.refusals`; array\<any of\>, required)
      - any of the following: `InvalidCustomRecordEncoded`, `CustomRecordNotFoundEncoded`, `Violation`
  - `more_items` (`BulkWriteRefusedEncoded.more_items`; integer, required)
    - maximum: `9007199254740991` · minimum: `-9007199254740991`
- `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` (`updateRepoCustomRecords.response.429._tag`; string, required)
  - one of `"RateLimited"`

### 500

RepoFailure

#### Example

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

- `_tag` (`updateRepoCustomRecords.response.500._tag`; string, required)
  - one of `"RepoFailure"`
- `reason` (`updateRepoCustomRecords.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-custom-records/index.md
