---
updatedAt: 2026-05-28T16:10:00.000Z
agentTools:
  projectIndex: https://docs.phacetlabs.com/llms.txt
---

# Create Row

Creates a new Row with provided cell values. Optionally runs the rows configured in the Table.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/api/v2/tables/{tableId}/rows": {
      "post": {
        "description": "Creates a new Row with provided cell values. Optionally runs the rows configured in the Table.",
        "operationId": "createRow",
        "parameters": [
          {
            "name": "tableId",
            "required": true,
            "in": "path",
            "description": "The unique identifier of the Table",
            "schema": {
              "format": "uuid",
              "example": "123e4567-e89b-12d3-a456-426614174000"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRowRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created the Row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RowResponseDto"
                },
                "example": {
                  "id": "123e4567-e89b-12d3-a456-426614174001",
                  "sessionId": "8fbd26f8-9682-428a-9b67-d7d32cda299e",
                  "cells": [
                    {
                      "id": "123e4567-e89b-12d3-a456-426614174000",
                      "rowId": "3afed0b3-bf81-4cdb-91dd-2a72672bcf8f",
                      "columnId": "col-123",
                      "value": "Sample value 1",
                      "dataType": "text",
                      "status": "resolved",
                      "lastError": null,
                      "aiSourceUrl": "https://app.phacetlabs.com/projects/project-abc/table/table-1234/session/session-456?view=table&openCitationsCellId=123e4567-e89b-12d3-a456-426614174000",
                      "createdAt": "2024-01-15T10:30:00.000Z",
                      "updatedAt": "2024-01-15T10:30:00.000Z"
                    },
                    {
                      "id": "123e4567-e89b-12d3-a456-426614174000",
                      "rowId": "3afed0b3-bf81-4cdb-91dd-2a72672bcf8f",
                      "columnId": "col-456",
                      "value": [
                        "Option 1",
                        "Option 2"
                      ],
                      "dataType": "multipleSelect",
                      "status": "resolved",
                      "lastError": null,
                      "aiSourceUrl": null,
                      "createdAt": "2024-01-15T10:30:00.000Z",
                      "updatedAt": "2024-01-15T10:30:00.000Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Returned when the request is invalid. The response body will contain a list of validation errors",
            "content": {
              "application/json": {
                "example": {
                  "message": "The value must be a string",
                  "errorKey": "BadRequestError"
                }
              }
            }
          },
          "401": {
            "description": "Returned when the request is unauthorized.",
            "content": {
              "application/json": {
                "example": {
                  "message": "Unknown API key",
                  "errorKey": "UnauthorizedError"
                }
              }
            }
          },
          "404": {
            "description": "Returned when the requested resource could not be found within your organization",
            "content": {
              "application/json": {
                "example": {
                  "message": "The resource you are trying to access does not exist or is not accessible by your organization",
                  "errorKey": "NotFoundError"
                }
              }
            }
          },
          "500": {
            "description": "Returned when an error occurs on the server.",
            "content": {
              "application/json": {
                "example": {
                  "message": "An unexpected error occurred. Please try again later.",
                  "errorKey": "InternalServerError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Create Row",
        "tags": [
          "Rows"
        ]
      }
    }
  },
  "info": {
    "title": "Phacet API",
    "description": "Phacet API (current version with project support)",
    "version": "2.0",
    "contact": {}
  },
  "servers": [
    {
      "url": "https://api.phacetlabs.com",
      "description": "Production"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "type": "http"
      }
    },
    "schemas": {
      "CellResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the Cell",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "format": "uuid"
          },
          "rowId": {
            "type": "string",
            "description": "The unique identifier of the Row",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "format": "uuid"
          },
          "columnId": {
            "type": "string",
            "description": "The unique identifier of the Column",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "format": "uuid"
          },
          "value": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object"
              }
            ],
            "description": "The value of the cell, type depends on dataType: \n - Text and singleSelect value: string \n - json values: plain objects \n - multipleSelect value: array of strings \n - file value: object with an id and a name",
            "example": "Sample value 1",
            "nullable": true
          },
          "dataType": {
            "type": "string",
            "enum": [
              "text",
              "file",
              "singleSelect",
              "multipleSelect",
              "json"
            ],
            "description": "The type of the value stored in this cell",
            "example": "text"
          },
          "status": {
            "type": "string",
            "enum": [
              "initialized",
              "ready",
              "queued",
              "calculating",
              "resolved",
              "stale",
              "error",
              "invalidConfig",
              "skipped"
            ],
            "description": "The current status of the cell",
            "example": "resolved"
          },
          "lastError": {
            "type": "string",
            "description": "The last error message if status is error, null otherwise",
            "example": "Failed to process value"
          },
          "aiSourceUrl": {
            "type": "string",
            "description": "URL to view AI Source citations for this cell. Only present if the column is configured with AI Source (grounding enabled).",
            "example": "https://app.phacetlabs.com/projects/project-abc/table/table-1234/session/session-456?view=table&openCitationsCellId=123e4567-e89b-12d3-a456-426614174000",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "description": "The ISO 8601 timestamp when the Cell was created",
            "example": "2024-01-15T10:30:00.000Z",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "description": "The ISO 8601 timestamp when the Cell was last updated",
            "example": "2024-01-16T08:57:12.000Z",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "rowId",
          "columnId",
          "value",
          "dataType",
          "status",
          "lastError",
          "aiSourceUrl",
          "createdAt",
          "updatedAt"
        ]
      },
      "RowResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the Row",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "format": "uuid"
          },
          "sessionId": {
            "type": "string",
            "description": "The unique identifier of the Session",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "format": "uuid"
          },
          "cells": {
            "description": "The cells in this row",
            "example": [
              {
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "rowId": "3afed0b3-bf81-4cdb-91dd-2a72672bcf8f",
                "columnId": "col-123",
                "value": "Sample value 1",
                "dataType": "text",
                "status": "resolved",
                "lastError": null,
                "aiSourceUrl": "https://app.phacetlabs.com/projects/project-abc/table/table-1234/session/session-456?view=table&openCitationsCellId=123e4567-e89b-12d3-a456-426614174000",
                "createdAt": "2024-01-15T10:30:00.000Z",
                "updatedAt": "2024-01-15T10:30:00.000Z"
              },
              {
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "rowId": "3afed0b3-bf81-4cdb-91dd-2a72672bcf8f",
                "columnId": "col-456",
                "value": [
                  "Option 1",
                  "Option 2"
                ],
                "dataType": "multipleSelect",
                "status": "resolved",
                "lastError": null,
                "aiSourceUrl": null,
                "createdAt": "2024-01-15T10:30:00.000Z",
                "updatedAt": "2024-01-15T10:30:00.000Z"
              },
              {
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "rowId": "3afed0b3-bf81-4cdb-91dd-2a72672bcf8f",
                "columnId": "165059a9-81d2-4d36-9a38-198abc855d76",
                "value": "Sample value 3",
                "dataType": "text",
                "status": "error",
                "lastError": "Failed to process value",
                "aiSourceUrl": null,
                "createdAt": "2024-01-15T10:30:00.000Z",
                "updatedAt": "2024-01-15T10:30:00.000Z"
              },
              {
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "rowId": "3afed0b3-bf81-4cdb-91dd-2a72672bcf8f",
                "columnId": "165059a9-81d2-4d36-9a38-198abc855d75",
                "value": {
                  "key": "value"
                },
                "dataType": "json",
                "status": "resolved",
                "aiSourceUrl": null,
                "lastError": null,
                "createdAt": "2024-01-15T10:30:00.000Z",
                "updatedAt": "2024-01-15T10:30:00.000Z"
              }
            ],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CellResponseDto"
            }
          }
        },
        "required": [
          "id",
          "sessionId",
          "cells"
        ]
      },
      "CreateRowCellDto": {
        "type": "object",
        "properties": {
          "columnId": {
            "type": "string",
            "description": "The unique identifier of the Column",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "format": "uuid"
          },
          "value": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object"
              }
            ],
            "description": "The value of the cell, type depends on dataType: \n - Text and singleSelect: string \n - json: plain objects \n - multipleSelect: array of strings \n - file: string that represents the id of the file you have previously uploaded",
            "example": "Sample value 1"
          }
        },
        "required": [
          "columnId",
          "value"
        ]
      },
      "CreateRowRequestDto": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string",
            "description": "The sessionId of the row, if not provided, the row will be inserted in the last created session",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "format": "uuid"
          },
          "cells": {
            "description": "The cells in this row",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateRowCellDto"
            }
          },
          "runRow": {
            "type": "boolean",
            "description": "Whether to trigger the run of a row in the Table",
            "default": true
          }
        },
        "required": [
          "sessionId",
          "cells"
        ]
      }
    }
  }
}
```