> For the complete documentation index, see [llms.txt](https://docs.redivis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.redivis.com/api/rest-api/files/post.md).

# post

## Overview

This endpoint is used for adding new non-tabular files to a [file index table](https://docs.redivis.com/reference/datasets/files#folders-and-index-tables). Files can only be added to tables on an unreleased version of a dataset — if the dataset has previously been released, make sure you are referencing the `next` version of the dataset in the [dataset reference](/api/referencing-resources.md).

When uploading files through this endpoint, you must first upload the file contents as temporary uploads, via the [Tables.createTempUploads](/api/rest-api/tables/createtempuploads.md) endpoint. You can then pass batches of the corresponding tempUpload ids to this endpoint to add files in bulk, which is significantly more performant than adding files one at a time.

{% hint style="info" %}
There's a lot of complexity in uploading data! It's highly recommended to use one of the client libraries to transfer data to Redivis. These libraries take care of the complexities automatically and optimize the upload mechanism and parallelization based on the size of your file, while also retrying on intermittent network errors.
{% endhint %}

## HTTP Request

```http
POST /api/v1/tables/:tableReference/rawFiles
```

{% hint style="info" %}
This endpoint extends the [general API structure](/api/rest-api/general-structure.md)
{% endhint %}

## Path parameters

| Parameter      |                                                                                                                      |
| -------------- | -------------------------------------------------------------------------------------------------------------------- |
| tableReference | A qualified reference to the table. See [referencing resources](/api/referencing-resources.md) for more information. |

## Request body

| Property name             | Type              | Description                                                                                                                                                                           |
| ------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **files**                 | **array(object)** | <p>An array of file objects, which each contain a property <code>"name"</code> and a property <code>"resumableUploadId"</code><br><br>Only relevant when using resumable uploads.</p> |
| **files\[].name**         | **string**        | The file name.                                                                                                                                                                        |
| **files\[].tempUploadId** | **string**        | The id returned by the table `createResumableUpload` endpoint.                                                                                                                        |

## Authorization

Edit access to the dataset is required. Your access token must have the following scope:

* data.edit

[Learn more about authorization.](/api/rest-api/authorization.md)

## Response body

If successful, returns with a 201 status code and the following response body:

```json
{
    "kind": "rawFileList",
    "results": [
        {
            "kind": "rawFile",
            "id": str,
            "uri": str,
            "url": str,
            "name": str,
            "md5Hash": str,
            "size": numeric
        }
    ]
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.redivis.com/api/rest-api/files/post.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
