---
title: インハウスシートの行をアトミックに作成、更新、削除します。
description: 値にはカラム ID または一意のタイトルを使用します。厳密なカラム型が適用され、null
  はセルをクリアします。無効な値がある場合は、row_ref、column_id、reason
  とともにバッチ全体が拒否されます。プレビューでは、書き込みを行わずにセルの変更内容と作成/削除された行 ID
  を返します。すべての書き込みでシート全体が返されます。書き込みは冪等ではありません。結果が不明な場合は再試行する前に再読み込みしてください。更新は
  upsert ではありません。
canonical_url: https://orchestor.io/docs/space/rest-api/endpoint-reference/sheets/post-batch-space-sheet-rows
markdown_url: https://orchestor.io/docs/space/rest-api/endpoint-reference/sheets/post-batch-space-sheet-rows.md
---

# インハウスシートの行をアトミックに作成、更新、削除します。

値にはカラム ID または一意のタイトルを使用します。厳密なカラム型が適用され、null はセルをクリアします。無効な値がある場合は、row_ref、column_id、reason とともにバッチ全体が拒否されます。プレビューでは、書き込みを行わずにセルの変更内容と作成/削除された行 ID を返します。すべての書き込みでシート全体が返されます。書き込みは冪等ではありません。結果が不明な場合は再試行する前に再読み込みしてください。更新は upsert ではありません。

```http
POST /v1/space/sheets/{sheet_id}/tabs/{tab_id}/rows/batch
```

Server: https://api.orchestor.io

Operation ID: `batchSpaceSheetRows`

## Authentication

```json
[
  [
    {
      "key": "session_cookie",
      "type": "apiKey",
      "description": "ウェブアプリにサインインすることで確立されるブラウザセッションです。サーバーは、ワークスペースのメンバーシップと権限を確認します。ワークスペーススコープの操作には X-Workspace-ID を指定してください。サーバー間リクエストの場合、操作がサポートしていれば API キーを使用します。",
      "name": "wos-session",
      "in": "cookie",
      "scopes": []
    }
  ],
  [
    {
      "key": "bearer_api_key",
      "type": "http",
      "description": "Authorization: Bearer <key> を使用して、ワークスペーススコープの API キーで認証します。サポートされているキープレフィックスは sk_live_ および sk_test_ です。キーによってワークスペースと許可される権限が決定されます。X-Workspace-ID を指定しても、別のワークスペースへのアクセス権は付与されません。API キーの作成と管理はワークスペース設定で行います。キーを URL に入れないでください。",
      "scheme": "bearer",
      "scopes": []
    }
  ]
]
```

## Parameters

```json
[
  {
    "name": "X-Workspace-ID",
    "in": "header",
    "required": false,
    "description": "アクセスするワークスペースです。ワークスペーススコープの API キーを使用する場合、サーバーはキーからこの値を導出するため、ヘッダーは任意です。指定する場合、認証情報のワークスペースと一致する必要があり、一致しない場合リクエストは 403 workspace_mismatch を返します。インタラクティブなセッションリクエストの場合、メンバーになっているワークスペースを選択するためにこのヘッダーを指定します。プロジェクト ID をワークスペース ID として使用することはできません。",
    "schema": {
      "type": "string",
      "example": "wks_abc123"
    }
  },
  {
    "name": "sheet_id",
    "in": "path",
    "required": true,
    "schema": {
      "pattern": "^sht_[a-f0-9]{24}$",
      "type": "string"
    }
  },
  {
    "name": "tab_id",
    "in": "path",
    "required": true,
    "schema": {
      "minLength": 1,
      "maxLength": 256,
      "type": "string"
    }
  }
]
```

## Request body

```json
{
  "required": true,
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "name": "BatchSpaceSheetRows",
        "type": "object",
        "required": [
          "operations",
          "updated_at"
        ],
        "properties": {
          "operations": {
            "minItems": 1,
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "required": [
                    "op",
                    "values"
                  ],
                  "properties": {
                    "before_row_id": {
                      "minLength": 1,
                      "maxLength": 256,
                      "type": "string"
                    },
                    "op": {
                      "type": "string",
                      "enumValues": [
                        "create"
                      ]
                    },
                    "row_id": {
                      "minLength": 1,
                      "maxLength": 256,
                      "type": "string"
                    },
                    "values": {
                      "type": "object",
                      "additionalProperties": {}
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "required": [
                    "op",
                    "row_id",
                    "values"
                  ],
                  "properties": {
                    "op": {
                      "type": "string",
                      "enumValues": [
                        "update"
                      ]
                    },
                    "row_id": {
                      "minLength": 1,
                      "maxLength": 256,
                      "type": "string"
                    },
                    "values": {
                      "type": "object",
                      "additionalProperties": {}
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "required": [
                    "op",
                    "row_id"
                  ],
                  "properties": {
                    "op": {
                      "type": "string",
                      "enumValues": [
                        "delete"
                      ]
                    },
                    "row_id": {
                      "minLength": 1,
                      "maxLength": 256,
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            }
          },
          "preview": {
            "type": "boolean"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      }
    }
  ]
}
```

## Responses

### 200

```json
{
  "statusCode": "200",
  "description": "更新されたシート全体またはプレビューの差分です。",
  "headers": [],
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "anyOf": [
              {
                "name": "SpaceSheet",
                "type": "object",
                "required": [
                  "id",
                  "workspace_id",
                  "title",
                  "pinned",
                  "sort_position",
                  "archived",
                  "tabs",
                  "created_at",
                  "updated_at",
                  "deleted_at"
                ],
                "properties": {
                  "archived": {
                    "type": "boolean"
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "deleted_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time"
                  },
                  "folder_id": {
                    "type": "string",
                    "nullable": true,
                    "default": null
                  },
                  "id": {
                    "pattern": "^sht_[a-f0-9]{24}$",
                    "type": "string"
                  },
                  "pinned": {
                    "type": "boolean"
                  },
                  "sort_position": {
                    "minimum": 0,
                    "maximum": 2147483647,
                    "type": "integer"
                  },
                  "tabs": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "id",
                        "title",
                        "rows"
                      ],
                      "properties": {
                        "columns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "title",
                              "type"
                            ],
                            "properties": {
                              "color": {
                                "type": "string"
                              },
                              "currencyCode": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "hidden": {
                                "type": "boolean"
                              },
                              "id": {
                                "minLength": 1,
                                "maxLength": 256,
                                "type": "string"
                              },
                              "options": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "pinned": {
                                "type": "boolean"
                              },
                              "title": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enumValues": [
                                  "text",
                                  "number",
                                  "currency",
                                  "url",
                                  "domain",
                                  "date",
                                  "timestamp",
                                  "email",
                                  "image",
                                  "checkbox",
                                  "select",
                                  "multi-select"
                                ]
                              },
                              "width": {
                                "minimum": 104,
                                "type": "integer"
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "deleted": {
                          "type": "boolean"
                        },
                        "filter": {
                          "type": "object",
                          "required": [
                            "columnId",
                            "value"
                          ],
                          "properties": {
                            "columnId": {
                              "minLength": 1,
                              "maxLength": 256,
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        },
                        "hidden": {
                          "type": "boolean"
                        },
                        "id": {
                          "minLength": 1,
                          "maxLength": 256,
                          "type": "string"
                        },
                        "rows": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "id"
                            ],
                            "properties": {
                              "id": {
                                "minLength": 1,
                                "maxLength": 256,
                                "type": "string"
                              },
                              "parentId": {
                                "minLength": 1,
                                "maxLength": 256,
                                "type": "string"
                              },
                              "values": {
                                "type": "object",
                                "additionalProperties": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  ]
                                }
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "sort": {
                          "type": "object",
                          "required": [
                            "columnId",
                            "direction"
                          ],
                          "properties": {
                            "columnId": {
                              "minLength": 1,
                              "maxLength": 256,
                              "type": "string"
                            },
                            "direction": {
                              "type": "string",
                              "enumValues": [
                                "asc",
                                "desc"
                              ]
                            }
                          },
                          "additionalProperties": false
                        },
                        "title": {
                          "minLength": 1,
                          "maxLength": 100,
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "title": {
                    "minLength": 1,
                    "maxLength": 100,
                    "type": "string"
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "workspace_id": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "preview",
                  "changes",
                  "created",
                  "deleted"
                ],
                "properties": {
                  "changes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "row_id",
                        "column_id",
                        "before",
                        "after"
                      ],
                      "properties": {
                        "after": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "before": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "column_id": {
                          "minLength": 1,
                          "maxLength": 256,
                          "type": "string"
                        },
                        "row_id": {
                          "minLength": 1,
                          "maxLength": 256,
                          "type": "string"
                        }
                      }
                    }
                  },
                  "created": {
                    "type": "array",
                    "items": {
                      "minLength": 1,
                      "maxLength": 256,
                      "type": "string"
                    }
                  },
                  "deleted": {
                    "type": "array",
                    "items": {
                      "minLength": 1,
                      "maxLength": 256,
                      "type": "string"
                    }
                  },
                  "preview": {
                    "type": "boolean",
                    "enumValues": [
                      true
                    ]
                  }
                }
              }
            ]
          }
        }
      }
    }
  ]
}
```

### 400

```json
{
  "statusCode": "400",
  "description": "無効なバッチまたはセルの値です。変更は保存されません。",
  "headers": [],
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "type",
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "details": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "row_ref",
                    "column_id",
                    "reason"
                  ],
                  "properties": {
                    "column_id": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "row_ref": {
                      "type": "string"
                    }
                  }
                }
              },
              "message": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  ]
}
```

### 401

```json
{
  "statusCode": "401",
  "description": "認証が必要であるか、資格情報が無効です。新しい資格情報なしでは再試行できません。\n一般的なエラーコード: `invalid_api_key`（キーの欠落、不正な形式、または失効）、\n`expired_session`（セッション Cookie の期限切れ — Web アプリ経由で再認証してください）。",
  "headers": [],
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "name": "ApiError",
        "type": "object",
        "description": "共通の構造化エラーエンベロープです。失敗の処理には HTTP ステータスとエラーコードを使用してください。一部のエンドポイントは、追加フィールドを持つより具体的なエラー スキーマを宣言しています。",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "description": "失敗のカテゴリ、コード、および人間が読める形式の説明です。オプションでフィールドまたは検証のコンテキストが含まれます。",
            "required": [
              "type",
              "code",
              "message",
              "doc_url"
            ],
            "properties": {
              "type": {
                "type": "string",
                "description": "失敗を分類するための広範なエラーカテゴリです。より具体的なコードと HTTP ステータスによって処理方法が決定されます。",
                "enumValues": [
                  "invalid_request_error",
                  "authentication_error",
                  "permission_error",
                  "entitlement_error",
                  "not_found_error",
                  "rate_limit_error",
                  "api_error"
                ]
              },
              "code": {
                "type": "string",
                "description": "マシンリーダブルな失敗コードです。照合の際は大文字と小文字を保持してください。ハンドラーは VALIDATION_ERROR などの大文字のコードや invalid_parameter などの小文字のコードを返す場合があります。新しいコードが追加される可能性があり、サポートされるコードはエンドポイントによって異なります。",
                "example": "VALIDATION_ERROR"
              },
              "message": {
                "type": "string",
                "description": "この失敗に関する人間が読める形式の説明です。文言は変更される可能性があるため、プログラムによる判断には、このテキストを解析するのではなくコードを使用してください。",
                "example": "Request validation failed"
              },
              "feature": {
                "type": "string",
                "description": "402 拒絶で要求されるエンタイトルメント機能です。",
                "example": "included_engines"
              },
              "upgrade_url": {
                "type": "string",
                "format": "uri",
                "description": "402 拒絶時に提供されるプランまたは付与の復旧先です。"
              },
              "param": {
                "type": "string",
                "description": "ハンドラーから提供される場合、エラーに関連付けられた入力フィールドまたはパラメータです。単一のパラメータが特定されない場合は省略されます。検証の失敗では、代わりに details 内に複数のエントリが提供される場合があります。",
                "example": "limit"
              },
              "doc_url": {
                "type": "string",
                "format": "uri",
                "description": "エラーとともに提供されるドキュメントの URL です。コードから構築するのではなく、返された URL を使用してください。URL のフォーマットはハンドラーによって異なる場合があります。",
                "example": "https://docs.orchestor.io/errors/validation_error"
              },
              "details": {
                "description": "提供されている場合の追加の失敗コンテキストです。検証ミドルウェアはフィールドの問題の配列を返し、型定義されたビジネスエラーはコード固有のオブジェクトを返します。省略されている場合は、追加のコンテキストが添付されていないことを意味します。",
                "anyOf": [
                  {
                    "type": "array",
                    "description": "検証の問題です。リクエストには、同じフィールドに対する複数の問題を含め、複数の問題が存在する可能性があります。",
                    "example": [
                      {
                        "path": "items.0.name",
                        "message": "Invalid input",
                        "code": "invalid_type"
                      }
                    ],
                    "items": {
                      "type": "object",
                      "required": [
                        "path",
                        "message",
                        "code"
                      ],
                      "properties": {
                        "path": {
                          "type": "string",
                          "description": "配列インデックスを含む、無効な値へのドット区切りのパスです。空の文字列はルート入力を識別します。",
                          "example": "items.0.name"
                        },
                        "message": {
                          "type": "string",
                          "description": "この検証の問題に関する人間が読める形式の説明です。プログラムによる処理には code および path を使用してください。",
                          "example": "Invalid input"
                        },
                        "code": {
                          "type": "string",
                          "description": "invalid_type などの検証問題のコード、またはバリデータによって提供されるカスタムコードです。外側の error.code とは異なります。",
                          "example": "invalid_type"
                        }
                      }
                    }
                  },
                  {
                    "type": "object",
                    "description": "エラーコードに固有の追加フィールドです。これらを解釈する前に、エンドポイントのエラー ドキュメントを参照してください。",
                    "additionalProperties": true
                  }
                ]
              }
            }
          }
        }
      },
      "example": {
        "error": {
          "type": "authentication_error",
          "code": "invalid_api_key",
          "message": "Invalid API key provided",
          "doc_url": "https://docs.orchestor.io/api-reference/errors#authentication"
        }
      }
    }
  ]
}
```

### 404

```json
{
  "statusCode": "404",
  "description": "要求されたリソースは、現在のワークスペースまたはルートスコープで利用できません。識別子と選択されたワークスペースを確認してください。削除されたリソース、またはアクセススコープ外のリソースに対しても同じレスポンスが返される場合があります。",
  "headers": [],
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "name": "ApiError",
        "type": "object",
        "description": "共通の構造化エラーエンベロープです。失敗の処理には HTTP ステータスとエラーコードを使用してください。一部のエンドポイントは、追加フィールドを持つより具体的なエラー スキーマを宣言しています。",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "description": "失敗のカテゴリ、コード、および人間が読める形式の説明です。オプションでフィールドまたは検証のコンテキストが含まれます。",
            "required": [
              "type",
              "code",
              "message",
              "doc_url"
            ],
            "properties": {
              "type": {
                "type": "string",
                "description": "失敗を分類するための広範なエラーカテゴリです。より具体的なコードと HTTP ステータスによって処理方法が決定されます。",
                "enumValues": [
                  "invalid_request_error",
                  "authentication_error",
                  "permission_error",
                  "entitlement_error",
                  "not_found_error",
                  "rate_limit_error",
                  "api_error"
                ]
              },
              "code": {
                "type": "string",
                "description": "マシンリーダブルな失敗コードです。照合の際は大文字と小文字を保持してください。ハンドラーは VALIDATION_ERROR などの大文字のコードや invalid_parameter などの小文字のコードを返す場合があります。新しいコードが追加される可能性があり、サポートされるコードはエンドポイントによって異なります。",
                "example": "VALIDATION_ERROR"
              },
              "message": {
                "type": "string",
                "description": "この失敗に関する人間が読める形式の説明です。文言は変更される可能性があるため、プログラムによる判断には、このテキストを解析するのではなくコードを使用してください。",
                "example": "Request validation failed"
              },
              "feature": {
                "type": "string",
                "description": "402 拒絶で要求されるエンタイトルメント機能です。",
                "example": "included_engines"
              },
              "upgrade_url": {
                "type": "string",
                "format": "uri",
                "description": "402 拒絶時に提供されるプランまたは付与の復旧先です。"
              },
              "param": {
                "type": "string",
                "description": "ハンドラーから提供される場合、エラーに関連付けられた入力フィールドまたはパラメータです。単一のパラメータが特定されない場合は省略されます。検証の失敗では、代わりに details 内に複数のエントリが提供される場合があります。",
                "example": "limit"
              },
              "doc_url": {
                "type": "string",
                "format": "uri",
                "description": "エラーとともに提供されるドキュメントの URL です。コードから構築するのではなく、返された URL を使用してください。URL のフォーマットはハンドラーによって異なる場合があります。",
                "example": "https://docs.orchestor.io/errors/validation_error"
              },
              "details": {
                "description": "提供されている場合の追加の失敗コンテキストです。検証ミドルウェアはフィールドの問題の配列を返し、型定義されたビジネスエラーはコード固有のオブジェクトを返します。省略されている場合は、追加のコンテキストが添付されていないことを意味します。",
                "anyOf": [
                  {
                    "type": "array",
                    "description": "検証の問題です。リクエストには、同じフィールドに対する複数の問題を含め、複数の問題が存在する可能性があります。",
                    "example": [
                      {
                        "path": "items.0.name",
                        "message": "Invalid input",
                        "code": "invalid_type"
                      }
                    ],
                    "items": {
                      "type": "object",
                      "required": [
                        "path",
                        "message",
                        "code"
                      ],
                      "properties": {
                        "path": {
                          "type": "string",
                          "description": "配列インデックスを含む、無効な値へのドット区切りのパスです。空の文字列はルート入力を識別します。",
                          "example": "items.0.name"
                        },
                        "message": {
                          "type": "string",
                          "description": "この検証の問題に関する人間が読める形式の説明です。プログラムによる処理には code および path を使用してください。",
                          "example": "Invalid input"
                        },
                        "code": {
                          "type": "string",
                          "description": "invalid_type などの検証問題のコード、またはバリデータによって提供されるカスタムコードです。外側の error.code とは異なります。",
                          "example": "invalid_type"
                        }
                      }
                    }
                  },
                  {
                    "type": "object",
                    "description": "エラーコードに固有の追加フィールドです。これらを解釈する前に、エンドポイントのエラー ドキュメントを参照してください。",
                    "additionalProperties": true
                  }
                ]
              }
            }
          }
        }
      },
      "example": {
        "error": {
          "type": "not_found_error",
          "code": "resource_not_found",
          "message": "Resource not found",
          "doc_url": "https://docs.orchestor.io/api-reference/errors#not-found"
        }
      }
    }
  ]
}
```

### 409

```json
{
  "statusCode": "409",
  "description": "シートが変更されたか、利用できません。書き込みの前に再読み込みしてください。",
  "headers": [],
  "content": []
}
```

---

[Documentation index](https://orchestor.io/docs/llms.txt)
