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

# Recalculate Cells (Batch)

> Trigger recalculation for a batch of cells identified by ID. Requests are scoped to the workspace associated with the API key; table, sheet, column, cell, operation, and version IDs must belong to that workspace.

Trigger recalculation for a batch of cells by ID. Returns `202 Accepted` with an `execution_id`.

Use this endpoint to kick off computation for specific cells after adding rows or updating text cell values.


## OpenAPI

````yaml POST /api/public/v2/tables/{table_id}/sheets/{sheet_id}/cells/recalculations
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security:
  - ApiKeyAuth: []
paths:
  /api/public/v2/tables/{table_id}/sheets/{sheet_id}/cells/recalculations:
    post:
      tags:
        - smart-tables
      summary: Recalculate Cells (Batch)
      description: >-
        Trigger recalculation for a batch of cells identified by ID. Requests
        are scoped to the workspace associated with the API key; table, sheet,
        column, cell, operation, and version IDs must belong to that workspace.
      operationId: create_table_sheet_cell_recalculations_batch
      parameters:
        - name: table_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: sheet_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - cell_ids
              properties:
                cell_ids:
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: List of cell IDs to recalculate.
      responses:
        '200':
          description: No cells to recalculate
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '202':
          description: Recalculation started
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  execution_id:
                    type: string
                  cell_count:
                    type: integer
                  selected_cell_count:
                    type: integer
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Table, sheet, or cells not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          default: false
          description: Indicates that the request failed.
        message:
          type: string
          description: Human-readable error message.
        error:
          type: string
          description: Machine-readable or fallback error message.
      additionalProperties: true
      description: >-
        Standard error response. Some legacy endpoints may return either message
        or error.
  responses:
    UnauthorizedError:
      description: Unauthorized - missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````