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

# POST: upload

## Sending an extraction request

<mark style="color:green;">`POST`</mark> `/api/upload`

#### Headers

| Name                                            | Type   | Description                        |
| ----------------------------------------------- | ------ | ---------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Your provided bearer token API Key |

#### Request Body

| Name                                       | Type    | Description                                                                                                                                                                                                                                                                                                                                                    |
| ------------------------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| files<mark style="color:red;">\*</mark>    | file    | <p>The file to be extracted. We currently support <code>.pdf</code>, <code>.jpg</code>, <code>.jpeg</code>, <code>.png</code> ,<code>.xlsx</code>, <code>.csv</code></p><p></p><p>Note that this needs to be sent over as <code>multipart/form-data</code> (more information <a href="https://developer.mozilla.org/en-US/docs/Web/API/FormData">here</a>)</p> |
| tsSchema<mark style="color:red;">\*</mark> | object  | The JSON response schema expected for data extraction                                                                                                                                                                                                                                                                                                          |
| tabularData                                | boolean | <p>Optional parameter (will default to <code>false</code>). </p><p></p><p>If <code>true</code> value is provided, then Cohesive will optimize for extracting table-based data. We recommend this if you know that your import file(s) will primarily be tables, like startup cap tables.</p>                                                                   |

{% tabs %}
{% tab title="200: OK Successful extraction" %}

```
// Example response
{
  "data": {
    "data": [
      {
        "pageRange": [
          0
        ],
        "extraction": null
      }
    ]
  }
}
```

{% endtab %}

{% tab title="500: Internal Server Error " %}

{% endtab %}

{% tab title="401: Unauthorized Missing or invalid API Key" %}

{% endtab %}

{% tab title="405: Method Not Allowed Only POST requests are supported" %}

{% endtab %}

{% tab title="400: Bad Request Invalid API request" %}

{% endtab %}
{% endtabs %}
