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

# Add Rows

> Add up to 10 files to a report, one row per file.

> [!NOTE]
>
> **Preview.** This endpoint is available to organisations in the Wordsmith MCP pilot. Other organisations receive `403 mcp_not_enabled`. See the [preview overview](/preview).

Adds one row per file to a report. Each file is copied into the report, and the row's `file_id` is that copy. A file named twice in one request gets one row. A file already in the report gets another row, so check [List Rows](/api-reference/reports/list-rows) before adding it again.

On a report created through the API, new rows start with every cell `empty`, and adding them computes nothing and uses no credits. Fill them with [Run Report](/api-reference/reports/run-report), passing the new row ids as `row_ids`. A report made in the app with auto-run on computes new rows straight away.

This endpoint only works on a report built from files. When a report was created with `repository_id`, its rows follow the repository: add the files to the repository instead.

## Authentication

Requires an API key, or an OAuth token with `reports:write` and `files:read`. The caller needs edit access to the report and read access to every file.

## Path parameters

**report\_id** `string` *required*

The report id.

## Body parameters

**file\_ids** `string[]` *required*

The files to add, from `1` to `10` ids. Each must be a `.pdf`, `.docx`, `.doc`, `.pptx` or `.png` file.

## Response

Returns `201` with the new [rows](/proposed/objects#report) in `items`, in the order of `file_ids`. `failed_file_ids` lists the files that could not be copied into the report; add them again.

```bash cURL theme={null}
curl -X POST "https://api.wordsmith.ai/api/v1/reports/4d845617-3fad-483d-8eac-eba886e6e31f/rows" \
  -H "Authorization: Bearer sk-ws-api1-your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "file_ids": [
      "d3c3a00e-4c00-4bfe-97af-374bb41ca6db",
      "a400ba8b-98b1-49aa-b7fa-e42607a2892a"
    ]
  }'
```

```json Response theme={null}
{
  "items": [
    {
      "id": "cbe87a67-8eb8-4811-a825-4b0b30c7e013",
      "file_id": "5fd5db90-5cd3-46b6-87d9-c828732551ef",
      "name": "Lease - Unit 9 Riverside Park.pdf"
    },
    {
      "id": "8933f41c-ede7-462e-b985-8c95e261db1f",
      "file_id": "7a2c9e41-0b3d-4f58-a6e2-91c4d7b3e0f5",
      "name": "Lease - 41 High Street.docx"
    }
  ],
  "failed_file_ids": []
}
```

## Errors

| Status | `error_code` | When |
| - | - | - |
| 400 | `invalid_request_body` | `file_ids` is empty or has more than 10 ids. |
| 400 | `unsupported_file_type` | A file is not a `.pdf`, `.docx`, `.doc`, `.pptx` or `.png` file. No row is added. |
| 400 | `process_limit_exceeded` | The report computes new rows straight away, and they would cost more credits than one operation may use. |
| 403 | `forbidden` | The caller can read the report but cannot edit it. |
| 403 | `insufficient_scope` | An OAuth token without `files:read`. |
| 404 | `resource_not_found` | No report with this id, or a file does not exist or the caller cannot read it. No row is added. |
| 409 | `rows_follow_repository` | The report's rows follow a repository. Add the files to the repository instead. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.