---
title: "Upload a file to refresh the collection's data"
method: POST
path: "/collections/{collection_id}/files"
tags: ["Collections"]
---

# Upload a file to refresh the collection's data

`POST /collections/{collection_id}/files`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/collections/{collection_id}/files`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

## Path parameters

- `collection_id` integer, required

## Query parameters

- `append_to_ds_id` integer, nullable: Dataset ID to which the file is being appended

## Response `201`

Document created, URL follows

- unknown

## Other responses

- `400`: Bad request syntax or unsupported method

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/17af8131167d?raw)
