# Add rows

Inserts one or more rows into the sheet specified in the URL. If you want to insert the rows in any position but the default, use location-specifier attributes (that is, toTop, toBottom, parentId, siblingId, above, indent, outdent). See language tabs for variations in syntax.

Note: This operation does not add rows with cells that have images. However, you can upload an image to a cell after the cell exists in a sheet. To do so, call the operation described in the Add Image to Cell page.

This operation supports both single-object and bulk semantics. For more information, see Optional Bulk Operations.

Endpoint: POST /sheets/{sheetId}/rows
Version: 2.0.0
Security: APIToken, OAuth2

## Path parameters:

  - `sheetId` (number, required)
    ID of the sheet being accessed.

## Header parameters:

  - `Authorization` (string)
    API Access Token used to authenticate requests to Smartsheet APIs.

  - `smartsheet-integration-source` (string)
    Uses the following metadata to distinguish between human-initiated API requests and third-party service-initiated calls by AI Connectors or ITSM:

- Integration source type
- Organization name
- Integration source name 

Format:


TYPE,OrgName,SourceName


Examples: 

AI,SampleOrg,My-AI-Connector-v2

SCRIPT,SampleOrg2,Accounting-updater-script

APPLICATION,SampleOrg3,SheetUpdater
    Example: "AI,SampleOrg,My-AI-Connector-v2"

  - `Content-Type` (string)
    Required for POST and PUT requests. Defines the structure for the request body.

## Query parameters:

  - `accessApiLevel` (number)
    Allows COMMENTER access for inputs and return values. For backwards-compatibility, VIEWER is the default. For example, to see whether a user has COMMENTER access for a sheet, use accessApiLevel=1.

  - `allowPartialSuccess` (boolean)
    When specified with a value of true, enables partial success for this bulk operation. See Bulk operations > Partial success for more information.

  - `overrideValidation` (boolean)
    You may use the query string parameter overrideValidation with a value of true to allow a cell value outside of the validation limits. You must specify strict with a value of false to bypass value type checking.

## Response 200 fields (application/json):

  - `message` (string)
    Message that indicates the outcome of the request. (One of SUCCESS or PARTIAL_SUCCESS.)
    Enum: "PARTIAL_SUCCESS", "SUCCESS"

  - `resultCode` (number)
    * '0' Success
* '3' Partial Success of Bulk Operation
    Enum: 0, 3

  - `result` (array)

  - `result.id` (number)
    Row ID.

  - `result.sheetId` (number)
    Parent sheet ID.

  - `result.rowNumber` (number)
    Row number within the sheet.

  - `result.expanded` (boolean)
    Indicates whether the row is expanded or collapsed.

  - `result.createdAt` (any)

  - `result.modifiedAt` (any)

  - `result.cells` (array)
    Cells objects.

  - `result.cells.columnId` (number)
    The ID of the column that the cell is located in.

  - `result.cells.columnType` (string)
    Only returned if the include query string parameter contains columnType.

  - `result.cells.value` (any)
    A string, number, or a Boolean value -- depending on the cell type and the data in the cell. Cell values larger than 4000 characters are silently truncated. An empty cell returns no value.

  - `result.cells.displayValue` (string)
    Visual representation of cell contents, as presented to the user in the UI.

  - `result.version` (number)
    Sheet version number that is incremented every time a sheet is modified.

## Response default fields (application/json):

  - `refId` (string)
    The ID of the specific error occurrence. Please include this information when contacting Smartsheet support.

  - `errorCode` (number)
    Custom error code from Smartsheet. See the complete [Error Code List](/api/smartsheet/error-codes).

  - `message` (string)
    Descriptive error message.


