> For the complete documentation index, see [llms.txt](https://docs.pakk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pakk.io/data-and-integrations/api/api-structure/csv-api.md).

# CSV API

Consult the [Data Import and Export documentation](/data-and-integrations/data-import-and-export.md) for a full explanation of how records can be imported and exported in Pakk.  Everything that is explained there is relevant to CSV API.  If in doubt, try running CSV exports/imports from the admin panel and observe the structure of requests.

`POST {root}/export/{entityname}`

* Exports a list of records in CSV format
* Uses the familiar filtering arguments to filter down records for export
* Allows specification of exactly which fields (columns) to export

`POST {root}/import/{entityname}`

* Import a CSV file
* In order to establish the correct format and naming for columns, the easiest approach is to first do a CSV Export and observe the column names
* Consult the [Data Import and Export documentation](/data-and-integrations/data-import-and-export.md) for more explanation around required/disallowed fields


---

# 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:

```
GET https://docs.pakk.io/data-and-integrations/api/api-structure/csv-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
